created raw gladius for all material types and abstracted recipe creator, need wither dust in PC
This commit is contained in:
@@ -82,16 +82,8 @@ public class CommonEvents implements WeaponNBT {
|
||||
setFortuneLevel(outputStack, getFortuneLevel(inputStack) + 1);
|
||||
setModifiers(outputStack, getModifiers(inputStack) + 1);
|
||||
}
|
||||
if (RecipeHelper.isOreName(modStack, "boneWithered")) {
|
||||
setFortuneLevel(outputStack, getFortuneLevel(inputStack) + 1);
|
||||
setModifiers(outputStack, getModifiers(inputStack) + 1);
|
||||
}
|
||||
if (RecipeHelper.isOreName(modStack, "dustWitheredBone")) {
|
||||
setFortuneLevel(outputStack, getFortuneLevel(inputStack) + 1);
|
||||
setModifiers(outputStack, getModifiers(inputStack) + 1);
|
||||
}
|
||||
if (RecipeHelper.isOreName(modStack, "skullWithered")) {
|
||||
setFortuneLevel(outputStack, getFortuneLevel(inputStack) + 1);
|
||||
if (RecipeHelper.isOreName(modStack, "boneWithered", "dustWitheredBone", "skullWithered")) {
|
||||
setLeechLevel(outputStack, getLeechLevel(inputStack) + 1);
|
||||
setModifiers(outputStack, getModifiers(inputStack) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ public class ForgeCraft
|
||||
ModBlocks.register();
|
||||
ModItems.init();
|
||||
ModItems.register();
|
||||
|
||||
ModDictionary.registerDictionaryNames();
|
||||
ModTiles.registerTileEntities();
|
||||
ModSounds.registerSounds();
|
||||
ModEvents.registerCommonEvents();
|
||||
|
||||
//ModEvents.registerClientEvents();
|
||||
// ModItems.registerRenders();
|
||||
proxy.preInit();
|
||||
@@ -67,7 +67,7 @@ public class ForgeCraft
|
||||
{
|
||||
//this.proxy.init(event);
|
||||
proxy.init();
|
||||
ModDictionary.registerDictionaryNames();
|
||||
|
||||
ModCrafting.register();
|
||||
|
||||
//proxy.registerModelBakeryVariants();
|
||||
@@ -76,7 +76,7 @@ public class ForgeCraft
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
//this.proxy.postInit(event);
|
||||
ModEvents.registerCommonEvents();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package nmd.primal.forgecraft.init;
|
||||
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraft.init.Items;
|
||||
|
||||
import static nmd.primal.forgecraft.init.ModConfig.Compatibility.COMPAT_DICTIONARY_WROUGHT_IRON;
|
||||
|
||||
@@ -32,5 +33,6 @@ public class ModDictionary {/***************************************************
|
||||
OreDictionary.registerOre("ingotWootz", ModItems.wootzingotball);
|
||||
OreDictionary.registerOre("nuggetWootz", ModItems.wootzchunk);
|
||||
//}
|
||||
OreDictionary.registerOre("dustBlaze", Items.BLAZE_POWDER);
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class ModItems {
|
||||
//public static Item stonetongs;
|
||||
public static Item castingmud;
|
||||
|
||||
public static Item rawbronzegladius;
|
||||
|
||||
|
||||
public static Item bronzeingotball;
|
||||
public static Item bronzechunk;
|
||||
@@ -118,6 +118,13 @@ public class ModItems {
|
||||
public static Item wootzshovel;
|
||||
public static Item wootzhoe;
|
||||
|
||||
public static Item rawbronzegladius;
|
||||
public static Item rawcoppergladius;
|
||||
public static Item rawwroughtirongladius;
|
||||
public static Item rawcleanirongladius;
|
||||
public static Item rawsteelgladius;
|
||||
public static Item rawwootzgladius;
|
||||
|
||||
public static Item bronzegladius;
|
||||
public static Item wroughtirongladius;
|
||||
public static Item cleanirongladius;
|
||||
@@ -252,6 +259,11 @@ public class ModItems {
|
||||
WEAPONS
|
||||
**********/
|
||||
rawbronzegladius = new WeaponPart("rawbronzegladius", PrimalAPI.ToolMaterials.TOOL_BRONZE);
|
||||
rawcoppergladius= new WeaponPart("rawcoppergladius", PrimalAPI.ToolMaterials.TOOL_COPPER);
|
||||
rawwroughtirongladius= new WeaponPart("rawwroughtirongladius", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
|
||||
rawcleanirongladius= new WeaponPart("rawcleanirongladius", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON);
|
||||
rawsteelgladius= new WeaponPart("rawsteelgladius", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL);
|
||||
rawwootzgladius= new WeaponPart("rawwootzgladius", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL);
|
||||
|
||||
bronzegladius = new CustomSword("bronzegladius", PrimalAPI.ToolMaterials.TOOL_BRONZE, 5.5D, 2D);
|
||||
wroughtirongladius = new CustomSword("wroughtirongladius", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 4.5D, -1.85D);
|
||||
@@ -305,6 +317,8 @@ public class ModItems {
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
//ForgeRegistries.ITEMS.register();
|
||||
|
||||
ForgeRegistries.ITEMS.register(itemnbtcrucible);
|
||||
ForgeRegistries.ITEMS.register(slottedtongs);
|
||||
//ForgeRegistries.ITEMS.register(itemcrucible);
|
||||
@@ -404,6 +418,11 @@ public class ModItems {
|
||||
WEAPONS
|
||||
**********/
|
||||
ForgeRegistries.ITEMS.register(rawbronzegladius);
|
||||
ForgeRegistries.ITEMS.register(rawcoppergladius);
|
||||
ForgeRegistries.ITEMS.register(rawwroughtirongladius);
|
||||
ForgeRegistries.ITEMS.register(rawcleanirongladius);
|
||||
ForgeRegistries.ITEMS.register(rawsteelgladius);
|
||||
ForgeRegistries.ITEMS.register(rawwootzgladius);
|
||||
|
||||
ForgeRegistries.ITEMS.register(wroughtirongladius);
|
||||
ForgeRegistries.ITEMS.register(bronzegladius);
|
||||
@@ -544,6 +563,11 @@ public class ModItems {
|
||||
//registerRender(wroughtironshield);
|
||||
|
||||
registerRender(rawbronzegladius);
|
||||
registerRender(rawcoppergladius);
|
||||
registerRender(rawwroughtirongladius);
|
||||
registerRender(rawcleanirongladius);
|
||||
registerRender(rawsteelgladius);
|
||||
registerRender(rawwootzgladius);
|
||||
|
||||
registerRender(bronzegladius);
|
||||
registerRender(wroughtirongladius);
|
||||
|
||||
@@ -17,6 +17,8 @@ import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.util.WeaponNBT;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@GameRegistry.ObjectHolder(ModInfo.MOD_ID)
|
||||
@Mod.EventBusSubscriber
|
||||
public class CauldronRecipes
|
||||
@@ -27,89 +29,106 @@ public class CauldronRecipes
|
||||
final IForgeRegistry<CauldronRecipe> recipes = event.getRegistry();
|
||||
|
||||
ItemStack defaultBronzeGladius = new ItemStack(ModItems.rawbronzegladius, 1);
|
||||
ItemStack defaultCopperGladius = new ItemStack(ModItems.rawcoppergladius, 1);
|
||||
ItemStack defaultWroughtIronGladius = new ItemStack(ModItems.rawwroughtirongladius, 1);
|
||||
ItemStack defaultCleanIronGladius = new ItemStack(ModItems.rawcleanirongladius, 1);
|
||||
ItemStack defaultSteelGladius = new ItemStack(ModItems.rawsteelgladius, 1);
|
||||
ItemStack defaultWootzGladius = new ItemStack(ModItems.rawwootzgladius, 1);
|
||||
|
||||
defaultBronzeGladius.getOrCreateSubCompound("tags");
|
||||
defaultBronzeGladius.getSubCompound("tags").setInteger("smite", 0);
|
||||
defaultBronzeGladius.getSubCompound("tags").setInteger("bane", 0);
|
||||
defaultBronzeGladius.getSubCompound("tags").setInteger("fire", 0);
|
||||
defaultBronzeGladius.getSubCompound("tags").setInteger("fortune", 0);
|
||||
defaultBronzeGladius.getSubCompound("tags").setInteger("leech", 0);
|
||||
defaultBronzeGladius.getSubCompound("tags").setInteger("sweeping", 0);
|
||||
defaultBronzeGladius.getSubCompound("tags").setInteger("sharpness", 0);
|
||||
defaultBronzeGladius.getSubCompound("tags").setBoolean("hot", false);
|
||||
setDefaultNBT(defaultBronzeGladius);
|
||||
setDefaultNBT(defaultCopperGladius);
|
||||
setDefaultNBT(defaultWroughtIronGladius);
|
||||
setDefaultNBT(defaultCleanIronGladius);
|
||||
setDefaultNBT(defaultSteelGladius);
|
||||
setDefaultNBT(defaultWootzGladius);
|
||||
|
||||
recipes.register(new CauldronRecipe(
|
||||
List<ItemStack> recipeList = RecipeHelper.buildList(defaultBronzeGladius, defaultCopperGladius, defaultWroughtIronGladius, defaultCleanIronGladius, defaultSteelGladius, defaultWootzGladius);
|
||||
|
||||
genRecipesForList(recipeList, recipes);
|
||||
|
||||
}
|
||||
|
||||
static void setDefaultNBT(ItemStack stack){
|
||||
stack.getOrCreateSubCompound("tags");
|
||||
stack.getSubCompound("tags").setInteger("smite", 0);
|
||||
stack.getSubCompound("tags").setInteger("bane", 0);
|
||||
stack.getSubCompound("tags").setInteger("fire", 0);
|
||||
stack.getSubCompound("tags").setInteger("fortune", 0);
|
||||
stack.getSubCompound("tags").setInteger("leech", 0);
|
||||
stack.getSubCompound("tags").setInteger("sweeping", 0);
|
||||
stack.getSubCompound("tags").setInteger("sharpness", 0);
|
||||
stack.getSubCompound("tags").setBoolean("hot", false);
|
||||
}
|
||||
|
||||
static CauldronRecipe genSmiteRecipe(ItemStack stack) {
|
||||
return new CauldronRecipe(
|
||||
5,
|
||||
new FluidStack(FluidRegistry.WATER, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("dustSilver", 2),
|
||||
RecipeHelper.buildList(defaultBronzeGladius),
|
||||
defaultBronzeGladius,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, "rawbronzegladiussmite"));
|
||||
|
||||
recipes.register(new CauldronRecipe(
|
||||
RecipeHelper.buildList(stack),
|
||||
stack,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, stack.getUnlocalizedName().toString().concat("smite"));
|
||||
}
|
||||
static CauldronRecipe genBaneRecipe(ItemStack stack) {
|
||||
return new CauldronRecipe(
|
||||
5,
|
||||
new FluidStack(FluidRegistry.WATER, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("foodPoison", 2),
|
||||
RecipeHelper.buildList(defaultBronzeGladius),
|
||||
defaultBronzeGladius,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, "rawbronzegladiusbane"));
|
||||
RecipeHelper.buildList(stack),
|
||||
stack,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, stack.getUnlocalizedName().toString().concat("bane"));
|
||||
}
|
||||
|
||||
recipes.register(new CauldronRecipe(
|
||||
static CauldronRecipe genFireRecipe(ItemStack stack) {
|
||||
return new CauldronRecipe(
|
||||
5,
|
||||
new FluidStack(FluidRegistry.WATER, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("dustBlaze", 2),
|
||||
RecipeHelper.buildList(defaultBronzeGladius),
|
||||
defaultBronzeGladius,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, "rawbronzegladiusfire"));
|
||||
RecipeHelper.buildList(stack),
|
||||
stack,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, stack.getUnlocalizedName().toString().concat("fire"));
|
||||
}
|
||||
|
||||
recipes.register(new CauldronRecipe(
|
||||
static CauldronRecipe genFortuneRecipe(ItemStack stack) {
|
||||
return new CauldronRecipe(
|
||||
5,
|
||||
new FluidStack(FluidRegistry.WATER, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("gemLapis", 2),
|
||||
RecipeHelper.buildList(defaultBronzeGladius),
|
||||
defaultBronzeGladius,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, "rawbronzegladiuslapis"));
|
||||
|
||||
recipes.register(new CauldronRecipe(
|
||||
5,
|
||||
new FluidStack(FluidRegistry.WATER, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("boneWithered", 1),
|
||||
RecipeHelper.buildList(defaultBronzeGladius),
|
||||
defaultBronzeGladius,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, "rawbronzegladiusleech0"));
|
||||
|
||||
recipes.register(new CauldronRecipe(
|
||||
5,
|
||||
new FluidStack(FluidRegistry.WATER, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("dustWitheredBone", 2),
|
||||
RecipeHelper.buildList(defaultBronzeGladius),
|
||||
defaultBronzeGladius,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, "rawbronzegladiusleech1"));
|
||||
|
||||
recipes.register(new CauldronRecipe(
|
||||
5,
|
||||
new FluidStack(FluidRegistry.WATER, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("skullWithered", 2),
|
||||
RecipeHelper.buildList(defaultBronzeGladius),
|
||||
defaultBronzeGladius,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, "rawbronzegladiusleech2"));
|
||||
|
||||
|
||||
|
||||
RecipeHelper.buildList(stack),
|
||||
stack,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, stack.getUnlocalizedName().toString().concat("fortune"));
|
||||
}
|
||||
}
|
||||
|
||||
//int cook_time,
|
||||
// FluidStack fluid_input,
|
||||
// FluidStack fluid_output,
|
||||
// List<ItemStack> item_input_1,
|
||||
// List<ItemStack> item_input_2,
|
||||
// ItemStack item_output_1,
|
||||
// ItemStack item_output_2
|
||||
static CauldronRecipe genLeechRecipe(ItemStack stack) {
|
||||
return new CauldronRecipe(
|
||||
5,
|
||||
new FluidStack(FluidRegistry.WATER, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("dustWitheredBone", 1),
|
||||
RecipeHelper.buildList(stack),
|
||||
stack,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, stack.getUnlocalizedName().toString().concat("leech"));
|
||||
}
|
||||
static void genRecipesForStack(ItemStack stack){
|
||||
genSmiteRecipe(stack);
|
||||
genBaneRecipe(stack);
|
||||
genFireRecipe(stack);
|
||||
genFortuneRecipe(stack);
|
||||
genLeechRecipe(stack);
|
||||
}
|
||||
|
||||
static void genRecipesForList(List<ItemStack> list, IForgeRegistry<CauldronRecipe> recipes){
|
||||
for(ItemStack s : list){
|
||||
recipes.register(genSmiteRecipe(s));
|
||||
recipes.register(genBaneRecipe(s));
|
||||
recipes.register(genFireRecipe(s));
|
||||
recipes.register(genFortuneRecipe(s));
|
||||
recipes.register(genLeechRecipe(s));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,8 +2,7 @@
|
||||
"forge_marker":1,
|
||||
"textures": {
|
||||
"particle": "forgecraft:items/bronze/0",
|
||||
"texture": "forgecraft:items/bronze/0",
|
||||
"texture1": "blocks/planks_oak"
|
||||
"texture": "forgecraft:items/bronze/0"
|
||||
},
|
||||
"parent": "forgecraft:item/rawgladius"
|
||||
}
|
||||
@@ -2,8 +2,7 @@
|
||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "items/finished_bronze",
|
||||
"texture": "items/finished_bronze",
|
||||
"texture1": "blocks/planks_oak"
|
||||
"texture": "items/finished_bronze"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user