Changed Crafting Recipes to upgrade netherite armor/tools using a stalinium smithing template.
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ mod_name=Stalinium
|
||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||
mod_license=MIT
|
||||
# The mod version. See https://semver.org/
|
||||
mod_version=0.1.6
|
||||
mod_version=0.1.7
|
||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||
# This should match the base package used for the mod sources.
|
||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
|
||||
@@ -20,6 +20,7 @@ public class ModItemModelProvider extends ItemModelProvider {
|
||||
basicItem(ModItems.STALINIUM_CHESTPLATE.get());
|
||||
basicItem(ModItems.STALINIUM_LEGGINGS.get());
|
||||
basicItem(ModItems.STALINIUM_BOOTS.get());
|
||||
basicItem(ModItems.STALINIUM_SMITHING_TEMPLATE.get());
|
||||
handheldItem(ModItems.STALINIUM_SWORD.get());
|
||||
handheldItem(ModItems.STALINIUM_AXE.get());
|
||||
handheldItem(ModItems.STALINIUM_SHOVEL.get());
|
||||
|
||||
@@ -44,7 +44,6 @@ public class ModItemTagProvider extends ItemTagsProvider {
|
||||
.add(ModItems.STALINIUM_LEGGINGS.get());
|
||||
this.tag(ItemTags.FOOT_ARMOR)
|
||||
.add(ModItems.STALINIUM_BOOTS.get());
|
||||
|
||||
this.tag(ItemTags.TRIMMABLE_ARMOR)
|
||||
.add(ModItems.STALINIUM_HELMET.get())
|
||||
.add(ModItems.STALINIUM_CHESTPLATE.get())
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
package net.krituximon.stalinium.datagen;
|
||||
|
||||
import net.krituximon.stalinium.Stalinium;
|
||||
import net.krituximon.stalinium.block.ModBlocks;
|
||||
import net.krituximon.stalinium.item.ModItems;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.data.recipes.*;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.neoforged.neoforge.common.conditions.IConditionBuilder;
|
||||
import net.minecraft.data.recipes.SmithingTransformRecipeBuilder;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@@ -45,76 +53,112 @@ public class ModRecipeProvider extends RecipeProvider implements IConditionBuild
|
||||
.define('S', Items.NETHER_STAR)
|
||||
.unlockedBy("has_nugget", has(ModItems.STALINIUM_NUGGET)).save(recipeOutput);
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.STALINIUM_SWORD.get())
|
||||
.pattern("I")
|
||||
.pattern("I")
|
||||
.pattern("G")
|
||||
.define('I', ModItems.STALINIUM_INGOT.get())
|
||||
.define('G', Items.GOLD_BLOCK)
|
||||
.unlockedBy("has_ingot", has(ModItems.STALINIUM_INGOT)).save(recipeOutput);
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.STALINIUM_SHOVEL.get())
|
||||
.pattern("I")
|
||||
.pattern("G")
|
||||
.pattern("G")
|
||||
.define('I', ModItems.STALINIUM_INGOT.get())
|
||||
.define('G', Items.GOLD_BLOCK)
|
||||
.unlockedBy("has_ingot", has(ModItems.STALINIUM_INGOT)).save(recipeOutput);
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.STALINIUM_AXE.get())
|
||||
.pattern("II")
|
||||
.pattern("IG")
|
||||
.pattern(" G")
|
||||
.define('I', ModItems.STALINIUM_INGOT.get())
|
||||
.define('G', Items.GOLD_BLOCK)
|
||||
.unlockedBy("has_ingot", has(ModItems.STALINIUM_INGOT)).save(recipeOutput);
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.STALINIUM_HOE.get())
|
||||
.pattern("II")
|
||||
.pattern(" G")
|
||||
.pattern(" G")
|
||||
.define('I', ModItems.STALINIUM_INGOT.get())
|
||||
.define('G', Items.GOLD_BLOCK)
|
||||
.unlockedBy("has_ingot", has(ModItems.STALINIUM_INGOT)).save(recipeOutput);
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.STALINIUM_PICKAXE.get())
|
||||
.pattern("III")
|
||||
.pattern(" G ")
|
||||
.pattern(" G ")
|
||||
.define('I', ModItems.STALINIUM_INGOT.get())
|
||||
.define('G', Items.GOLD_BLOCK)
|
||||
.unlockedBy("has_ingot", has(ModItems.STALINIUM_INGOT)).save(recipeOutput);
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.STALINIUM_HELMET.get())
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.STALINIUM_SMITHING_TEMPLATE.get(), 4)
|
||||
.pattern("NNN")
|
||||
.pattern("NIN")
|
||||
.pattern("NSN")
|
||||
.pattern("S S")
|
||||
.pattern(" ")
|
||||
.define('S', ModItems.STALINIUM_INGOT.get())
|
||||
.define('N', Items.NETHERITE_INGOT)
|
||||
.unlockedBy("has_ingot", has(ModItems.STALINIUM_INGOT)).save(recipeOutput);
|
||||
.define('I', ModItems.STALINIUM_INGOT)
|
||||
.define('N', ModItems.STALINIUM_NUGGET.get())
|
||||
.define('S', Items.IRON_BLOCK)
|
||||
.unlockedBy("has_nugget", has(ModItems.STALINIUM_NUGGET)).save(recipeOutput);
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.STALINIUM_CHESTPLATE.get())
|
||||
.pattern("S S")
|
||||
.pattern("SSS")
|
||||
.pattern("NNN")
|
||||
.define('S', ModItems.STALINIUM_INGOT.get())
|
||||
.define('N', Items.NETHERITE_INGOT)
|
||||
.unlockedBy("has_ingot", has(ModItems.STALINIUM_INGOT)).save(recipeOutput);
|
||||
SmithingTransformRecipeBuilder.smithing(
|
||||
Ingredient.of(ModItems.STALINIUM_SMITHING_TEMPLATE.get()),
|
||||
Ingredient.of(Items.NETHERITE_SWORD),
|
||||
Ingredient.of(ModItems.STALINIUM_INGOT.get()),
|
||||
RecipeCategory.COMBAT,
|
||||
ModItems.STALINIUM_SWORD.get()
|
||||
)
|
||||
.unlocks("has_netherite", has(Items.NETHERITE_SWORD))
|
||||
.save(recipeOutput,
|
||||
ResourceLocation.fromNamespaceAndPath(Stalinium.MODID, "smithing/stalinium_sword"));
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.STALINIUM_LEGGINGS.get())
|
||||
.pattern("NNN")
|
||||
.pattern("S S")
|
||||
.pattern("S S")
|
||||
.define('S', ModItems.STALINIUM_INGOT.get())
|
||||
.define('N', Items.NETHERITE_INGOT)
|
||||
.unlockedBy("has_ingot", has(ModItems.STALINIUM_INGOT)).save(recipeOutput);
|
||||
SmithingTransformRecipeBuilder.smithing(
|
||||
Ingredient.of(ModItems.STALINIUM_SMITHING_TEMPLATE.get()),
|
||||
Ingredient.of(Items.NETHERITE_PICKAXE),
|
||||
Ingredient.of(ModItems.STALINIUM_INGOT.get()),
|
||||
RecipeCategory.TOOLS,
|
||||
ModItems.STALINIUM_PICKAXE.get()
|
||||
)
|
||||
.unlocks("has_netherite", has(Items.NETHERITE_PICKAXE))
|
||||
.save(recipeOutput,
|
||||
ResourceLocation.fromNamespaceAndPath(Stalinium.MODID, "smithing/stalinium_pickaxe"));
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.STALINIUM_BOOTS.get())
|
||||
.pattern("S S")
|
||||
.pattern("N N")
|
||||
.pattern(" ")
|
||||
.define('S', ModItems.STALINIUM_INGOT.get())
|
||||
.define('N', Items.NETHERITE_INGOT)
|
||||
.unlockedBy("has_ingot", has(ModItems.STALINIUM_INGOT)).save(recipeOutput);
|
||||
SmithingTransformRecipeBuilder.smithing(
|
||||
Ingredient.of(ModItems.STALINIUM_SMITHING_TEMPLATE.get()),
|
||||
Ingredient.of(Items.NETHERITE_AXE),
|
||||
Ingredient.of(ModItems.STALINIUM_INGOT.get()),
|
||||
RecipeCategory.TOOLS,
|
||||
ModItems.STALINIUM_AXE.get()
|
||||
)
|
||||
.unlocks("has_netherite", has(Items.NETHERITE_AXE))
|
||||
.save(recipeOutput,
|
||||
ResourceLocation.fromNamespaceAndPath(Stalinium.MODID, "smithing/stalinium_axe"));
|
||||
|
||||
SmithingTransformRecipeBuilder.smithing(
|
||||
Ingredient.of(ModItems.STALINIUM_SMITHING_TEMPLATE.get()),
|
||||
Ingredient.of(Items.NETHERITE_SHOVEL),
|
||||
Ingredient.of(ModItems.STALINIUM_INGOT.get()),
|
||||
RecipeCategory.TOOLS,
|
||||
ModItems.STALINIUM_SHOVEL.get()
|
||||
)
|
||||
.unlocks("has_netherite", has(Items.NETHERITE_SHOVEL))
|
||||
.save(recipeOutput,
|
||||
ResourceLocation.fromNamespaceAndPath(Stalinium.MODID, "smithing/stalinium_shovel"));
|
||||
|
||||
SmithingTransformRecipeBuilder.smithing(
|
||||
Ingredient.of(ModItems.STALINIUM_SMITHING_TEMPLATE.get()),
|
||||
Ingredient.of(Items.NETHERITE_HOE),
|
||||
Ingredient.of(ModItems.STALINIUM_INGOT.get()),
|
||||
RecipeCategory.TOOLS,
|
||||
ModItems.STALINIUM_HOE.get()
|
||||
)
|
||||
.unlocks("has_netherite", has(Items.NETHERITE_HOE))
|
||||
.save(recipeOutput,
|
||||
ResourceLocation.fromNamespaceAndPath(Stalinium.MODID, "smithing/stalinium_hoe"));
|
||||
|
||||
SmithingTransformRecipeBuilder.smithing(
|
||||
Ingredient.of(ModItems.STALINIUM_SMITHING_TEMPLATE.get()),
|
||||
Ingredient.of(Items.NETHERITE_HELMET),
|
||||
Ingredient.of(ModItems.STALINIUM_INGOT.get()),
|
||||
RecipeCategory.COMBAT,
|
||||
ModItems.STALINIUM_HELMET.get()
|
||||
)
|
||||
.unlocks("has_netherite", has(Items.NETHERITE_HELMET))
|
||||
.save(recipeOutput,
|
||||
ResourceLocation.fromNamespaceAndPath(Stalinium.MODID, "smithing/stalinium_helmet"));
|
||||
|
||||
SmithingTransformRecipeBuilder.smithing(
|
||||
Ingredient.of(ModItems.STALINIUM_SMITHING_TEMPLATE.get()),
|
||||
Ingredient.of(Items.NETHERITE_CHESTPLATE),
|
||||
Ingredient.of(ModItems.STALINIUM_INGOT.get()),
|
||||
RecipeCategory.COMBAT,
|
||||
ModItems.STALINIUM_CHESTPLATE.get()
|
||||
)
|
||||
.unlocks("has_netherite", has(Items.NETHERITE_CHESTPLATE))
|
||||
.save(recipeOutput,
|
||||
ResourceLocation.fromNamespaceAndPath(Stalinium.MODID, "smithing/stalinium_chestplate"));
|
||||
|
||||
SmithingTransformRecipeBuilder.smithing(
|
||||
Ingredient.of(ModItems.STALINIUM_SMITHING_TEMPLATE.get()),
|
||||
Ingredient.of(Items.NETHERITE_LEGGINGS),
|
||||
Ingredient.of(ModItems.STALINIUM_INGOT.get()),
|
||||
RecipeCategory.COMBAT,
|
||||
ModItems.STALINIUM_LEGGINGS.get()
|
||||
)
|
||||
.unlocks("has_netherite", has(Items.NETHERITE_LEGGINGS))
|
||||
.save(recipeOutput,
|
||||
ResourceLocation.fromNamespaceAndPath(Stalinium.MODID, "smithing/stalinium_leggings"));
|
||||
|
||||
SmithingTransformRecipeBuilder.smithing(
|
||||
Ingredient.of(ModItems.STALINIUM_SMITHING_TEMPLATE.get()),
|
||||
Ingredient.of(Items.NETHERITE_BOOTS),
|
||||
Ingredient.of(ModItems.STALINIUM_INGOT.get()),
|
||||
RecipeCategory.COMBAT,
|
||||
ModItems.STALINIUM_BOOTS.get()
|
||||
)
|
||||
.unlocks("has_netherite", has(Items.NETHERITE_BOOTS))
|
||||
.save(recipeOutput,
|
||||
ResourceLocation.fromNamespaceAndPath(Stalinium.MODID, "smithing/stalinium_boots"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ public class ModCreativeModeTabs {
|
||||
output.accept(ModItems.STALINIUM_CHESTPLATE.get());
|
||||
output.accept(ModItems.STALINIUM_LEGGINGS.get());
|
||||
output.accept(ModItems.STALINIUM_BOOTS.get());
|
||||
output.accept(ModItems.STALINIUM_SMITHING_TEMPLATE.get());
|
||||
}).build());
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
|
||||
@@ -56,6 +56,9 @@ public class ModItems {
|
||||
() -> new StaliniumBootsItem(ModArmorMaterials.STALINIUM_ARMOR_MATERIAL, ArmorItem.Type.BOOTS,
|
||||
new Item.Properties().durability(ArmorItem.Type.BOOTS.getDurability(19))));
|
||||
|
||||
public static final DeferredItem<Item> STALINIUM_SMITHING_TEMPLATE = ITEMS.register("stalinium_smithing_template",
|
||||
() -> new Item(new Item.Properties()));
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
ITEMS.register(eventBus);
|
||||
}
|
||||
|
||||
@@ -59,5 +59,7 @@
|
||||
"item.minecraft.potion.effect.weapons_grade_vodka": "Weapons Grade Vodka",
|
||||
"item.minecraft.splash_potion.effect.weapons_grade_vodka": "Throwable Weapons Grade Vodka",
|
||||
"item.minecraft.lingering_potion.effect.weapons_grade_vodka": "Lingering Weapons Grade Vodka",
|
||||
"item.minecraft.tipped_arrow.effect.weapons_grade_vodka": "Arrow of Weapons Grade Vodka"
|
||||
"item.minecraft.tipped_arrow.effect.weapons_grade_vodka": "Arrow of Weapons Grade Vodka",
|
||||
|
||||
"item.stalinium.stalinium_smithing_template": "Stalinium Upgrade Template"
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 339 B |
Reference in New Issue
Block a user