working CT redoing all recipe handlers, woo....
This commit is contained in:
@@ -4,7 +4,10 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
//import nmd.primal.forgecraft.Item.ModItems;
|
||||
|
||||
/**
|
||||
@@ -46,12 +49,12 @@ public class ModInfo {
|
||||
};
|
||||
|
||||
// ***************************************************************************** //
|
||||
// PrimalAPI.Registries
|
||||
// ForgeCraft.Registries
|
||||
// ***************************************************************************** //
|
||||
public static class Registries
|
||||
{
|
||||
// In-World Recipes
|
||||
//public static final IForgeRegistry<CrucibleCrafting> CRUCIBLE_CRAFTINGS = GameRegistry.findRegistry(CrucibleCrafting.class);
|
||||
public static final IForgeRegistry<CrucibleCrafting> CRUCIBLE_CRAFTINGS = GameRegistry.findRegistry(CrucibleCrafting.class);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
package nmd.primal.forgecraft.compat.CT;
|
||||
|
||||
|
||||
import crafttweaker.CraftTweakerAPI;
|
||||
import crafttweaker.IAction;
|
||||
import crafttweaker.annotations.ModOnly;
|
||||
import crafttweaker.annotations.ZenRegister;
|
||||
import crafttweaker.api.item.IIngredient;
|
||||
import crafttweaker.api.item.IItemStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import nmd.primal.core.common.PrimalCore;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ZenClass("mods.primal.NBTCrucible")
|
||||
@ModOnly(ModInfo.MOD_ID)
|
||||
@ZenRegister
|
||||
public class CTCrucible {
|
||||
|
||||
static
|
||||
{
|
||||
PrimalCore.LOGGER.info("Registering CraftTweaker: " + CrucibleCrafting.RECIPE_PREFIX);
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(String recipe_name,
|
||||
int cookTemp,
|
||||
int cookTime,
|
||||
int coolTime,
|
||||
Ingredient ing0,
|
||||
Ingredient ing1,
|
||||
Ingredient ing2,
|
||||
Ingredient ing3,
|
||||
Ingredient ing4,
|
||||
ItemStack dropsCooked,
|
||||
ItemStack dropsRaw)
|
||||
{
|
||||
CraftTweakerAPI.apply(new Add(recipe_name, cookTemp, cookTime, coolTime, ing0, ing1, ing2, ing3, ing4, dropsCooked, dropsRaw) );
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(String recipe_name)
|
||||
{
|
||||
CraftTweakerAPI.apply(new Remove(recipe_name));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll()
|
||||
{
|
||||
CraftTweakerAPI.apply(new RemoveAll());
|
||||
}
|
||||
|
||||
private static class Add implements IAction
|
||||
{
|
||||
|
||||
|
||||
|
||||
private final String recipe_name;
|
||||
private final int cookTemp;
|
||||
private final int cookTime;
|
||||
private final int coolTime;
|
||||
private final Ingredient ing0, ing1, ing2, ing3, ing4;
|
||||
private final ItemStack dropsCooked;
|
||||
private final ItemStack dropsRaw;
|
||||
private boolean isDisabled, isHidden;
|
||||
|
||||
//private final List<ItemStack> ingredients;
|
||||
//private final ItemStack output;
|
||||
//private final int cook_time;
|
||||
//private boolean is_disabled, is_hidden;
|
||||
|
||||
public Add(String recipe_name, int cookTemp, int cookTime, int coolTime, Ingredient ing0, Ingredient ing1, Ingredient ing2, Ingredient ing3, Ingredient ing4,ItemStack dropsCooked, ItemStack dropsRaw)
|
||||
{
|
||||
this.recipe_name = recipe_name;
|
||||
this.cookTemp = cookTemp;
|
||||
this.cookTime = cookTime;
|
||||
this.coolTime = coolTime;
|
||||
this.ing0 = ing0;
|
||||
this.ing1 = ing1;
|
||||
this.ing2 = ing2;
|
||||
this.ing3 = ing3;
|
||||
this.ing4 =ing4;
|
||||
this.dropsCooked = dropsCooked
|
||||
this.dropsRaw = dropsRaw;
|
||||
this.isDisabled = false;
|
||||
this.isHidden = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
PrimalCore.LOGGER.info("Add CraftTweaker Recipe: " + this.recipe_name);
|
||||
CrucibleCrafting.REGISTRY.register(new CrucibleCrafting(this.cook_time, this.ingredients, this.output).setRecipeName(this.recipe_name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "[" + ModInfo.MOD_NAME + "] Adding Crafting Tweaker recipe for: " + CrucibleCrafting.RECIPE_PREFIX;
|
||||
}
|
||||
}
|
||||
|
||||
private static class Remove implements IAction
|
||||
{
|
||||
private String recipe_name;
|
||||
|
||||
public Remove(String recipe_name)
|
||||
{
|
||||
this.recipe_name = recipe_name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
CrucibleCrafting recipe = CrucibleCrafting.getRecipe(recipe_name);
|
||||
if (recipe != null && !recipe.isHidden())
|
||||
{
|
||||
PrimalCore.LOGGER.info("Remove CraftTweaker Recipe: " + recipe_name);
|
||||
recipe.setDisabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "[" + ModInfo.MOD_NAME + "] Removing Crafting Tweaker recipe for:" + CrucibleCrafting.RECIPE_PREFIX;
|
||||
}
|
||||
}
|
||||
|
||||
private static class RemoveAll implements IAction
|
||||
{
|
||||
public RemoveAll() { }
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
for (HibachiRecipe recipe : HibachiRecipe.RECIPES)
|
||||
{
|
||||
if (!recipe.isHidden())
|
||||
recipe.setDisabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "[" + ModInfo.MOD_NAME + "] Removing Crafting Tweaker recipe for:" + HibachiRecipe.RECIPE_PREFIX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,665 @@
|
||||
package nmd.primal.forgecraft.crafting.CraftingRegistery;
|
||||
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreIngredient;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.util.ToolNBT;
|
||||
|
||||
@GameRegistry.ObjectHolder(ModInfo.MOD_ID)
|
||||
@Mod.EventBusSubscriber
|
||||
public final class CrucibleCraftingRegister{
|
||||
@SubscribeEvent
|
||||
public static void registerRecipes(RegistryEvent.Register<CrucibleCrafting> event) {
|
||||
PrimalAPI.logger(7, "Registering Recipes: " + CrucibleCrafting.RECIPE_PREFIX);
|
||||
final IForgeRegistry<CrucibleCrafting> recipes = event.getRegistry();
|
||||
|
||||
/*
|
||||
ItemStack emptyAir = ItemStack.EMPTY;
|
||||
|
||||
NBTTagCompound newTag = new NBTTagCompound();
|
||||
|
||||
NBTTagCompound setHot = new NBTTagCompound();
|
||||
setHot.setBoolean("hot", true);
|
||||
|
||||
ItemStack hotBronzeIngot = new ItemStack(ModItems.bronzeingotball, 1);
|
||||
hotBronzeIngot.setTagCompound(setHot);
|
||||
ItemStack hotIronIngot = new ItemStack(ModItems.ironingotball, 1);
|
||||
hotIronIngot.setTagCompound(setHot);
|
||||
ItemStack hotCleanIronIngot = new ItemStack(ModItems.ironcleaningotball, 1);
|
||||
hotCleanIronIngot.setTagCompound(setHot);
|
||||
ItemStack hotSteelIngot = new ItemStack(ModItems.steelingotball, 1);
|
||||
hotSteelIngot.setTagCompound(setHot);
|
||||
ItemStack hotWootzIngot = new ItemStack(ModItems.wootzingotball, 1);
|
||||
hotWootzIngot.setTagCompound(setHot);
|
||||
|
||||
ItemStack hotBronzeChunk = new ItemStack( ModItems.bronzechunk, 1);
|
||||
hotBronzeChunk.setTagCompound(setHot);
|
||||
ItemStack hotChunk = new ItemStack( ModItems.wroughtironchunk, 1);
|
||||
hotChunk.setTagCompound(setHot);
|
||||
ItemStack hotCleanChunk = new ItemStack(ModItems.ironcleanchunk, 1);
|
||||
hotCleanChunk.setTagCompound(setHot);
|
||||
ItemStack hotSteelChunk = new ItemStack(ModItems.steelchunk, 1);
|
||||
hotSteelChunk.setTagCompound(setHot);
|
||||
ItemStack hotWootzChunk = new ItemStack(ModItems.wootzchunk, 1);
|
||||
hotWootzChunk.setTagCompound(setHot);
|
||||
|
||||
ItemStack diamond = new ItemStack(Items.DIAMOND, 1);
|
||||
ItemStack emerald = new ItemStack(Items.EMERALD, 1);
|
||||
|
||||
ItemStack emeraldShard = new ItemStack(PrimalAPI.Items.EMERALD_KNAPP, 1);
|
||||
ItemStack diamondShard = new ItemStack(PrimalAPI.Items.DIAMOND_KNAPP, 1);
|
||||
ItemStack redstone = new ItemStack(Items.REDSTONE, 1);
|
||||
ItemStack lapis = new ItemStack(Items.DYE, 1, 4);
|
||||
|
||||
|
||||
|
||||
ItemStack[] toolArray = new ItemStack[24];
|
||||
ItemStack[] hotToolArray = new ItemStack[16];
|
||||
|
||||
ItemStack bronzepickaxehead = new ItemStack(ModItems.bronzepickaxehead, 1);
|
||||
bronzepickaxehead.setTagCompound(newTag);
|
||||
toolArray[0] = bronzepickaxehead;
|
||||
ItemStack bronzeaxehead = new ItemStack(ModItems.bronzeaxehead, 1);
|
||||
bronzeaxehead.setTagCompound(newTag);
|
||||
toolArray[1] = bronzeaxehead;
|
||||
ItemStack bronzeshovelhead = new ItemStack(ModItems.bronzeshovelhead, 1);
|
||||
bronzeshovelhead.setTagCompound(newTag);
|
||||
toolArray[2] = bronzeshovelhead;
|
||||
ItemStack bronzehoehead = new ItemStack(ModItems.bronzehoehead, 1);
|
||||
bronzehoehead.setTagCompound(newTag);
|
||||
toolArray[3] = bronzehoehead;
|
||||
|
||||
ItemStack pickaxehead = new ItemStack(ModItems.pickaxehead, 1);
|
||||
pickaxehead.setTagCompound(newTag);
|
||||
toolArray[4] = pickaxehead;
|
||||
ItemStack ironaxehead = new ItemStack(ModItems.ironaxehead, 1);
|
||||
ironaxehead.setTagCompound(newTag);
|
||||
toolArray[5] = ironaxehead;
|
||||
ItemStack ironshovelhead = new ItemStack(ModItems.ironshovelhead, 1);
|
||||
ironshovelhead.setTagCompound(newTag);
|
||||
toolArray[6] = ironshovelhead;
|
||||
ItemStack ironhoehead = new ItemStack(ModItems.ironhoehead, 1);
|
||||
ironhoehead.setTagCompound(newTag);
|
||||
toolArray[7] = ironhoehead;
|
||||
|
||||
ItemStack cleanpickaxehead = new ItemStack(ModItems.cleanironpickaxehead, 1);
|
||||
cleanpickaxehead.setTagCompound(newTag);
|
||||
toolArray[8] = cleanpickaxehead;
|
||||
ItemStack cleanaxehead = new ItemStack(ModItems.cleanironaxehead, 1);
|
||||
cleanaxehead.setTagCompound(newTag);
|
||||
toolArray[9] = cleanaxehead;
|
||||
ItemStack cleanshovelhead = new ItemStack(ModItems.cleanironshovelhead, 1);
|
||||
cleanshovelhead.setTagCompound(newTag);
|
||||
toolArray[10] = cleanshovelhead;
|
||||
ItemStack cleanhoehead = new ItemStack(ModItems.cleanironhoehead, 1);
|
||||
cleanhoehead.setTagCompound(newTag);
|
||||
toolArray[11] =cleanhoehead ;
|
||||
|
||||
ItemStack steelpickaxehead = new ItemStack(ModItems.steelpickaxehead, 1);
|
||||
steelpickaxehead.setTagCompound(newTag);
|
||||
toolArray[12] = steelpickaxehead;
|
||||
ItemStack steelaxehead = new ItemStack(ModItems.steelaxehead, 1);
|
||||
steelaxehead.setTagCompound(newTag);
|
||||
toolArray[13] =steelaxehead ;
|
||||
ItemStack steelshovelhead = new ItemStack(ModItems.steelshovelhead, 1);
|
||||
steelshovelhead.setTagCompound(newTag);
|
||||
toolArray[14] = steelshovelhead;
|
||||
ItemStack steelhoehead = new ItemStack(ModItems.steelhoehead, 1);
|
||||
steelhoehead.setTagCompound(newTag);
|
||||
toolArray[15] =steelhoehead ;
|
||||
|
||||
ItemStack wootzpickaxehead = new ItemStack(ModItems.wootzpickaxehead, 1);
|
||||
wootzpickaxehead.setTagCompound(newTag);
|
||||
toolArray[16] = wootzpickaxehead;
|
||||
ItemStack wootzaxehead = new ItemStack(ModItems.wootzaxehead, 1);
|
||||
wootzaxehead.setTagCompound(newTag);
|
||||
toolArray[17] = wootzaxehead;
|
||||
ItemStack wootzshovelhead = new ItemStack(ModItems.wootzshovelhead, 1);
|
||||
wootzshovelhead.setTagCompound(newTag);
|
||||
toolArray[18] =wootzshovelhead ;
|
||||
ItemStack wootzhoehead = new ItemStack(ModItems.wootzhoehead, 1);
|
||||
wootzhoehead.setTagCompound(newTag);
|
||||
toolArray[19] = wootzhoehead;
|
||||
|
||||
ItemStack copperpickaxehead = new ItemStack(ModItems.copperpickaxehead, 1);
|
||||
copperpickaxehead.setTagCompound(newTag);
|
||||
toolArray[20] = copperpickaxehead;
|
||||
ItemStack copperaxehead = new ItemStack(ModItems.copperaxehead, 1);
|
||||
copperaxehead.setTagCompound(newTag);
|
||||
toolArray[21] = copperaxehead;
|
||||
ItemStack coppershovelhead = new ItemStack(ModItems.coppershovelhead, 1);
|
||||
coppershovelhead.setTagCompound(newTag);
|
||||
toolArray[22] =coppershovelhead ;
|
||||
ItemStack copperhoehead = new ItemStack(ModItems.copperhoehead, 1);
|
||||
copperhoehead.setTagCompound(newTag);
|
||||
toolArray[23] = copperhoehead;
|
||||
|
||||
ItemStack hotpickaxehead = pickaxehead.copy();
|
||||
hotToolArray[0] =hotpickaxehead;
|
||||
ItemStack hotironaxehead = ironaxehead.copy();
|
||||
hotToolArray[1] =hotironaxehead;
|
||||
ItemStack hotironshovelhead = ironshovelhead.copy();
|
||||
hotToolArray[2] =hotironshovelhead;
|
||||
ItemStack hotironhoehead = ironhoehead.copy();
|
||||
hotToolArray[3] =hotironhoehead;
|
||||
|
||||
ItemStack hotcleanpickaxehead = cleanpickaxehead.copy();
|
||||
hotToolArray[4] = hotcleanpickaxehead;
|
||||
ItemStack hotcleanaxehead = cleanaxehead.copy();
|
||||
hotToolArray[5] = hotcleanaxehead;
|
||||
ItemStack hotcleanshovelhead = cleanshovelhead.copy();
|
||||
hotToolArray[6] = hotcleanshovelhead;
|
||||
ItemStack hotcleanhoehead = cleanhoehead.copy();
|
||||
hotToolArray[7] = hotcleanhoehead;
|
||||
|
||||
ItemStack hotsteelpickaxehead = steelpickaxehead.copy();
|
||||
hotToolArray[8] = hotsteelpickaxehead;
|
||||
ItemStack hotsteelaxehead = steelaxehead.copy();
|
||||
hotToolArray[9] = hotsteelaxehead;
|
||||
ItemStack hotsteelshovelhead = steelshovelhead.copy();
|
||||
hotToolArray[10] = hotsteelshovelhead;
|
||||
ItemStack hotsteelhoehead = steelhoehead.copy();
|
||||
hotToolArray[11] = hotsteelhoehead;
|
||||
|
||||
ItemStack hotwootzpickaxehead = wootzpickaxehead.copy();
|
||||
hotToolArray[12] = hotwootzpickaxehead;
|
||||
ItemStack hotwootzaxehead = wootzaxehead.copy();
|
||||
hotToolArray[13] = hotwootzaxehead;
|
||||
ItemStack hotwootzshovelhead = wootzshovelhead.copy();
|
||||
hotToolArray[14] = hotwootzshovelhead;
|
||||
ItemStack hotwootzhoehead = wootzhoehead.copy();
|
||||
hotToolArray[15] = hotwootzhoehead;
|
||||
|
||||
|
||||
|
||||
for(ItemStack temp : toolArray) {
|
||||
NBTTagCompound tags = temp.getTagCompound();
|
||||
tags.setTag("tags", tags);
|
||||
|
||||
tags.getCompoundTag("tags").setBoolean("hot", false);
|
||||
tags.getCompoundTag("tags").setBoolean("emerald", false);
|
||||
tags.getCompoundTag("tags").setInteger("diamond", 0);
|
||||
tags.getCompoundTag("tags").setInteger("redstone", 0);
|
||||
tags.getCompoundTag("tags").setInteger("lapis", 0);
|
||||
tags.getCompoundTag("tags").setInteger("modifiers", 0);
|
||||
temp.setTagCompound(tags);
|
||||
}
|
||||
|
||||
bronzepickaxehead = toolArray[0];
|
||||
bronzeaxehead = toolArray[1];
|
||||
bronzeshovelhead = toolArray[2];
|
||||
bronzehoehead = toolArray[3];
|
||||
|
||||
pickaxehead = toolArray[4];
|
||||
ironaxehead = toolArray[5];
|
||||
ironshovelhead = toolArray[6];
|
||||
ironhoehead = toolArray[7];
|
||||
|
||||
cleanpickaxehead = toolArray[8];
|
||||
cleanaxehead = toolArray[9];
|
||||
cleanshovelhead = toolArray[10];
|
||||
cleanhoehead = toolArray[11];
|
||||
|
||||
steelpickaxehead = toolArray[12] ;
|
||||
steelaxehead = toolArray[13] ;
|
||||
steelshovelhead = toolArray[14];
|
||||
steelhoehead = toolArray[15] ;
|
||||
|
||||
wootzpickaxehead = toolArray[16];
|
||||
wootzaxehead = toolArray[17];
|
||||
wootzshovelhead = toolArray[18] ;
|
||||
wootzhoehead = toolArray[19];
|
||||
|
||||
copperpickaxehead = toolArray[20];
|
||||
copperaxehead = toolArray[21];
|
||||
coppershovelhead = toolArray[22];
|
||||
copperhoehead = toolArray[23];
|
||||
|
||||
for(ItemStack temp : hotToolArray) {
|
||||
//NBTTagCompound newTag = new NBTTagCompound();
|
||||
NBTTagCompound tags = new NBTTagCompound();
|
||||
|
||||
//temp.setTagCompound(newTag);
|
||||
temp.getTagCompound().setTag("tags", tags);
|
||||
|
||||
temp.getTagCompound().setTag("tags", tags);
|
||||
temp.getSubCompound("tags").setBoolean("hot", true);
|
||||
temp.getSubCompound("tags").setBoolean("emerald", false);
|
||||
temp.getSubCompound("tags").setInteger("diamond", 0);
|
||||
temp.getSubCompound("tags").setInteger("redstone", 0);
|
||||
temp.getSubCompound("tags").setInteger("lapis", 0);
|
||||
temp.getSubCompound("tags").setInteger("modifiers", 0);
|
||||
}
|
||||
|
||||
hotpickaxehead = hotToolArray[0];
|
||||
hotironaxehead = hotToolArray[1];
|
||||
hotironshovelhead = hotToolArray[2];
|
||||
hotironhoehead = hotToolArray[3];
|
||||
|
||||
hotcleanpickaxehead = hotToolArray[4];
|
||||
hotcleanaxehead = hotToolArray[5];
|
||||
hotcleanshovelhead = hotToolArray[6];
|
||||
hotcleanhoehead = hotToolArray[7];
|
||||
|
||||
hotsteelpickaxehead = hotToolArray[8] ;
|
||||
hotsteelaxehead = hotToolArray[9] ;
|
||||
hotsteelshovelhead = hotToolArray[10];
|
||||
hotsteelhoehead = hotToolArray[11] ;
|
||||
|
||||
hotwootzpickaxehead = hotToolArray[12];
|
||||
hotwootzaxehead = hotToolArray[13];
|
||||
hotwootzshovelhead = hotToolArray[14] ;
|
||||
hotwootzhoehead = hotToolArray[15];
|
||||
*/
|
||||
//RecipeHandler.addSmelting(ModItems.softcrucible, new ItemStack(ModBlocks.nbtCrucible, 1));
|
||||
|
||||
/***********************/
|
||||
/***CRUCIBLE CRAFTING***/
|
||||
/***********************/
|
||||
|
||||
recipes.register (new CrucibleCrafting(
|
||||
new OreIngredient("oreIron"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(Blocks.IRON_ORE, 1),
|
||||
new ItemStack(ModItems.ironingotball, 1),
|
||||
1400,
|
||||
1200,
|
||||
800).setRecipeName("wroughtIron"));
|
||||
|
||||
recipes.register (new CrucibleCrafting(
|
||||
new OreIngredient("dustIron"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(Blocks.IRON_ORE, 1),
|
||||
new ItemStack(ModItems.ironingotball, 1),
|
||||
1250,
|
||||
1100,
|
||||
800).setRecipeName("wroughtIron"));
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.brokenwroughtirontool, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
new ItemStack(ModItems.ironingotball, 1),
|
||||
1250,
|
||||
1100,
|
||||
800);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("dustIron"),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CARBONATE_SLACK, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.IRON_DUST, 1),
|
||||
new ItemStack(ModItems.ironcleaningotball, 1),
|
||||
1550,
|
||||
1200,
|
||||
800);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.brokencleanirontool, 1)),
|
||||
new OreIngredient("nuggetIron"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
new ItemStack(ModItems.ironcleaningotball, 1),
|
||||
1550,
|
||||
1200,
|
||||
800);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.ironcleaningotball, 1)),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_HIGH, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(ModItems.ironcleaningotball, 1),
|
||||
new ItemStack(ModItems.steelingotball, 1),
|
||||
2100,
|
||||
1500,
|
||||
1000);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.brokensteeltool, 1)),
|
||||
new OreIngredient("nuggetSteel"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
new ItemStack(ModItems.steelingotball, 1),
|
||||
2100,
|
||||
1500,
|
||||
1000);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("dustMagnetite"),
|
||||
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1,BlockPlanks.EnumType.JUNGLE.getMetadata())),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
||||
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
||||
new ItemStack(PrimalAPI.Blocks.ORE_MAGNETITE, 1),
|
||||
new ItemStack(ModItems.wootzingotball, 1),
|
||||
2100,
|
||||
1800,
|
||||
1500);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("magnetite"),
|
||||
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
||||
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
||||
new ItemStack(PrimalAPI.Blocks.ORE_MAGNETITE, 1),
|
||||
new ItemStack(ModItems.wootzingotball, 1),
|
||||
2100,
|
||||
1800,
|
||||
1500);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.brokenwootztool, 1)),
|
||||
new OreIngredient("nuggetWootz"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
new ItemStack(ModItems.wootzingotball, 1),
|
||||
2100,
|
||||
1800,
|
||||
1500);
|
||||
|
||||
/***BRONZE***/
|
||||
NBTTagCompound tagBronzeDefault = new NBTTagCompound();
|
||||
tagBronzeDefault.setString("upgrades", "");
|
||||
tagBronzeDefault.setBoolean("hot", false);
|
||||
ItemStack defaultBronze = new ItemStack(ModItems.bronzeingotball, 1);
|
||||
defaultBronze.setTagCompound(tagBronzeDefault.copy());
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustTin"),
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
defaultBronze,
|
||||
1100,
|
||||
800,
|
||||
600);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("ingotBronze"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
defaultBronze,
|
||||
1100,
|
||||
800,
|
||||
600);
|
||||
|
||||
ItemStack redBronze = defaultBronze.copy();
|
||||
redBronze.getTagCompound().setString("upgrades", "redstone");
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("ingotBronze"),
|
||||
new OreIngredient("dustRedstone"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
redBronze,
|
||||
1100,
|
||||
800,
|
||||
600);
|
||||
|
||||
ItemStack diamondBronze = defaultBronze.copy();
|
||||
diamondBronze.getTagCompound().setString("upgrades", "diamond");
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("ingotBronze"),
|
||||
new OreIngredient("flakeDiamond"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
diamondBronze,
|
||||
1100,
|
||||
800,
|
||||
600);
|
||||
|
||||
ItemStack emeraldBronze = defaultBronze.copy();
|
||||
emeraldBronze.getTagCompound().setString("upgrades", "emerald");
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("ingotBronze"),
|
||||
new OreIngredient("flakeEmerald"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
emeraldBronze,
|
||||
1100,
|
||||
800,
|
||||
600);
|
||||
|
||||
ItemStack lapisBronze = defaultBronze.copy();
|
||||
lapisBronze.getTagCompound().setString("upgrades", "lapis");
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("ingotBronze"),
|
||||
new OreIngredient("gemLapis"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
lapisBronze,
|
||||
1100,
|
||||
800,
|
||||
600);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustTin"),
|
||||
new OreIngredient("dustRedstone"),
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
redBronze,
|
||||
1100,
|
||||
800,
|
||||
600);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustTin"),
|
||||
new OreIngredient("flakeDiamond"),
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
diamondBronze,
|
||||
1100,
|
||||
800,
|
||||
600);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustTin"),
|
||||
new OreIngredient("flakeEmerald"),
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
emeraldBronze,
|
||||
1100,
|
||||
800,
|
||||
600);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustCopper"),
|
||||
new OreIngredient("dustTin"),
|
||||
new OreIngredient("gemLapis"),
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
lapisBronze,
|
||||
1100,
|
||||
800,
|
||||
600);
|
||||
|
||||
|
||||
/***COPPER***/
|
||||
NBTTagCompound tagCopperDefault = new NBTTagCompound();
|
||||
tagCopperDefault.setString("upgrades", "");
|
||||
tagCopperDefault.setBoolean("hot", false);
|
||||
ItemStack defaultCopper = new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1);
|
||||
defaultCopper.setTagCompound(tagCopperDefault.copy());
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("oreCopper"),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CARBONATE_SLACK, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
defaultCopper,
|
||||
900,
|
||||
800,
|
||||
600);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("ingotCopper"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
defaultCopper,
|
||||
900,
|
||||
750,
|
||||
550);
|
||||
|
||||
ItemStack redCopper = defaultCopper.copy();
|
||||
redCopper.getTagCompound().setString("upgrades", "redstone");
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("ingotCopper"),
|
||||
new OreIngredient("dustRedstone"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
redCopper,
|
||||
900,
|
||||
750,
|
||||
550);
|
||||
|
||||
ItemStack diamondCopper = defaultCopper.copy();
|
||||
diamondCopper.getTagCompound().setString("upgrades", "diamond");
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("ingotCopper"),
|
||||
new OreIngredient("flakeDiamond"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
diamondCopper,
|
||||
900,
|
||||
750,
|
||||
550);
|
||||
|
||||
ItemStack emeraldCopper = defaultCopper.copy();
|
||||
emeraldCopper.getTagCompound().setString("upgrades", "emerald");
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("ingotCopper"),
|
||||
new OreIngredient("flakeEmerald"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
emeraldCopper,
|
||||
900,
|
||||
750,
|
||||
550);
|
||||
|
||||
ItemStack lapisCopper = defaultCopper.copy();
|
||||
lapisCopper.getTagCompound().setString("upgrades", "lapis");
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("ingotCopper"),
|
||||
new OreIngredient("gemLapis"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
lapisCopper,
|
||||
900,
|
||||
750,
|
||||
550);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("oreCopper"),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CARBONATE_SLACK, 1)),
|
||||
new OreIngredient("dustRedstone"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
redCopper,
|
||||
900,
|
||||
750,
|
||||
550);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("oreCopper"),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CARBONATE_SLACK, 1)),
|
||||
new OreIngredient("flakeDiamond"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
diamondCopper,
|
||||
900,
|
||||
750,
|
||||
550);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("oreCopper"),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CARBONATE_SLACK, 1)),
|
||||
new OreIngredient("flakeEmerald"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
emeraldCopper,
|
||||
900,
|
||||
750,
|
||||
550);
|
||||
|
||||
CrucibleCrafting.addRecipe(
|
||||
new OreIngredient("oreCopper"),
|
||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CARBONATE_SLACK, 1)),
|
||||
new OreIngredient("gemLapis"),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new ItemStack(PrimalAPI.Items.SLAG, 1),
|
||||
lapisCopper,
|
||||
900,
|
||||
750,
|
||||
550);
|
||||
|
||||
|
||||
}
|
||||
@@ -2,22 +2,27 @@ package nmd.primal.forgecraft.crafting;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.core.common.recipes.AbstractRecipe;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 11/11/17.
|
||||
*/
|
||||
public class CrucibleCrafting { //extends AbstractCrafting<CrucibleCrafting> {
|
||||
public class CrucibleCrafting extends AbstractRecipe<CrucibleCrafting> { //extends AbstractCrafting<CrucibleCrafting> {
|
||||
|
||||
// ***************************************************************************** //
|
||||
// Recipe Handler CrucibleHandler
|
||||
// ***************************************************************************** //
|
||||
|
||||
//public static final String RECIPE_PREFIX = "crucible";
|
||||
//public static final IForgeRegistry<CrucibleCrafting> REGISTRY = ModInfo.Registries.CRUCIBLE_CRAFTINGS;
|
||||
//public static final Collection<CrucibleCrafting> RECIPES = REGISTRY.getValuesCollection();
|
||||
public static final String RECIPE_PREFIX = "crucible";
|
||||
public static final IForgeRegistry<CrucibleCrafting> REGISTRY = ModInfo.Registries.CRUCIBLE_CRAFTINGS;
|
||||
public static final Collection<CrucibleCrafting> RECIPES = REGISTRY.getValuesCollection();
|
||||
|
||||
public static ArrayList<CrucibleCrafting> getCrucibleCrafting() {
|
||||
return crucibleCrafting;
|
||||
@@ -91,7 +96,7 @@ public class CrucibleCrafting { //extends AbstractCrafting<CrucibleCrafting> {
|
||||
public CrucibleCrafting(Ingredient i0, Ingredient i1, Ingredient i2, Ingredient i3, Ingredient i4,
|
||||
ItemStack outputRaw, ItemStack outputCooked,
|
||||
Integer temp, Integer cookTime, Integer coolTime){
|
||||
//super();
|
||||
super();
|
||||
this.ing0 = i0;
|
||||
this.ing1 = i1;
|
||||
this.ing2 = i2;
|
||||
@@ -168,18 +173,16 @@ public class CrucibleCrafting { //extends AbstractCrafting<CrucibleCrafting> {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/// forge registries require a unique REGISTRY_NAME ///
|
||||
|
||||
|
||||
@Override
|
||||
public String getRecipePrefix()
|
||||
{
|
||||
return RECIPE_PREFIX;
|
||||
public Collection<CrucibleCrafting> getRecipes() {
|
||||
return RECIPES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<CrucibleCrafting> getRecipes()
|
||||
{
|
||||
return RECIPES;
|
||||
public String getRecipePrefix() {
|
||||
return RECIPE_PREFIX;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,11 +190,9 @@ public class CrucibleCrafting { //extends AbstractCrafting<CrucibleCrafting> {
|
||||
* @param recipe_name basic recipe name, no prefix or mod id
|
||||
* @return Recipe object
|
||||
*/
|
||||
/*
|
||||
@Nullable
|
||||
public static CrucibleCrafting getRecipe(String recipe_name)
|
||||
{
|
||||
return REGISTRY.getValue(getFullRecipeName(RECIPE_PREFIX, recipe_name));
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user