Started working on two new items: Straw totem and straw charge.

Added textures, crafting recipes and lang file entries.
Items are basic and don't do anything yet
This commit is contained in:
micle
2021-05-29 19:20:54 +01:00
parent 107eb688eb
commit 2274056c04
15 changed files with 177 additions and 1 deletions

View File

@ -1,6 +1,12 @@
8a2b88672a3111967914bf84746ee02770dc8aca assets/totemofreviving/models/item/reviving_charge.json
6dfda0ccc2ea9fde90748a9fac81e6e122375b60 assets/totemofreviving/models/item/straw_charge.json
70680f30f3471070d6d4121f0787eb7e2a9d7318 assets/totemofreviving/models/item/straw_totem.json
9802f8a76c014c4e7d5b093643a0f8f2c75474bc assets/totemofreviving/models/item/totem_of_reviving.json
97e29a14be1fa658d16ee23c9791822f6d49dab7 data/totemofreviving/advancements/recipes/misc/reviving_charge.json
4a76d05fbd6fe375b097c1207f2967fd5fbfef5b data/totemofreviving/advancements/recipes/misc/straw_charge.json
8608de575125d59605ad619c16b826cee70c478e data/totemofreviving/advancements/recipes/misc/straw_totem.json
9be362836ef513789b2c8e3d88d35a6b802b5d27 data/totemofreviving/advancements/recipes/misc/totem_of_reviving.json
0a4143689809621511c8e586e6f030e2dd7a5927 data/totemofreviving/recipes/reviving_charge.json
72f1af6072cd28ad40e07d67256f2611bcb2d924 data/totemofreviving/recipes/straw_charge.json
ffba47b4fb65503d8143a387b05e191301b2b895 data/totemofreviving/recipes/straw_totem.json
8d9f9d28b0748d5dacbf0824b8f6531a6a00bbfa data/totemofreviving/recipes/totem_of_reviving.json

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "totemofreviving:item/straw_charge"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "totemofreviving:item/straw_totem"
}
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"totemofreviving:straw_charge"
]
},
"criteria": {
"has_item": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:emerald"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "totemofreviving:straw_charge"
}
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"totemofreviving:straw_totem"
]
},
"criteria": {
"has_item": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:wheat"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "totemofreviving:straw_totem"
}
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"IWI",
"WEW",
"IWI"
],
"key": {
"W": {
"item": "minecraft:wheat"
},
"E": {
"item": "minecraft:emerald"
},
"I": {
"item": "minecraft:iron_ingot"
}
},
"result": {
"item": "totemofreviving:straw_charge"
}
}

View File

@ -0,0 +1,25 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"NSN",
"NWN",
"N/N"
],
"key": {
"W": {
"item": "minecraft:wheat"
},
"/": {
"item": "minecraft:stick"
},
"S": {
"item": "minecraft:string"
},
"N": {
"item": "minecraft:iron_nugget"
}
},
"result": {
"item": "totemofreviving:straw_totem"
}
}

View File

@ -30,5 +30,24 @@ public class ModRecipeProvider extends RecipeProvider {
.pattern("@E@")
.unlockedBy("has_item", has(ModItems.TOTEM_OF_REVIVING.get()))
.save(consumer);
ShapedRecipeBuilder.shaped(ModItems.STRAW_TOTEM.get())
.define('W', Items.WHEAT)
.define('/', Items.STICK)
.define('S', Items.STRING)
.define('N', Items.IRON_NUGGET)
.pattern("NSN")
.pattern("NWN")
.pattern("N/N")
.unlockedBy("has_item", has(Items.WHEAT))
.save(consumer);
ShapedRecipeBuilder.shaped(ModItems.STRAW_CHARGE.get())
.define('W', Items.WHEAT)
.define('E', Items.EMERALD)
.define('I', Items.IRON_INGOT)
.pattern("IWI")
.pattern("WEW")
.pattern("IWI")
.unlockedBy("has_item", has(Items.EMERALD))
.save(consumer);
}
}

View File

@ -23,6 +23,8 @@ public class ModItemModelProvider extends ItemModelProvider {
builder(item_generated, "totem_of_reviving");
builder(item_generated, "reviving_charge");
builder(item_generated, "straw_totem");
builder(item_generated, "straw_charge");
}
private ItemModelBuilder builder(ModelFile item_generated, String name) {

View File

@ -0,0 +1,10 @@
package com.micle.totemofreviving.items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
public class StrawChargeItem extends Item {
public StrawChargeItem() {
super(new Properties().tab(ItemGroup.TAB_MISC));
}
}

View File

@ -0,0 +1,10 @@
package com.micle.totemofreviving.items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
public class StrawTotemItem extends Item {
public StrawTotemItem() {
super(new Properties().tab(ItemGroup.TAB_MISC));
}
}

View File

@ -1,6 +1,8 @@
package com.micle.totemofreviving.setup;
import com.micle.totemofreviving.items.RevivingChargeItem;
import com.micle.totemofreviving.items.StrawChargeItem;
import com.micle.totemofreviving.items.StrawTotemItem;
import com.micle.totemofreviving.items.TotemOfRevivingItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
@ -9,6 +11,8 @@ import net.minecraftforge.fml.RegistryObject;
public class ModItems {
public static final RegistryObject<Item> TOTEM_OF_REVIVING = Registration.ITEMS.register("totem_of_reviving", TotemOfRevivingItem::new);
public static final RegistryObject<Item> REVIVING_CHARGE = Registration.ITEMS.register("reviving_charge", RevivingChargeItem::new);
public static final RegistryObject<Item> STRAW_TOTEM = Registration.ITEMS.register("straw_totem", StrawTotemItem::new);
public static final RegistryObject<Item> STRAW_CHARGE = Registration.ITEMS.register("straw_charge", StrawChargeItem::new);
static void register() {
}

View File

@ -1,4 +1,6 @@
{
"item.totemofreviving.totem_of_reviving": "Totem of Reviving",
"item.totemofreviving.reviving_charge": "Reviving charge"
"item.totemofreviving.reviving_charge": "Reviving charge",
"item.totemofreviving.straw_totem": "Straw Totem of Reviving",
"item.totemofreviving.straw_charge": "Straw reviving charge"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB