Removed unnecessary things from the OreDictionary by adding recipes for the Reconstructor and the Crusher that don't use it.

Also added green dye.
This commit is contained in:
Ellpeck 2015-12-01 23:23:55 +01:00
parent f8eaeb493f
commit 910a1e7fbe
12 changed files with 285 additions and 266 deletions

View file

@ -102,7 +102,7 @@ public class InitBooklet{
//RF Using Blocks
new BookletChapter("laserRelays", entryFunctionalRF, new ItemStack(InitBlocks.blockLaserRelay), new PageTextOnly(1).addTextReplacement("<range>", TileEntityLaserRelay.MAX_DISTANCE).addTextReplacement("<loss>", ConfigIntValues.LASER_RELAY_LOSS.getValue()), new PagePicture(2, "pageLaserRelay", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLaserRelay).setNoText(), new PageCrafting(4, ItemCrafting.recipeLaserWrench).setNoText()).setImportant();
new BookletChapterCoffee("coffeeMachine", entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("<rf>", TileEntityCoffeeMachine.ENERGY_USED).addTextReplacement("<coffee>", TileEntityCoffeeMachine.CACHE_USE).addTextReplacement("<water>", TileEntityCoffeeMachine.WATER_USE), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemCoffee)), new PagePicture(3, "pageCoffeeMachine", 115), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setNoText(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()).setImportant();
new BookletChapterCrusher("crusher", entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1).addTextReplacement("<rf1>", TileEntityGrinder.getEnergyUse(false)).addTextReplacement("<rf2>", TileEntityGrinder.getEnergyUse(true)), new PageCrafting(2, BlockCrafting.recipeCrusher).setNoText(), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher).setNoText(), new PageCrusherRecipe(4, CrusherCrafting.recipeSugar).setNoText(), new PageCrusherRecipe(5, CrusherCrafting.recipeIronHorseArmor).setNoText(), new PageCrusherRecipe(6, CrusherCrafting.recipeGoldHorseArmor).setNoText(), new PageCrusherRecipe(7, CrusherCrafting.recipeDiamondHorseArmor).setNoText());
new BookletChapterCrusher("crusher", entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1).addTextReplacement("<rf1>", TileEntityGrinder.getEnergyUse(false)).addTextReplacement("<rf2>", TileEntityGrinder.getEnergyUse(true)), new PageCrafting(2, BlockCrafting.recipeCrusher).setNoText(), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher).setNoText(), new PageCrusherRecipe(4, CrusherCrafting.recipeIronHorseArmor).setNoText(), new PageCrusherRecipe(5, CrusherCrafting.recipeGoldHorseArmor).setNoText(), new PageCrusherRecipe(6, CrusherCrafting.recipeDiamondHorseArmor).setNoText());
new BookletChapter("furnaceDouble", entryFunctionalRF, new ItemStack(InitBlocks.blockFurnaceDouble), new PageCrafting(1, BlockCrafting.recipeFurnace).addTextReplacement("<rf>", TileEntityFurnaceDouble.ENERGY_USE));
new BookletChapter("lavaFactory", entryFunctionalRF, new ItemStack(InitBlocks.blockLavaFactoryController), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityLavaFactoryController.ENERGY_USE), new PagePicture(2, "pageLavaFactory", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLavaFactory).setNoText(), new PageCrafting(4, BlockCrafting.recipeCasing).setNoText());
new BookletChapter("energizer", entryFunctionalRF, new ItemStack(InitBlocks.blockEnergizer), new PageCrafting(1, BlockCrafting.recipeEnergizer), new PageCrafting(2, BlockCrafting.recipeEnervator));

View file

@ -21,7 +21,6 @@ import ellpeck.actuallyadditions.util.StringUtil;
import ellpeck.actuallyadditions.util.Util;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
import java.util.List;
@ -44,13 +43,13 @@ public class PageReconstructor extends BookletPage{
@Override
public ItemStack[] getItemStacksForPage(){
if(this.recipes != null){
ItemStack[] stacks = new ItemStack[this.recipes.length];
for(int i = 0; i < this.recipes.length; i++){
if(this.recipes[i] != null){
stacks[i] = this.recipes[i].getFirstOutput();
ArrayList<ItemStack> stacks = new ArrayList<ItemStack>();
for(ReconstructorRecipeHandler.Recipe recipe : this.recipes){
if(recipe != null){
stacks.addAll(recipe.getOutputs());
}
}
return stacks;
return stacks.toArray(new ItemStack[stacks.size()]);
}
return null;
}
@ -91,20 +90,24 @@ public class PageReconstructor extends BookletPage{
renderItem(gui, new ItemStack(InitBlocks.blockAtomicReconstructor), gui.guiLeft+37+22, gui.guiTop+20+21, 1.0F);
for(int i = 0; i < 2; i++){
for(int x = 0; x < 2; x++){
ItemStack stack = x == 0 ? this.getInputForRecipe(recipe) : recipe.getFirstOutput();
if(stack.getItemDamage() == Util.WILDCARD){
stack.setItemDamage(0);
}
boolean tooltip = i == 1;
List<ItemStack> stacks = x == 0 ? recipe.getInputs() : recipe.getOutputs();
if(stacks != null && !stacks.isEmpty()){
ItemStack stack = stacks.get(0);
int xShow = gui.guiLeft+37+1+x*42;
int yShow = gui.guiTop+20+21;
if(!tooltip){
renderItem(gui, stack, xShow, yShow, 1.0F);
}
else{
if(mouseX >= xShow && mouseX <= xShow+16 && mouseY >= yShow && mouseY <= yShow+16){
this.renderTooltipAndTransfer(gui, stack, mouseX, mouseY, x == 0, mousePressed);
if(stack.getItemDamage() == Util.WILDCARD){
stack.setItemDamage(0);
}
boolean tooltip = i == 1;
int xShow = gui.guiLeft+37+1+x*42;
int yShow = gui.guiTop+20+21;
if(!tooltip){
renderItem(gui, stack, xShow, yShow, 1.0F);
}
else{
if(mouseX >= xShow && mouseX <= xShow+16 && mouseY >= yShow && mouseY <= yShow+16){
this.renderTooltipAndTransfer(gui, stack, mouseX, mouseY, x == 0, mousePressed);
}
}
}
}
@ -124,14 +127,4 @@ public class PageReconstructor extends BookletPage{
}
}
}
private ItemStack getInputForRecipe(ReconstructorRecipeHandler.Recipe recipe){
List<ItemStack> stacks = OreDictionary.getOres(recipe.input, false);
if(stacks != null && !stacks.isEmpty() && stacks.get(0) != null){
ItemStack copy = stacks.get(0).copy();
copy.stackSize = 1;
return copy;
}
return null;
}
}

View file

@ -16,6 +16,7 @@ import ellpeck.actuallyadditions.blocks.InitBlocks;
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
import ellpeck.actuallyadditions.config.values.ConfigCrafting;
import ellpeck.actuallyadditions.items.InitItems;
import ellpeck.actuallyadditions.items.metalists.TheCrystals;
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops;
import ellpeck.actuallyadditions.util.Util;
@ -125,7 +126,7 @@ public class BlockCrafting{
"OBO", "RCR", "OBO",
'B', new ItemStack(Blocks.redstone_block),
'O', new ItemStack(Blocks.obsidian),
'R', "crystalRed",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLaserRelay = Util.GetRecipes.lastIRecipe();
}
@ -137,7 +138,7 @@ public class BlockCrafting{
'E', new ItemStack(Items.ender_pearl),
'H', new ItemStack(Blocks.hopper),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'A', "crystalBlack"));
'A', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal())));
recipeRangedCollector = Util.GetRecipes.lastIRecipe();
}
@ -145,7 +146,7 @@ public class BlockCrafting{
if(ConfigCrafting.DIRECTIONAL_BREAKER.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDirectionalBreaker),
"BBB", " C ",
'C', "crystalBlack",
'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()),
'B', new ItemStack(InitBlocks.blockBreaker)));
recipeDirectionalBreaker = Util.GetRecipes.lastIRecipe();
}
@ -173,7 +174,7 @@ public class BlockCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockXPSolidifier),
"XXX", "DCD", "XXX",
'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()),
'D', "blockCrystalLightBlue",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeSolidifier = Util.GetRecipes.lastIRecipe();
}
@ -212,7 +213,7 @@ public class BlockCrafting{
"WSW", "SRS", "WSW",
'W', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()),
'S', "crystalLightBlue"));
'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal())));
recipeEnderCase = Util.GetRecipes.lastIRecipe();
}
@ -220,8 +221,8 @@ public class BlockCrafting{
if(ConfigCrafting.PHANTOM_BOOSTER.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomBooster),
"RDR", "DCD", "RDR",
'R', "crystalRed",
'D', "crystalLightBlue",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())));
recipePhantomBooster = Util.GetRecipes.lastIRecipe();
}
@ -230,7 +231,7 @@ public class BlockCrafting{
if(ConfigCrafting.COFFEE_MACHINE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCoffeeMachine),
" C ", " S ", "AMA",
'M', "crystalBlack",
'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()),
'C', InitItems.itemCoffeeBean,
'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())));
@ -241,7 +242,7 @@ public class BlockCrafting{
if(ConfigCrafting.ENERGIZER.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEnergizer),
"I I", "CAC", "I I",
'I', "crystalRed",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal())));
recipeEnergizer = Util.GetRecipes.lastIRecipe();
@ -251,7 +252,7 @@ public class BlockCrafting{
if(ConfigCrafting.ENERVATOR.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEnervator),
" I ", "CAC", " I ",
'I', "crystalRed",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal())));
recipeEnervator = Util.GetRecipes.lastIRecipe();
@ -263,7 +264,7 @@ public class BlockCrafting{
"SCS", "ISI", "LLL",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'I', "blockCrystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'L', Items.lava_bucket));
recipeLavaFactory = Util.GetRecipes.lastIRecipe();
}
@ -273,7 +274,7 @@ public class BlockCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 32, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal()),
"ICI",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'I', "blockCrystalWhite"));
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())));
recipeCasing = Util.GetRecipes.lastIRecipe();
}
@ -282,7 +283,7 @@ public class BlockCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCanolaPress),
"CHC", "CDC", "CRC",
'C', "cobblestone",
'H', "crystalWhite",
'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())));
recipeCanolaPress = Util.GetRecipes.lastIRecipe();
@ -293,7 +294,7 @@ public class BlockCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFermentingBarrel),
"CHC", "CDC", "CRC",
'C', "logWood",
'H', "crystalWhite",
'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())));
recipeFermentingBarrel = Util.GetRecipes.lastIRecipe();
@ -303,7 +304,7 @@ public class BlockCrafting{
if(ConfigCrafting.PHANTOMFACE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomface),
" C ", "EBE", " S ",
'E', "crystalLightBlue",
'E', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', Blocks.chest,
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal())));
@ -330,7 +331,7 @@ public class BlockCrafting{
if(ConfigCrafting.PHANTOM_ENERGYFACE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomEnergyface),
" R ", "RFR", " R ",
'R', "crystalRed",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'F', InitBlocks.blockPhantomface));
recipeEnergyface = Util.GetRecipes.lastIRecipe();
}
@ -386,8 +387,8 @@ public class BlockCrafting{
if(ConfigCrafting.LEAF_GENERATOR.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLeafGenerator),
"IEI", "GLG", "ICI",
'I', "crystalWhite",
'G', "crystalRed",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'G', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'L', "treeLeaves",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
@ -422,7 +423,7 @@ public class BlockCrafting{
if(ConfigCrafting.FISHING_NET.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFishingNet),
"SSS", "SDS", "SSS",
'D', "crystalLightBlue",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'S', Items.string));
recipeFisher = Util.GetRecipes.lastIRecipe();
}
@ -431,8 +432,8 @@ public class BlockCrafting{
if(ConfigCrafting.REPAIRER.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockItemRepairer),
"DID", "OCO", "DID",
'D', "blockCrystalLightBlue",
'I', "crystalWhite",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())));
recipeRepairer = Util.GetRecipes.lastIRecipe();
@ -442,8 +443,8 @@ public class BlockCrafting{
if(ConfigCrafting.SOLAR_PANEL.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceSolar),
"IQI", "CDC", "IBI",
'D', "blockCrystalLightBlue",
'I', "crystalWhite",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(Blocks.iron_bars)));
@ -454,7 +455,7 @@ public class BlockCrafting{
if(ConfigCrafting.HEAT_COLLECTOR.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockHeatCollector),
"BRB", "CDC", "BQB",
'D', "crystalWhite",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'R', new ItemStack(Items.repeater),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'L', new ItemStack(Items.lava_bucket),
@ -481,14 +482,14 @@ public class BlockCrafting{
"WWW", "CHC", "WWW",
'W', "plankWood",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'H', "crystalWhite"));
'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())));
recipeESD = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockInputterAdvanced),
InitBlocks.blockInputter,
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
"crystalRed"));
new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())));
recipeAdvancedESD = Util.GetRecipes.lastIRecipe();
}
@ -496,7 +497,7 @@ public class BlockCrafting{
if(ConfigCrafting.CRUSHER.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinder),
"MFC", "DQD", "CFM",
'M', "crystalRed",
'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
@ -525,7 +526,7 @@ public class BlockCrafting{
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', new ItemStack(Blocks.furnace),
'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'P', "crystalWhite"));
'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())));
recipeFurnace = Util.GetRecipes.lastIRecipe();
}
@ -555,7 +556,7 @@ public class BlockCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGreenhouseGlass, 3),
"GSG", "SDS", "GSG",
'G', "blockGlass",
'D', "blockCrystalBlue",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()),
'S', "treeSapling"));
recipeGlass = Util.GetRecipes.lastIRecipe();
}
@ -566,7 +567,7 @@ public class BlockCrafting{
"CCC", "CRP", "CCC",
'C', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'P', "blockCrystalBlue"));
'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal())));
recipePlacer = Util.GetRecipes.lastIRecipe();
}
@ -576,7 +577,7 @@ public class BlockCrafting{
"CCC", "CRP", "CCC",
'C', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'P', "blockCrystalBlack"));
'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal())));
recipeBreaker = Util.GetRecipes.lastIRecipe();
}
@ -584,7 +585,7 @@ public class BlockCrafting{
if(ConfigCrafting.DROPPER.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDropper),
"CBC", "CDR", "CBC",
'B', "crystalBlue",
'B', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', "cobblestone",
'D', Blocks.dropper,
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
@ -595,7 +596,7 @@ public class BlockCrafting{
for(int i = 0; i < BlockColoredLamp.allLampTypes.length; i++){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockColoredLamp, 6, i),
"GCG", "DQD", "GCG",
'C', "crystalBlue",
'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'G', "glowstone",
'D', "dye"+BlockColoredLamp.allLampTypes[i].name,
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
@ -604,7 +605,7 @@ public class BlockCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4),
"XXX", "XLX", "XXX",
'X', "crystalRed",
'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'L', new ItemStack(InitBlocks.blockColoredLamp, 1, Util.WILDCARD)));
recipePowerer = Util.GetRecipes.lastIRecipe();
}

View file

@ -11,15 +11,19 @@
package ellpeck.actuallyadditions.crafting;
import ellpeck.actuallyadditions.config.values.ConfigCrafting;
import ellpeck.actuallyadditions.items.InitItems;
import ellpeck.actuallyadditions.items.metalists.TheFoods;
import ellpeck.actuallyadditions.recipe.CrusherRecipeRegistry;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.Util;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import java.util.ArrayList;
public class CrusherCrafting{
public static CrusherRecipeRegistry.CrusherRecipe recipeSugar;
public static CrusherRecipeRegistry.CrusherRecipe recipeIronHorseArmor;
public static CrusherRecipeRegistry.CrusherRecipe recipeGoldHorseArmor;
public static CrusherRecipeRegistry.CrusherRecipe recipeDiamondHorseArmor;
@ -28,38 +32,38 @@ public class CrusherCrafting{
public static void init(){
ModUtil.LOGGER.info("Initializing Crusher Recipes...");
CrusherRecipeRegistry.addRecipe("itemBone", "boneMeal", 6);
CrusherRecipeRegistry.addRecipe(new ItemStack(Items.bone), new ItemStack(Items.dye, 6, 15));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("sugarCane", "sugar", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Items.reeds), new ItemStack(Items.sugar, 3));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerDandelion", "dyeYellow", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.yellow_flower), new ItemStack(Items.dye, 3, 11));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerPoppy", "dyeRed", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.red_flower, 1, 0), new ItemStack(Items.dye, 3, 1));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerOrchid", "dyeLightBlue", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.red_flower, 1, 1), new ItemStack(Items.dye, 3, 12));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerAllium", "dyeMagenta", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.red_flower, 1, 2), new ItemStack(Items.dye, 3, 13));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerBluet", "dyeLightGray", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.red_flower, 1, 3), new ItemStack(Items.dye, 3, 7));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerRedTulip", "dyeRed", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.red_flower, 1, 4), new ItemStack(Items.dye, 3, 1));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerOrangeTulip", "dyeOrange", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.red_flower, 1, 5), new ItemStack(Items.dye, 3, 14));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerWhiteTulip", "dyeLightGray", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.red_flower, 1, 6), new ItemStack(Items.dye, 3, 7));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerPinkTulip", "dyePink", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.red_flower, 1, 7), new ItemStack(Items.dye, 3, 9));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerDaisy", "dyeLightGray", 3);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.red_flower, 1, 8), new ItemStack(Items.dye, 3, 7));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerSunflower", "dyeYellow", 4);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.double_plant, 1, 0), new ItemStack(Items.dye, 4, 11));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerLilac", "dyeMagenta", 4);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.double_plant, 1, 1), new ItemStack(Items.dye, 4, 13));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerRoseBush", "dyeRed", 4);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.double_plant, 1, 4), new ItemStack(Items.dye, 4, 1));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("flowerPeony", "dyePink", 4);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.double_plant, 1, 5), new ItemStack(Items.dye, 4, 9));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("oreRedstone", "dustRedstone", 10);
@ -69,22 +73,23 @@ public class CrusherCrafting{
CrusherRecipeRegistry.addRecipe("blockCoal", "coal", 9);
CrusherRecipeRegistry.addRecipe("oreQuartz", "gemQuartz", 3);
CrusherRecipeRegistry.addRecipe("cobblestone", "sand", 1);
CrusherRecipeRegistry.addRecipe("gravel", "flint", 1);
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.gravel), new ItemStack(Items.flint), new ItemStack(Items.flint), 50);
CrusherRecipeRegistry.addRecipe("stone", "cobblestone", 1);
CrusherRecipeRegistry.addRecipe("cropRice", "sugar", 2);
recipeSugar = Util.GetRecipes.lastCrusherRecipe();
CrusherRecipeRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.sugar, 1, 2));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("oreNickel", "dustNickel", 2, "dustPlatinum", 1, 15);
CrusherRecipeRegistry.addRecipe("oreIron", "dustIron", 2, "dustGold", 1, 20);
if(ConfigCrafting.HORSE_ARMORS.isEnabled()){
CrusherRecipeRegistry.addRecipe("armorHorseIron", "dustIron", 8);
CrusherRecipeRegistry.addRecipe(new ItemStack(Items.iron_horse_armor), "dustIron", 8);
recipeIronHorseArmor = Util.GetRecipes.lastCrusherRecipe();
CrusherRecipeRegistry.addRecipe("armorHorseGold", "dustGold", 8);
CrusherRecipeRegistry.addRecipe(new ItemStack(Items.golden_horse_armor), "dustGold", 8);
recipeGoldHorseArmor = Util.GetRecipes.lastCrusherRecipe();
CrusherRecipeRegistry.addRecipe("armorHorseDiamond", "dustDiamond", 8);
CrusherRecipeRegistry.addRecipe(new ItemStack(Items.diamond_horse_armor), "dustDiamond", 8);
recipeDiamondHorseArmor = Util.GetRecipes.lastCrusherRecipe();
}

View file

@ -114,7 +114,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLaserWrench),
"C ", " S ", " S",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'S', "crystalWhite"));
'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())));
recipeLaserWrench = Util.GetRecipes.lastIRecipe();
}
@ -138,7 +138,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlower),
" F", "IP", "IC",
'F', new ItemStack(Items.flint),
'I', "crystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'P', new ItemStack(Blocks.piston),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLeafBlower = Util.GetRecipes.lastIRecipe();
@ -149,10 +149,10 @@ public class ItemCrafting{
ItemStack lightBlueDrill = new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal());
GameRegistry.addRecipe(new ShapedOreRecipe(lightBlueDrill.copy(),
"DDD", "CRC", "III",
'D', "crystalLightBlue",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()),
'I', "blockCrystalWhite"));
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())));
recipeDrill = Util.GetRecipes.lastIRecipe();
for(int i = 0; i < 16; i++){
@ -168,8 +168,8 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()),
"ICI", "CRC", "ICI",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', "crystalRed",
'I', "blockCrystalWhite"));
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())));
recipeDrillCore = Util.GetRecipes.lastIRecipe();
}
@ -177,7 +177,7 @@ public class ItemCrafting{
if(ConfigCrafting.TELE_STAFF.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemTeleStaff),
" FE", " S ", "SB ",
'F', "crystalLightBlue",
'F', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()),
'B', new ItemStack(InitItems.itemBattery, 1, Util.WILDCARD)));
@ -188,23 +188,23 @@ public class ItemCrafting{
if(ConfigCrafting.DRILL_SPEED.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeed),
"ISI", "SRS", "ISI",
'I', "crystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'S', Items.sugar,
'R', "crystalRed"));
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())));
recipeDrillSpeedI = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedII),
"ISI", "SCS", "ISI",
'I', "crystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'S', Items.sugar,
'C', Items.cake));
recipeDrillSpeedII = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedIII),
"ISI", "SFS", "ISI",
'I', "crystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'S', Items.sugar,
'F', "crystalLightBlue"));
'F', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal())));
recipeDrillSpeedIII = Util.GetRecipes.lastIRecipe();
}
@ -214,13 +214,13 @@ public class ItemCrafting{
"ISI", "SRS", "ISI",
'I', Blocks.glowstone,
'S', Items.redstone,
'R', "blockCrystalLightBlue"));
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal())));
recipeDrillFortuneI = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFortuneII),
"ISI", "SRS", "ISI",
'I', Blocks.glowstone,
'S', "crystalRed",
'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())));
recipeDrillFortuneII = Util.GetRecipes.lastIRecipe();
}
@ -229,15 +229,15 @@ public class ItemCrafting{
if(ConfigCrafting.DRILL_SIZE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeThreeByThree),
"DID", "ICI", "DID",
'I', "crystalWhite",
'D', "crystalLightBlue",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())));
recipeDrillThree = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFiveByFive),
"DID", "ICI", "DID",
'I', "crystalWhite",
'D', "crystalLightBlue",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeDrillFive = Util.GetRecipes.lastIRecipe();
}
@ -246,8 +246,8 @@ public class ItemCrafting{
if(ConfigCrafting.DRILL_SILK_TOUCH.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSilkTouch),
"DSD", "SCS", "DSD",
'D', "crystalGreen",
'S', "crystalLightBlue",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()),
'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeDrillSilk = Util.GetRecipes.lastIRecipe();
}
@ -259,7 +259,7 @@ public class ItemCrafting{
'C', "cobblestone",
'E', Items.paper,
'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', "crystalWhite"));
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())));
recipeDrillPlacing = Util.GetRecipes.lastIRecipe();
}
@ -267,8 +267,8 @@ public class ItemCrafting{
if(ConfigCrafting.BATTERY.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBattery),
" R ", "ICI", "III",
'R', "crystalRed",
'I', "crystalWhite",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBattery = Util.GetRecipes.lastIRecipe();
}
@ -278,7 +278,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBatteryDouble),
" R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBattery),
'I', "crystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryDouble = Util.GetRecipes.lastIRecipe();
}
@ -287,8 +287,8 @@ public class ItemCrafting{
if(ConfigCrafting.MAGNET_RING.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMagnetRing),
"RIB", "IOI", "BIR",
'R', "crystalRed",
'I', "crystalWhite",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'B', new ItemStack(Items.dye, 1, 4),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())));
recipeMagnetRing = Util.GetRecipes.lastIRecipe();
@ -299,7 +299,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGrowthRing),
"SIS", "IOI", "SIS",
'S', new ItemStack(Items.wheat_seeds),
'I', "crystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())));
recipeGrowthRing = Util.GetRecipes.lastIRecipe();
}
@ -309,7 +309,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWaterRemovalRing),
"BIB", "IOI", "BIB",
'B', new ItemStack(Items.water_bucket),
'I', "crystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())));
recipeWaterRing = Util.GetRecipes.lastIRecipe();
}
@ -319,7 +319,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBatteryTriple),
" R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBatteryDouble),
'I', "crystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryTriple = Util.GetRecipes.lastIRecipe();
}
@ -329,7 +329,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBatteryQuadruple),
" R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBatteryTriple),
'I', "crystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryQuadruple = Util.GetRecipes.lastIRecipe();
}
@ -339,7 +339,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBatteryQuintuple),
" R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBatteryQuadruple),
'I', "crystalWhite",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryQuintuple = Util.GetRecipes.lastIRecipe();
}
@ -349,7 +349,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWingsOfTheBats),
"WNW", "WDW", "WNW",
'W', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal()),
'N', "blockCrystalLightBlue",
'N', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'D', new ItemStack(Items.nether_star)));
recipeWings = Util.GetRecipes.lastIRecipe();
}
@ -366,7 +366,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
" R ", "RIR", " R ",
'I', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'R', "crystalRed"));
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())));
recipeCoil = Util.GetRecipes.lastIRecipe();
}
@ -409,7 +409,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced),
" F", "DP", "DC",
'F', new ItemStack(Items.flint),
'D', "crystalLightBlue",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'P', new ItemStack(Blocks.piston),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLeafBlowerAdvanced = Util.GetRecipes.lastIRecipe();

View file

@ -32,7 +32,8 @@ public enum TheMiscItems{
BAT_WING("BatWing", EnumRarity.rare),
DRILL_CORE("DrillCore", EnumRarity.uncommon),
BLACK_DYE("BlackDye", EnumRarity.epic),
LENS("Lens", EnumRarity.uncommon);
LENS("Lens", EnumRarity.uncommon),
GREEN_DYE("GreenDye", EnumRarity.epic);
public final String name;
public final EnumRarity rarity;

View file

@ -24,13 +24,11 @@ import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import org.lwjgl.opengl.GL11;
import java.awt.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class NEIReconstructorRecipe extends TemplateRecipeHandler implements INEIRecipeHandler{
@ -61,7 +59,7 @@ public class NEIReconstructorRecipe extends TemplateRecipeHandler implements INE
if(outputId.equals(NAME) && getClass() == NEIReconstructorRecipe.class){
ArrayList<ReconstructorRecipeHandler.Recipe> recipes = ReconstructorRecipeHandler.recipes;
for(ReconstructorRecipeHandler.Recipe recipe : recipes){
arecipes.add(new CachedReconstructorRecipe(recipe.input, recipe.output, recipe.type.lens));
arecipes.add(new CachedReconstructorRecipe(recipe));
}
}
else{
@ -73,8 +71,8 @@ public class NEIReconstructorRecipe extends TemplateRecipeHandler implements INE
public void loadCraftingRecipes(ItemStack result){
ArrayList<ReconstructorRecipeHandler.Recipe> recipes = ReconstructorRecipeHandler.recipes;
for(ReconstructorRecipeHandler.Recipe recipe : recipes){
if(ItemUtil.contains(OreDictionary.getOres(recipe.output, false), result, true)){
arecipes.add(new CachedReconstructorRecipe(recipe.input, recipe.output, recipe.type.lens));
if(ItemUtil.contains(recipe.getOutputs(), result, true)){
arecipes.add(new CachedReconstructorRecipe(recipe));
}
}
}
@ -83,8 +81,8 @@ public class NEIReconstructorRecipe extends TemplateRecipeHandler implements INE
public void loadUsageRecipes(ItemStack ingredient){
ArrayList<ReconstructorRecipeHandler.Recipe> recipes = ReconstructorRecipeHandler.recipes;
for(ReconstructorRecipeHandler.Recipe recipe : recipes){
if(ItemUtil.contains(OreDictionary.getOres(recipe.input, false), ingredient, true)){
CachedReconstructorRecipe theRecipe = new CachedReconstructorRecipe(recipe.input, recipe.output, recipe.type.lens);
if(ItemUtil.contains(recipe.getInputs(), ingredient, true)){
CachedReconstructorRecipe theRecipe = new CachedReconstructorRecipe(recipe);
theRecipe.setIngredientPermutation(Collections.singletonList(theRecipe.input), ingredient);
arecipes.add(theRecipe);
}
@ -134,19 +132,10 @@ public class NEIReconstructorRecipe extends TemplateRecipeHandler implements INE
public PositionedStack input;
public ItemStack lens;
public CachedReconstructorRecipe(String input, String result, ItemStack lens){
List<ItemStack> outputs = OreDictionary.getOres(result, false);
for(ItemStack ore : outputs){
ore.stackSize = 1;
}
List<ItemStack> inputs = OreDictionary.getOres(input, false);
for(ItemStack ore : inputs){
ore.stackSize = 1;
}
this.result = new PositionedStack(outputs, 67+32, 19);
this.input = new PositionedStack(inputs, 5+32, 19);
this.lens = lens;
public CachedReconstructorRecipe(ReconstructorRecipeHandler.Recipe recipe){
this.result = new PositionedStack(recipe.getOutputs(), 67+32, 19);
this.input = new PositionedStack(recipe.getInputs(), 5+32, 19);
this.lens = recipe.type.lens;
}
@Override

View file

@ -11,10 +11,12 @@
package ellpeck.actuallyadditions.ore;
import ellpeck.actuallyadditions.blocks.InitBlocks;
import ellpeck.actuallyadditions.blocks.metalists.TheColoredLampColors;
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
import ellpeck.actuallyadditions.items.InitItems;
import ellpeck.actuallyadditions.items.metalists.*;
import ellpeck.actuallyadditions.items.metalists.TheDusts;
import ellpeck.actuallyadditions.items.metalists.TheFoods;
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops;
import ellpeck.actuallyadditions.util.ModUtil;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
@ -29,44 +31,10 @@ public class InitOreDict{
ModUtil.LOGGER.info("Initializing OreDictionary Entries...");
//Vanilla Ores
addOre(Blocks.obsidian, "obsidian");
addOre(Items.coal, "coal");
addOre(Items.flint, "flint");
addOre(Blocks.gravel, "gravel");
addOre(Items.sugar, "sugar");
addOre(Items.diamond_horse_armor, "armorHorseDiamond");
addOre(Items.golden_horse_armor, "armorHorseGold");
addOre(Items.iron_horse_armor, "armorHorseIron");
addOre(Items.bone, "itemBone");
addOre(Items.dye, 15, "boneMeal");
addOre(Items.sugar, "sugar");
addOre(Items.reeds, "sugarCane");
addOre(Blocks.soul_sand, "soulSand");
addOre(Items.leather, "leather");
addOre(Items.rotten_flesh, "flesh");
addOre(Blocks.obsidian, "obsidian");
addOre(Blocks.yellow_flower, "flowerDandelion");
addOre(Blocks.red_flower, "flowerPoppy");
addOre(Blocks.red_flower, 1, "flowerOrchid");
addOre(Blocks.red_flower, 2, "flowerAllium");
addOre(Blocks.red_flower, 3, "flowerBluet");
addOre(Blocks.red_flower, 4, "flowerRedTulip");
addOre(Blocks.red_flower, 5, "flowerOrangeTulip");
addOre(Blocks.red_flower, 6, "flowerWhiteTulip");
addOre(Blocks.red_flower, 7, "flowerPinkTulip");
addOre(Blocks.red_flower, 8, "flowerDaisy");
addOre(Blocks.double_plant, 0, "flowerSunflower");
addOre(Blocks.double_plant, 1, "flowerLilac");
addOre(Blocks.double_plant, 4, "flowerRoseBush");
addOre(Blocks.double_plant, 5, "flowerPeony");
//Wool + Clay
for(int i = 0; i < TheColoredLampColors.values().length; i++){
addOre(Blocks.wool, i, "wool"+TheColoredLampColors.values()[i].name);
addOre(Blocks.stained_hardened_clay, i, "clay"+TheColoredLampColors.values()[i].name);
}
//Ores
//Ores for Pulverizers etc.
addOre(InitItems.itemDust, TheDusts.IRON.ordinal(), "dustIron");
addOre(InitItems.itemDust, TheDusts.GOLD.ordinal(), "dustGold");
addOre(InitItems.itemDust, TheDusts.DIAMOND.ordinal(), "dustDiamond");
@ -75,53 +43,29 @@ public class InitOreDict{
addOre(InitItems.itemDust, TheDusts.QUARTZ.ordinal(), "dustQuartz");
addOre(InitItems.itemDust, TheDusts.COAL.ordinal(), "dustCoal");
addOre(InitItems.itemDust, TheDusts.QUARTZ_BLACK.ordinal(), "dustQuartzBlack");
//Crystals
addOre(InitItems.itemCrystal, TheCrystals.REDSTONE.ordinal(), "crystalRed");
addOre(InitItems.itemCrystal, TheCrystals.LAPIS.ordinal(), "crystalBlue");
addOre(InitItems.itemCrystal, TheCrystals.DIAMOND.ordinal(), "crystalLightBlue");
addOre(InitItems.itemCrystal, TheCrystals.EMERALD.ordinal(), "crystalGreen");
addOre(InitItems.itemCrystal, TheCrystals.COAL.ordinal(), "crystalBlack");
addOre(InitItems.itemCrystal, TheCrystals.IRON.ordinal(), "crystalWhite");
addOre(InitBlocks.blockCrystal, TheCrystals.REDSTONE.ordinal(), "blockCrystalRed");
addOre(InitBlocks.blockCrystal, TheCrystals.LAPIS.ordinal(), "blockCrystalBlue");
addOre(InitBlocks.blockCrystal, TheCrystals.DIAMOND.ordinal(), "blockCrystalLightBlue");
addOre(InitBlocks.blockCrystal, TheCrystals.EMERALD.ordinal(), "blockCrystalGreen");
addOre(InitBlocks.blockCrystal, TheCrystals.COAL.ordinal(), "blockCrystalBlack");
addOre(InitBlocks.blockCrystal, TheCrystals.IRON.ordinal(), "blockCrystalWhite");
addOre(InitBlocks.blockMisc, TheMiscBlocks.ORE_QUARTZ.ordinal(), "oreQuartzBlack");
addOre(InitItems.itemMisc, TheMiscItems.QUARTZ.ordinal(), "gemQuartzBlack");
//For Thermal Expansion Machine that "grows crops"
addOre(InitItems.itemCanolaSeed, "seedCanola");
addOre(InitItems.itemMisc, TheMiscItems.CANOLA.ordinal(), "cropCanola");
addOre(InitItems.itemRiceSeed, "seedRice");
addOre(InitItems.itemFoods, TheFoods.RICE.ordinal(), "cropRice");
addOre(InitItems.itemFlaxSeed, "seedFlax");
addOre(Items.string, "cropFlax");
addOre(InitItems.itemCoffeeSeed, "seedCoffee");
addOre(InitItems.itemCoffeeBean, "cropCoffee");
//For Crafting
addOre(InitItems.itemMisc, TheMiscItems.RICE_SLIME.ordinal(), "slimeball");
addOre(InitBlocks.blockMisc, TheMiscBlocks.CHARCOAL_BLOCK.ordinal(), "blockCharcoal");
//For Compat
addOre(InitItems.itemSpecialDrop, TheSpecialDrops.EMERALD_SHARD.ordinal(), "nuggetEmerald");
addOre(InitItems.itemSpecialDrop, TheSpecialDrops.PEARL_SHARD.ordinal(), "nuggetEnderpearl");
addOre(InitItems.itemMisc, TheMiscItems.QUARTZ.ordinal(), "gemQuartzBlack");
//For Crafting
addOre(InitItems.itemMisc, TheMiscItems.BLACK_DYE.ordinal(), "dyeBlack");
addOre(InitBlocks.blockTestifiBucksWhiteWall, "blockWhiteBrick");
addOre(InitBlocks.blockTestifiBucksGreenWall, "blockGreenBrick");
addOre(InitItems.itemColorLens, "itemColorLens");
addOre(InitItems.itemExplosionLens, "itemExplosionLens");
addOre(InitItems.itemDamageLens, "itemDamageLens");
addOre(InitItems.itemMisc, TheMiscItems.LENS.ordinal(), "itemLens");
addOre(InitItems.itemMisc, TheMiscItems.GREEN_DYE.ordinal(), "dyeGreen");
}
private static void addOre(ItemStack stack, String name){

View file

@ -17,6 +17,7 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@ -40,7 +41,7 @@ public class CrusherRecipeRegistry{
if(ore.substring(0, theCase.theCase.length()).equals(theCase.theCase)){
String output = theCase.resultPreString+ore.substring(theCase.theCase.length());
if(!hasRecipe(ore)){
if(!hasOreRecipe(ore)){
if(!OreDictionary.getOres(output, false).isEmpty() && !OreDictionary.getOres(ore, false).isEmpty()){
addRecipe(ore, output, theCase.resultAmount);
}
@ -74,17 +75,29 @@ public class CrusherRecipeRegistry{
return false;
}
public static boolean hasRecipe(String input){
public static boolean hasOreRecipe(String input){
for(CrusherRecipe recipe : recipes){
if(recipe.input.equals(input)){
if(recipe.input != null && recipe.input.equals(input)){
return true;
}
}
return false;
}
public static void addRecipe(ItemStack input, ItemStack outputOne){
addRecipe(input, outputOne, null, 0);
}
public static void addRecipe(ItemStack input, String outputOne, int outputOneAmount){
recipes.add(new CrusherRecipe(input, outputOne, outputOneAmount));
}
public static void addRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputTwoChance){
recipes.add(new CrusherRecipe(input, outputOne, outputTwo, outputTwoChance));
}
public static void addRecipe(String input, String outputOne, int outputOneAmount){
recipes.add(new CrusherRecipe(input, outputOne, outputOneAmount, "", 0, 0));
addRecipe(input, outputOne, outputOneAmount, "", 0, 0);
}
public static List<ItemStack> getOutputOnes(ItemStack input){
@ -113,15 +126,32 @@ public class CrusherRecipeRegistry{
public static class CrusherRecipe{
public String input;
private String input;
public String outputOne;
public int outputOneAmount;
private String outputOne;
private int outputOneAmount;
public String outputTwo;
public int outputTwoAmount;
private String outputTwo;
private int outputTwoAmount;
public int outputTwoChance;
private ItemStack inputStack;
private ItemStack outputOneStack;
private ItemStack outputTwoStack;
public CrusherRecipe(ItemStack input, String outputOne, int outputOneAmount){
this.inputStack = input;
this.outputOne = outputOne;
this.outputOneAmount = outputOneAmount;
}
public CrusherRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputTwoChance){
this.inputStack = input;
this.outputOneStack = outputOne;
this.outputTwoStack = outputTwo;
this.outputTwoChance = outputTwoChance;
}
public CrusherRecipe(String input, String outputOne, int outputOneAmount, String outputTwo, int outputTwoAmount, int outputTwoChance){
this.input = input;
this.outputOne = outputOne;
@ -132,6 +162,10 @@ public class CrusherRecipeRegistry{
}
public List<ItemStack> getRecipeOutputOnes(){
if(this.outputOneStack != null){
return Collections.singletonList(this.outputOneStack.copy());
}
if(this.outputOne == null || this.outputOne.isEmpty()){
return null;
}
@ -144,6 +178,10 @@ public class CrusherRecipeRegistry{
}
public List<ItemStack> getRecipeOutputTwos(){
if(this.outputTwoStack != null){
return Collections.singletonList(this.outputTwoStack.copy());
}
if(this.outputTwo == null || this.outputTwo.isEmpty()){
return null;
}
@ -156,6 +194,10 @@ public class CrusherRecipeRegistry{
}
public List<ItemStack> getRecipeInputs(){
if(this.inputStack != null){
return Collections.singletonList(this.inputStack.copy());
}
if(this.input == null || this.input.isEmpty()){
return null;
}

View file

@ -10,16 +10,23 @@
package ellpeck.actuallyadditions.recipe;
import ellpeck.actuallyadditions.blocks.InitBlocks;
import ellpeck.actuallyadditions.blocks.metalists.TheColoredLampColors;
import ellpeck.actuallyadditions.config.values.ConfigCrafting;
import ellpeck.actuallyadditions.items.InitItems;
import ellpeck.actuallyadditions.items.metalists.TheCrystals;
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
import ellpeck.actuallyadditions.util.ItemUtil;
import ellpeck.actuallyadditions.util.Util;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
public class ReconstructorRecipeHandler{
@ -37,86 +44,91 @@ public class ReconstructorRecipeHandler{
public static void init(){
//Crystal Blocks
addRecipe("blockRedstone", "blockCrystalRed", 400);
addRecipe(new ItemStack(Blocks.redstone_block), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.REDSTONE.ordinal()), 400);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("blockLapis", "blockCrystalBlue", 400);
addRecipe(new ItemStack(Blocks.lapis_block), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.LAPIS.ordinal()), 400);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("blockDiamond", "blockCrystalLightBlue", 6000);
addRecipe(new ItemStack(Blocks.diamond_block), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), 600);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("blockEmerald", "blockCrystalGreen", 10000);
addRecipe(new ItemStack(Blocks.emerald_block), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.EMERALD.ordinal()), 1000);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("blockCoal", "blockCrystalBlack", 600);
addRecipe(new ItemStack(Blocks.coal_block), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), 600);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("blockIron", "blockCrystalWhite", 800);
addRecipe(new ItemStack(Blocks.iron_block), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), 800);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
//Crystal Items
addRecipe("dustRedstone", "crystalRed", 40);
addRecipe(new ItemStack(Items.redstone), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 40);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("gemLapis", "crystalBlue", 40);
addRecipe(new ItemStack(Items.dye, 1, 4), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 40);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("gemDiamond", "crystalLightBlue", 600);
addRecipe(new ItemStack(Items.diamond), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 60);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("gemEmerald", "crystalGreen", 1000);
addRecipe(new ItemStack(Items.emerald), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), 100);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("coal", "crystalBlack", 60);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("ingotIron", "crystalWhite", 80);
addRecipe(new ItemStack(Items.coal), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 60);
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe(new ItemStack(Items.iron_ingot), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 80);
//Lenses
addRecipe("itemLens", "itemColorLens", 5000);
addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new ItemStack(InitItems.itemColorLens), 5000);
recipeColorLens = Util.GetRecipes.lastReconstructorRecipe();
if(ConfigCrafting.RECONSTRUCTOR_EXPLOSION_LENS.isEnabled()){
addRecipe("itemColorLens", "itemExplosionLens", 5000);
addRecipe(new ItemStack(InitItems.itemColorLens), new ItemStack(InitItems.itemExplosionLens), 5000);
recipeExplosionLens = Util.GetRecipes.lastReconstructorRecipe();
addRecipe("itemExplosionLens", "itemDamageLens", 5000);
addRecipe(new ItemStack(InitItems.itemExplosionLens), new ItemStack(InitItems.itemDamageLens), 5000);
}
else{
addRecipe("itemColorLens", "itemDamageLens", 5000);
addRecipe(new ItemStack(InitItems.itemColorLens), new ItemStack(InitItems.itemDamageLens), 5000);
}
recipeDamageLens = Util.GetRecipes.lastReconstructorRecipe();
addRecipe("itemDamageLens", "itemLens", 5000);
addRecipe(new ItemStack(InitItems.itemDamageLens), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), 5000);
//Misc
if(ConfigCrafting.RECONSTRUCTOR_MISC.isEnabled()){
addRecipe("sand", "soulSand", 20000);
addRecipe(new ItemStack(Blocks.sand), new ItemStack(Blocks.soul_sand), 20000);
recipeSoulSand = Util.GetRecipes.lastReconstructorRecipe();
addRecipe("flesh", "leather", 8000);
addRecipe(new ItemStack(Items.rotten_flesh), new ItemStack(Items.leather), 8000);
recipeLeather = Util.GetRecipes.lastReconstructorRecipe();
addRecipe("blockQuartz", "blockWhiteBrick", 10);
addRecipe(new ItemStack(Blocks.quartz_block), new ItemStack(InitBlocks.blockTestifiBucksWhiteWall), 10);
recipeWhiteWall = Util.GetRecipes.lastReconstructorRecipe();
addRecipe("blockQuartz", "blockGreenBrick", 10, LensType.COLOR);
addRecipe(new ItemStack(Blocks.quartz_block), new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 10, LensType.COLOR);
recipeGreenWall = Util.GetRecipes.lastReconstructorRecipe();
//Colors
for(int i = 0; i < TheColoredLampColors.values().length-1; i++){
addRecipe("dye"+TheColoredLampColors.values()[i].name, "dye"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("wool"+TheColoredLampColors.values()[i].name, "wool"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
addRecipe(new ItemStack(Blocks.wool, 1, i), new ItemStack(Blocks.wool, 1, i+1), 2000, LensType.COLOR);
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("clay"+TheColoredLampColors.values()[i].name, "clay"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
addRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, i), new ItemStack(Blocks.stained_hardened_clay, 1, i+1), 2000, LensType.COLOR);
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("blockGlass"+TheColoredLampColors.values()[i].name, "blockGlass"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
}
addRecipe("dye"+TheColoredLampColors.values()[15].name, "dye"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("wool"+TheColoredLampColors.values()[15].name, "wool"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
addRecipe(new ItemStack(Blocks.wool, 1, 15), new ItemStack(Blocks.wool, 1, 0), 2000, LensType.COLOR);
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("clay"+TheColoredLampColors.values()[15].name, "clay"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
addRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stained_hardened_clay, 1, 0), 2000, LensType.COLOR);
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
addRecipe("blockGlass"+TheColoredLampColors.values()[15].name, "blockGlass"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
}
}
public static void addRecipe(String input, String output, int energyUse){
public static void addRecipe(ItemStack input, ItemStack output, int energyUse){
addRecipe(input, output, energyUse, LensType.NONE);
}
public static void addRecipe(ItemStack input, ItemStack output, int energyUse, LensType type){
if(type.hasRecipes){
recipes.add(new Recipe(input, output, energyUse, type));
}
}
public static void addRecipe(String input, String output, int energyUse, LensType type){
if(type.hasRecipes){
recipes.add(new Recipe(input, output, energyUse, type));
@ -126,11 +138,8 @@ public class ReconstructorRecipeHandler{
public static ArrayList<Recipe> getRecipes(ItemStack input){
ArrayList<Recipe> possibleRecipes = new ArrayList<Recipe>();
for(Recipe recipe : recipes){
int[] ids = OreDictionary.getOreIDs(input);
for(int id : ids){
if(Objects.equals(OreDictionary.getOreName(id), recipe.input)){
possibleRecipes.add(recipe);
}
if(ItemUtil.contains(recipe.getInputs(), input, true)){
possibleRecipes.add(recipe);
}
}
return possibleRecipes;
@ -192,11 +201,21 @@ public class ReconstructorRecipeHandler{
public static class Recipe{
public String input;
public String output;
private String input;
private String output;
public int energyUse;
public LensType type;
private ItemStack inputStack;
private ItemStack outputStack;
public Recipe(ItemStack input, ItemStack output, int energyUse, LensType type){
this.inputStack = input;
this.outputStack = output;
this.energyUse = energyUse;
this.type = type;
}
public Recipe(String input, String output, int energyUse, LensType type){
this.input = input;
this.output = output;
@ -204,14 +223,36 @@ public class ReconstructorRecipeHandler{
this.type = type;
}
public ItemStack getFirstOutput(){
List<ItemStack> stacks = OreDictionary.getOres(this.output, false);
if(stacks != null && !stacks.isEmpty() && stacks.get(0) != null){
ItemStack stack = stacks.get(0).copy();
stack.stackSize = 1;
return stack;
public List<ItemStack> getOutputs(){
if(this.outputStack != null){
return Collections.singletonList(this.outputStack.copy());
}
return null;
if(this.output == null || this.output.isEmpty()){
return null;
}
List<ItemStack> stacks = OreDictionary.getOres(this.output, false);
for(ItemStack stack : stacks){
stack.stackSize = 1;
}
return stacks;
}
public List<ItemStack> getInputs(){
if(this.inputStack != null){
return Collections.singletonList(this.inputStack.copy());
}
if(this.input == null || this.input.isEmpty()){
return null;
}
List<ItemStack> stacks = OreDictionary.getOres(this.input, false);
for(ItemStack stack : stacks){
stack.stackSize = 1;
}
return stacks;
}
}

View file

@ -30,6 +30,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.ArrayList;
import java.util.List;
public class TileEntityAtomicReconstructor extends TileEntityInventoryBase implements IEnergyReceiver{
@ -89,8 +90,9 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
ArrayList<ReconstructorRecipeHandler.Recipe> recipes = ReconstructorRecipeHandler.getRecipes(new ItemStack(pos.getBlock(), 1, pos.getMetadata()));
for(ReconstructorRecipeHandler.Recipe recipe : recipes){
if(recipe != null && this.storage.getEnergyStored() >= ENERGY_USE+recipe.energyUse && recipe.type == currentLens){
ItemStack output = recipe.getFirstOutput();
if(output != null){
List<ItemStack> outputs = recipe.getOutputs();
if(outputs != null && !outputs.isEmpty()){
ItemStack output = outputs.get(0);
if(output.getItem() instanceof ItemBlock){
this.worldObj.playAuxSFX(2001, pos.getX(), pos.getY(), pos.getZ(), Block.getIdFromBlock(pos.getBlock())+(pos.getMetadata() << 12));
pos.setBlock(Block.getBlockFromItem(output.getItem()), output.getItemDamage(), 2);
@ -118,9 +120,9 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
ArrayList<ReconstructorRecipeHandler.Recipe> recipes = ReconstructorRecipeHandler.getRecipes(stack);
for(ReconstructorRecipeHandler.Recipe recipe : recipes){
if(recipe != null && this.storage.getEnergyStored() >= ENERGY_USE+recipe.energyUse && recipe.type == currentLens){
ItemStack output = recipe.getFirstOutput();
if(output != null){
ItemStack outputCopy = output.copy();
List<ItemStack> outputs = recipe.getOutputs();
if(outputs != null && !outputs.isEmpty()){
ItemStack outputCopy = outputs.get(0).copy();
outputCopy.stackSize = stack.stackSize;
item.setEntityItemStack(outputCopy);

View file

@ -301,6 +301,7 @@ item.actuallyadditions.itemLaserWrench.name=Laser Wrench
item.actuallyadditions.itemChestToCrateUpgrade.name=Chest To Storage Crate Upgrade
item.actuallyadditions.itemMiscDrillCore.name=Drill Core
item.actuallyadditions.itemMiscBlackDye.name=Black Dye
item.actuallyadditions.itemMiscGreenDye.name=Green Dye
item.actuallyadditions.itemCrystalRed.name=Restonia Crystal
item.actuallyadditions.itemCrystalBlue.name=Palis Crystal
item.actuallyadditions.itemCrystalLightBlue.name=Diamatine Crystal