Fixed what I just did and crusher recipe handler for the booklet

This commit is contained in:
Ellpeck 2015-10-03 23:28:32 +02:00
parent 337f512afc
commit 4dc1d17c18
13 changed files with 176 additions and 163 deletions

View file

@ -13,15 +13,9 @@ package ellpeck.actuallyadditions.booklet;
import ellpeck.actuallyadditions.blocks.InitBlocks; import ellpeck.actuallyadditions.blocks.InitBlocks;
import ellpeck.actuallyadditions.blocks.metalists.TheColoredLampColors; import ellpeck.actuallyadditions.blocks.metalists.TheColoredLampColors;
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks; import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
import ellpeck.actuallyadditions.booklet.page.BookletPage; import ellpeck.actuallyadditions.booklet.page.*;
import ellpeck.actuallyadditions.booklet.page.PageCrafting;
import ellpeck.actuallyadditions.booklet.page.PageFurnace;
import ellpeck.actuallyadditions.booklet.page.PageTextOnly;
import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.crafting.BlockCrafting; import ellpeck.actuallyadditions.crafting.*;
import ellpeck.actuallyadditions.crafting.FoodCrafting;
import ellpeck.actuallyadditions.crafting.ItemCrafting;
import ellpeck.actuallyadditions.crafting.ToolCrafting;
import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.InitItems;
import ellpeck.actuallyadditions.items.metalists.TheFoods; import ellpeck.actuallyadditions.items.metalists.TheFoods;
import ellpeck.actuallyadditions.items.metalists.TheMiscItems; import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
@ -95,7 +89,7 @@ public class InitBooklet{
//No RF Using Items //No RF Using Items
new BookletChapter("wings", entryItemsNonRF, new ItemStack(InitItems.itemWingsOfTheBats), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal())), new PageCrafting(2, ItemCrafting.recipeWings).setNoText()); new BookletChapter("wings", entryItemsNonRF, new ItemStack(InitItems.itemWingsOfTheBats), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal())), new PageCrafting(2, ItemCrafting.recipeWings).setNoText());
new BookletChapter("foods", entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipePizza).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText()); new BookletChapter("foods", entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipePizza).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText(), new PageCrusherRecipe(18, CrusherCrafting.recipeSugar).setNoText());
new BookletChapter("leafBlower", entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText()); new BookletChapter("leafBlower", entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText());
ArrayList<BookletPage> aiotPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> aiotPages = new ArrayList<BookletPage>();
aiotPages.add(new PageTextOnly(aiotPages.size()+1)); aiotPages.add(new PageTextOnly(aiotPages.size()+1));

View file

@ -129,7 +129,7 @@ public class BookletPage{
if(ItemUtil.contains(page.getItemStacksForPage(), stack, true)){ if(ItemUtil.contains(page.getItemStacksForPage(), stack, true)){
list.add(EnumChatFormatting.GOLD+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".clickToSeeRecipe")); list.add(EnumChatFormatting.GOLD+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".clickToSeeRecipe"));
if(KeyStates.mouseButtonState.isPressed()){ if(KeyStates.mouseButtonState.checkPressed(true)){
gui.openIndexEntry(page.getChapter().entry, InitBooklet.entries.indexOf(page.getChapter().entry)/GuiBooklet.CHAPTER_BUTTONS_AMOUNT+1, true); gui.openIndexEntry(page.getChapter().entry, InitBooklet.entries.indexOf(page.getChapter().entry)/GuiBooklet.CHAPTER_BUTTONS_AMOUNT+1, true);
gui.openChapter(page.getChapter(), page); gui.openChapter(page.getChapter(), page);
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));

View file

@ -19,6 +19,8 @@ import ellpeck.actuallyadditions.util.Util;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.EnumChatFormatting;
import java.util.ArrayList;
public class PageCrusherRecipe extends BookletPage{ public class PageCrusherRecipe extends BookletPage{
@ -58,6 +60,7 @@ public class PageCrusherRecipe extends BookletPage{
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+100, 115, 0); gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+100, 115, 0);
} }
if(recipe != null){
if(recipe.outputTwoChance > 0){ if(recipe.outputTwoChance > 0){
gui.mc.fontRenderer.drawString(recipe.outputTwoChance+"%", gui.guiLeft+37+62, gui.guiTop+20+33, 0); gui.mc.fontRenderer.drawString(recipe.outputTwoChance+"%", gui.guiLeft+37+62, gui.guiTop+20+33, 0);
} }
@ -74,7 +77,8 @@ public class PageCrusherRecipe extends BookletPage{
stack = this.recipe.getRecipeOutputOnes().get(this.outOnePos); stack = this.recipe.getRecipeOutputOnes().get(this.outOnePos);
break; break;
default: default:
stack = this.recipe.getRecipeOutputTwos().get(this.outTwoPos); ArrayList<ItemStack> outputTwos = this.recipe.getRecipeOutputTwos();
stack = outputTwos == null ? null : outputTwos.get(this.outTwoPos);
break; break;
} }
@ -100,6 +104,7 @@ public class PageCrusherRecipe extends BookletPage{
} }
} }
} }
}
@Override @Override
public void updateScreen(int ticksElapsed){ public void updateScreen(int ticksElapsed){
@ -110,7 +115,7 @@ public class PageCrusherRecipe extends BookletPage{
else if(this.outOnePos+1 < this.recipe.getRecipeOutputOnes().size()){ else if(this.outOnePos+1 < this.recipe.getRecipeOutputOnes().size()){
this.outOnePos++; this.outOnePos++;
} }
else if(this.outTwoPos+1 < this.recipe.getRecipeOutputTwos().size()){ else if(this.recipe.getRecipeOutputTwos() != null && this.outTwoPos+1 < this.recipe.getRecipeOutputTwos().size()){
this.outTwoPos++; this.outTwoPos++;
} }
else{ else{

View file

@ -83,7 +83,7 @@ public class BlockCrafting{
" W ", "WXW", " W ", " W ", "WXW", " W ",
'W', new ItemStack(Blocks.wool, 1, Util.WILDCARD), 'W', new ItemStack(Blocks.wool, 1, Util.WILDCARD),
'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()))); 'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal())));
recipeSmileyCloud = Util.lastIRecipe(); recipeSmileyCloud = Util.GetRecipes.lastIRecipe();
} }
//Compost //Compost
@ -92,7 +92,7 @@ public class BlockCrafting{
"W W", "W W", "WCW", "W W", "W W", "WCW",
'W', "plankWood", 'W', "plankWood",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()))); 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal())));
recipeCompost = Util.lastIRecipe(); recipeCompost = Util.GetRecipes.lastIRecipe();
} }
//XP Solidifier //XP Solidifier
@ -102,14 +102,14 @@ public class BlockCrafting{
'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()), 'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()),
'D', "blockDiamond", 'D', "blockDiamond",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeSolidifier = Util.lastIRecipe(); recipeSolidifier = Util.GetRecipes.lastIRecipe();
} }
//Charcoal Block //Charcoal Block
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()), GameRegistry.addRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()),
"CCC", "CCC", "CCC", "CCC", "CCC", "CCC",
'C', new ItemStack(Items.coal, 1, 1)); 'C', new ItemStack(Items.coal, 1, 1));
recipeBlockChar = Util.lastIRecipe(); recipeBlockChar = Util.GetRecipes.lastIRecipe();
GameRegistry.addShapelessRecipe(new ItemStack(Items.coal, 9, 1), GameRegistry.addShapelessRecipe(new ItemStack(Items.coal, 9, 1),
new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal())); new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()));
@ -120,7 +120,7 @@ public class BlockCrafting{
'W', "plankWood", 'W', "plankWood",
'R', "logWood", 'R', "logWood",
'S', "stickWood")); 'S', "stickWood"));
recipeCase = Util.lastIRecipe(); recipeCase = Util.GetRecipes.lastIRecipe();
} }
//Ender Casing //Ender Casing
@ -130,7 +130,7 @@ public class BlockCrafting{
'W', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), 'W', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()),
'S', Blocks.obsidian)); 'S', Blocks.obsidian));
recipeEnderCase = Util.lastIRecipe(); recipeEnderCase = Util.GetRecipes.lastIRecipe();
} }
//Phantom Booster //Phantom Booster
@ -140,7 +140,7 @@ public class BlockCrafting{
'R', "dustRedstone", 'R', "dustRedstone",
'D', "gemDiamond", 'D', "gemDiamond",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()))); 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())));
recipePhantomBooster = Util.lastIRecipe(); recipePhantomBooster = Util.GetRecipes.lastIRecipe();
} }
//Coffee Machine //Coffee Machine
@ -150,7 +150,7 @@ public class BlockCrafting{
'C', InitItems.itemCoffeeBean, 'C', InitItems.itemCoffeeBean,
'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()))); 'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())));
recipeCoffeeMachine = Util.lastIRecipe(); recipeCoffeeMachine = Util.GetRecipes.lastIRecipe();
} }
//Energizer //Energizer
@ -160,7 +160,7 @@ public class BlockCrafting{
'I', "ingotIron", 'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()))); 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal())));
recipeEnergizer = Util.lastIRecipe(); recipeEnergizer = Util.GetRecipes.lastIRecipe();
} }
//Enervator //Enervator
@ -170,7 +170,7 @@ public class BlockCrafting{
'I', "ingotIron", 'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()))); 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal())));
recipeEnervator = Util.lastIRecipe(); recipeEnervator = Util.GetRecipes.lastIRecipe();
} }
//Lava Factory //Lava Factory
@ -181,7 +181,7 @@ public class BlockCrafting{
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'I', "blockIron", 'I', "blockIron",
'L', Items.lava_bucket)); 'L', Items.lava_bucket));
recipeLavaFactory = Util.lastIRecipe(); recipeLavaFactory = Util.GetRecipes.lastIRecipe();
} }
//Casing //Casing
@ -190,7 +190,7 @@ public class BlockCrafting{
"ICI", "ICI",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'I', "blockIron")); 'I', "blockIron"));
recipeCasing = Util.lastIRecipe(); recipeCasing = Util.GetRecipes.lastIRecipe();
} }
//Canola Press //Canola Press
@ -201,7 +201,7 @@ public class BlockCrafting{
'H', Blocks.hopper, 'H', Blocks.hopper,
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()))); 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())));
recipeCanolaPress = Util.lastIRecipe(); recipeCanolaPress = Util.GetRecipes.lastIRecipe();
} }
//Ore Magnet //Ore Magnet
@ -212,7 +212,7 @@ public class BlockCrafting{
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'B', new ItemStack(InitItems.itemBatteryDouble), 'B', new ItemStack(InitItems.itemBatteryDouble),
'I', new ItemStack(Blocks.iron_block))); 'I', new ItemStack(Blocks.iron_block)));
recipeMiner = Util.lastIRecipe(); recipeMiner = Util.GetRecipes.lastIRecipe();
} }
//Fermenting Barrel //Fermenting Barrel
@ -223,7 +223,7 @@ public class BlockCrafting{
'H', Blocks.hopper, 'H', Blocks.hopper,
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()))); 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())));
recipeFermentingBarrel = Util.lastIRecipe(); recipeFermentingBarrel = Util.GetRecipes.lastIRecipe();
} }
//Phantomface //Phantomface
@ -234,7 +234,7 @@ public class BlockCrafting{
'C', Blocks.chest, 'C', Blocks.chest,
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()))); 'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal())));
recipePhantomface = Util.lastIRecipe(); recipePhantomface = Util.GetRecipes.lastIRecipe();
} }
//Phantom Placer //Phantom Placer
@ -242,7 +242,7 @@ public class BlockCrafting{
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockPhantomPlacer), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockPhantomPlacer),
InitBlocks.blockPlacer, InitBlocks.blockPlacer,
InitBlocks.blockPhantomface)); InitBlocks.blockPhantomface));
recipePhantomPlacer = Util.lastIRecipe(); recipePhantomPlacer = Util.GetRecipes.lastIRecipe();
} }
//Phantom Breaker //Phantom Breaker
@ -250,7 +250,7 @@ public class BlockCrafting{
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockPhantomBreaker), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockPhantomBreaker),
InitBlocks.blockBreaker, InitBlocks.blockBreaker,
InitBlocks.blockPhantomface)); InitBlocks.blockPhantomface));
recipePhantomBreaker = Util.lastIRecipe(); recipePhantomBreaker = Util.GetRecipes.lastIRecipe();
} }
//Phantom Energyface //Phantom Energyface
@ -259,7 +259,7 @@ public class BlockCrafting{
" R ", "RFR", " R ", " R ", "RFR", " R ",
'R', "dustRedstone", 'R', "dustRedstone",
'F', InitBlocks.blockPhantomface)); 'F', InitBlocks.blockPhantomface));
recipeEnergyface = Util.lastIRecipe(); recipeEnergyface = Util.GetRecipes.lastIRecipe();
} }
//Phantom Liquiface //Phantom Liquiface
@ -268,7 +268,7 @@ public class BlockCrafting{
"RFR", "RFR",
'R', Items.bucket, 'R', Items.bucket,
'F', InitBlocks.blockPhantomface)); 'F', InitBlocks.blockPhantomface));
recipeLiquiface = Util.lastIRecipe(); recipeLiquiface = Util.GetRecipes.lastIRecipe();
} }
//Liquid Placer //Liquid Placer
@ -277,7 +277,7 @@ public class BlockCrafting{
"RFR", "RFR",
'R', Items.bucket, 'R', Items.bucket,
'F', InitBlocks.blockPlacer)); 'F', InitBlocks.blockPlacer));
recipeLiquidPlacer = Util.lastIRecipe(); recipeLiquidPlacer = Util.GetRecipes.lastIRecipe();
} }
//Liquid Breaker //Liquid Breaker
@ -286,7 +286,7 @@ public class BlockCrafting{
"RFR", "RFR",
'R', Items.bucket, 'R', Items.bucket,
'F', InitBlocks.blockBreaker)); 'F', InitBlocks.blockBreaker));
recipeLiquidCollector = Util.lastIRecipe(); recipeLiquidCollector = Util.GetRecipes.lastIRecipe();
} }
//Oil Generator //Oil Generator
@ -296,7 +296,7 @@ public class BlockCrafting{
'C', "cobblestone", 'C', "cobblestone",
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()))); 'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())));
recipeOilGen = Util.lastIRecipe(); recipeOilGen = Util.GetRecipes.lastIRecipe();
} }
//Coal Generator //Coal Generator
@ -306,7 +306,7 @@ public class BlockCrafting{
'C', "cobblestone", 'C', "cobblestone",
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'B', new ItemStack(Items.coal, 1, Util.WILDCARD))); 'B', new ItemStack(Items.coal, 1, Util.WILDCARD)));
recipeCoalGen = Util.lastIRecipe(); recipeCoalGen = Util.GetRecipes.lastIRecipe();
} }
//Leaf Generator //Leaf Generator
@ -318,14 +318,14 @@ public class BlockCrafting{
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'L', "treeLeaves", 'L', "treeLeaves",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLeafGen = Util.lastIRecipe(); recipeLeafGen = Util.GetRecipes.lastIRecipe();
} }
//Enderpearl Block //Enderpearl Block
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
"EE", "EE", "EE", "EE",
'E', Items.ender_pearl)); 'E', Items.ender_pearl));
recipeEnderPearlBlock = Util.lastIRecipe(); recipeEnderPearlBlock = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.ender_pearl, 4), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.ender_pearl, 4),
new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()))); new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal())));
@ -336,14 +336,14 @@ public class BlockCrafting{
'W', "cobblestone", 'W', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'S', "stickWood")); 'S', "stickWood"));
recipeStoneCase = Util.lastIRecipe(); recipeStoneCase = Util.GetRecipes.lastIRecipe();
} }
//Quartz Block //Quartz Block
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()),
"QQ", "QQ", "QQ", "QQ",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()))); 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
recipeQuartzBlock = Util.lastIRecipe(); recipeQuartzBlock = Util.GetRecipes.lastIRecipe();
//Fishing Net //Fishing Net
if(ConfigCrafting.FISHING_NET.isEnabled()){ if(ConfigCrafting.FISHING_NET.isEnabled()){
@ -351,7 +351,7 @@ public class BlockCrafting{
"SSS", "SDS", "SSS", "SSS", "SDS", "SSS",
'D', "gemDiamond", 'D', "gemDiamond",
'S', Items.string)); 'S', Items.string));
recipeFisher = Util.lastIRecipe(); recipeFisher = Util.GetRecipes.lastIRecipe();
} }
//Repairer //Repairer
@ -362,7 +362,7 @@ public class BlockCrafting{
'I', "ingotIron", 'I', "ingotIron",
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()))); 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())));
recipeRepairer = Util.lastIRecipe(); recipeRepairer = Util.GetRecipes.lastIRecipe();
} }
//Solar Panel //Solar Panel
@ -374,7 +374,7 @@ public class BlockCrafting{
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(Blocks.iron_bars))); 'B', new ItemStack(Blocks.iron_bars)));
recipeSolar = Util.lastIRecipe(); recipeSolar = Util.GetRecipes.lastIRecipe();
} }
//Heat Collector //Heat Collector
@ -387,20 +387,20 @@ public class BlockCrafting{
'L', new ItemStack(Items.lava_bucket), 'L', new ItemStack(Items.lava_bucket),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(Blocks.iron_bars))); 'B', new ItemStack(Blocks.iron_bars)));
recipeHeatCollector = Util.lastIRecipe(); recipeHeatCollector = Util.GetRecipes.lastIRecipe();
} }
//Quartz Pillar //Quartz Pillar
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()),
"Q", "Q", "Q", "Q",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()))); 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
recipeQuartzPillar = Util.lastIRecipe(); recipeQuartzPillar = Util.GetRecipes.lastIRecipe();
//Chiseled Quartz //Chiseled Quartz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 2, TheMiscBlocks.QUARTZ_CHISELED.ordinal()), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 2, TheMiscBlocks.QUARTZ_CHISELED.ordinal()),
"Q", "Q", "Q", "Q",
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()))); 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal())));
recipeQuartzChiseled = Util.lastIRecipe(); recipeQuartzChiseled = Util.GetRecipes.lastIRecipe();
//Inputter //Inputter
if(ConfigCrafting.INPUTTER.isEnabled()){ if(ConfigCrafting.INPUTTER.isEnabled()){
@ -409,14 +409,14 @@ public class BlockCrafting{
'W', "plankWood", 'W', "plankWood",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'H', new ItemStack(Blocks.hopper))); 'H', new ItemStack(Blocks.hopper)));
recipeESD = Util.lastIRecipe(); recipeESD = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockInputterAdvanced), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockInputterAdvanced),
InitBlocks.blockInputter, InitBlocks.blockInputter,
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
"dustRedstone")); "dustRedstone"));
recipeAdvancedESD = Util.lastIRecipe(); recipeAdvancedESD = Util.GetRecipes.lastIRecipe();
} }
//Crusher //Crusher
@ -428,7 +428,7 @@ public class BlockCrafting{
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'P', new ItemStack(Blocks.piston), 'P', new ItemStack(Blocks.piston),
'F', new ItemStack(Items.flint))); 'F', new ItemStack(Items.flint)));
recipeCrusher = Util.lastIRecipe(); recipeCrusher = Util.GetRecipes.lastIRecipe();
} }
//Double Crusher //Double Crusher
@ -440,7 +440,7 @@ public class BlockCrafting{
'R', InitBlocks.blockGrinder, 'R', InitBlocks.blockGrinder,
'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'P', new ItemStack(Blocks.piston))); 'P', new ItemStack(Blocks.piston)));
recipeDoubleCrusher = Util.lastIRecipe(); recipeDoubleCrusher = Util.GetRecipes.lastIRecipe();
} }
//Double Furnace //Double Furnace
@ -452,7 +452,7 @@ public class BlockCrafting{
'R', new ItemStack(Blocks.furnace), 'R', new ItemStack(Blocks.furnace),
'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'P', "ingotBrick")); 'P', "ingotBrick"));
recipeFurnace = Util.lastIRecipe(); recipeFurnace = Util.GetRecipes.lastIRecipe();
} }
//Feeder //Feeder
@ -463,7 +463,7 @@ public class BlockCrafting{
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'C', new ItemStack(Items.golden_carrot), 'C', new ItemStack(Items.golden_carrot),
'H', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()))); 'H', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal())));
recipeFeeder = Util.lastIRecipe(); recipeFeeder = Util.GetRecipes.lastIRecipe();
} }
//Giant Chest //Giant Chest
@ -473,7 +473,7 @@ public class BlockCrafting{
'C', new ItemStack(Blocks.chest), 'C', new ItemStack(Blocks.chest),
'D', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'D', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'W', "plankWood")); 'W', "plankWood"));
recipeCrate = Util.lastIRecipe(); recipeCrate = Util.GetRecipes.lastIRecipe();
} }
//Greenhouse Glass //Greenhouse Glass
@ -483,7 +483,7 @@ public class BlockCrafting{
'G', "blockGlass", 'G', "blockGlass",
'D', Blocks.obsidian, 'D', Blocks.obsidian,
'S', "treeSapling")); 'S', "treeSapling"));
recipeGlass = Util.lastIRecipe(); recipeGlass = Util.GetRecipes.lastIRecipe();
} }
//Placer //Placer
@ -493,7 +493,7 @@ public class BlockCrafting{
'C', "cobblestone", 'C', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'P', Blocks.piston)); 'P', Blocks.piston));
recipePlacer = Util.lastIRecipe(); recipePlacer = Util.GetRecipes.lastIRecipe();
} }
//Breaker //Breaker
@ -503,7 +503,7 @@ public class BlockCrafting{
'C', "cobblestone", 'C', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'P', Items.iron_pickaxe)); 'P', Items.iron_pickaxe));
recipeBreaker = Util.lastIRecipe(); recipeBreaker = Util.GetRecipes.lastIRecipe();
} }
//Dropper //Dropper
@ -522,14 +522,14 @@ public class BlockCrafting{
'G', "glowstone", 'G', "glowstone",
'D', "dye"+BlockColoredLamp.allLampTypes[i].name, 'D', "dye"+BlockColoredLamp.allLampTypes[i].name,
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()))); 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
recipesLamps[i] = Util.lastIRecipe(); recipesLamps[i] = Util.GetRecipes.lastIRecipe();
} }
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4),
"XXX", "XLX", "XXX", "XXX", "XLX", "XXX",
'X', "dustRedstone", 'X', "dustRedstone",
'L', new ItemStack(InitBlocks.blockColoredLamp, 1, Util.WILDCARD))); 'L', new ItemStack(InitBlocks.blockColoredLamp, 1, Util.WILDCARD)));
recipePowerer = Util.lastIRecipe(); recipePowerer = Util.GetRecipes.lastIRecipe();
} }
} }

View file

@ -13,9 +13,12 @@ package ellpeck.actuallyadditions.crafting;
import ellpeck.actuallyadditions.config.values.ConfigCrafting; import ellpeck.actuallyadditions.config.values.ConfigCrafting;
import ellpeck.actuallyadditions.recipe.CrusherRecipeRegistry; import ellpeck.actuallyadditions.recipe.CrusherRecipeRegistry;
import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.Util;
public class CrusherCrafting{ public class CrusherCrafting{
public static CrusherRecipeRegistry.CrusherRecipe recipeSugar;
public static void init(){ public static void init(){
ModUtil.LOGGER.info("Initializing Crusher Recipes..."); ModUtil.LOGGER.info("Initializing Crusher Recipes...");
@ -49,6 +52,7 @@ public class CrusherCrafting{
} }
if(ConfigCrafting.RICE_SUGAR.isEnabled()){ if(ConfigCrafting.RICE_SUGAR.isEnabled()){
CrusherRecipeRegistry.addRecipe("cropRice", "sugar", 2); CrusherRecipeRegistry.addRecipe("cropRice", "sugar", 2);
recipeSugar = Util.GetRecipes.lastCrusherRecipe();
} }
if(ConfigCrafting.NICKEL.isEnabled()){ if(ConfigCrafting.NICKEL.isEnabled()){

View file

@ -67,7 +67,7 @@ public class FoodCrafting{
'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD), 'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
'K', knifeStack, 'K', knifeStack,
'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()))); 'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal())));
recipePizza = Util.lastIRecipe(); recipePizza = Util.GetRecipes.lastIRecipe();
} }
//Hamburger //Hamburger
@ -78,7 +78,7 @@ public class FoodCrafting{
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
'K', knifeStack, 'K', knifeStack,
'B', new ItemStack(Items.cooked_beef))); 'B', new ItemStack(Items.cooked_beef)));
recipeHamburger = Util.lastIRecipe(); recipeHamburger = Util.GetRecipes.lastIRecipe();
} }
//Big Cookie //Big Cookie
@ -87,7 +87,7 @@ public class FoodCrafting{
"DCD", "CDC", "DCD", "DCD", "CDC", "DCD",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
'C', new ItemStack(Items.dye, 1, 3))); 'C', new ItemStack(Items.dye, 1, 3)));
recipeBigCookie = Util.lastIRecipe(); recipeBigCookie = Util.GetRecipes.lastIRecipe();
} }
//Sub Sandwich //Sub Sandwich
@ -99,7 +99,7 @@ public class FoodCrafting{
'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD), 'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()),
'K', knifeStack)); 'K', knifeStack));
recipeSubSandwich = Util.lastIRecipe(); recipeSubSandwich = Util.GetRecipes.lastIRecipe();
} }
//French Fry //French Fry
@ -107,7 +107,7 @@ public class FoodCrafting{
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()),
new ItemStack(Items.baked_potato), new ItemStack(Items.baked_potato),
knifeStack)); knifeStack));
recipeFrenchFry = Util.lastIRecipe(); recipeFrenchFry = Util.GetRecipes.lastIRecipe();
} }
//French Fries //French Fries
@ -116,7 +116,7 @@ public class FoodCrafting{
"FFF", " P ", "FFF", " P ",
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()))); 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal())));
recipeFrenchFries = Util.lastIRecipe(); recipeFrenchFries = Util.GetRecipes.lastIRecipe();
} }
//Fish N Chips //Fish N Chips
@ -126,14 +126,14 @@ public class FoodCrafting{
'I', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD), 'I', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()))); 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal())));
recipeFishNChips = Util.lastIRecipe(); recipeFishNChips = Util.GetRecipes.lastIRecipe();
} }
//Cheese //Cheese
if(ConfigCrafting.CHEESE.isEnabled()){ if(ConfigCrafting.CHEESE.isEnabled()){
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
new ItemStack(Items.milk_bucket)); new ItemStack(Items.milk_bucket));
recipeCheese = Util.lastIRecipe(); recipeCheese = Util.GetRecipes.lastIRecipe();
} }
//Pumpkin Stew //Pumpkin Stew
@ -142,14 +142,14 @@ public class FoodCrafting{
"P", "B", "P", "B",
'P', new ItemStack(Blocks.pumpkin), 'P', new ItemStack(Blocks.pumpkin),
'B', new ItemStack(Items.bowl)); 'B', new ItemStack(Items.bowl));
recipePumpkinStew = Util.lastIRecipe(); recipePumpkinStew = Util.GetRecipes.lastIRecipe();
} }
//Carrot Juice //Carrot Juice
if(ConfigCrafting.CARROT_JUICE.isEnabled()){ if(ConfigCrafting.CARROT_JUICE.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()),
new ItemStack(Items.glass_bottle), "cropCarrot", knifeStack)); new ItemStack(Items.glass_bottle), "cropCarrot", knifeStack));
recipeCarrotJuice = Util.lastIRecipe(); recipeCarrotJuice = Util.GetRecipes.lastIRecipe();
} }
//Spaghetti //Spaghetti
@ -158,14 +158,14 @@ public class FoodCrafting{
"NNN", " B ", "NNN", " B ",
'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), 'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
'B', new ItemStack(Items.bowl))); 'B', new ItemStack(Items.bowl)));
recipeSpaghetti = Util.lastIRecipe(); recipeSpaghetti = Util.GetRecipes.lastIRecipe();
} }
//Noodle //Noodle
if(ConfigCrafting.NOODLE.isEnabled()){ if(ConfigCrafting.NOODLE.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
"cropWheat", knifeStack)); "cropWheat", knifeStack));
recipeNoodle = Util.lastIRecipe(); recipeNoodle = Util.GetRecipes.lastIRecipe();
} }
//Chocolate //Chocolate
@ -174,7 +174,7 @@ public class FoodCrafting{
"C C", "CMC", "C C", "C C", "CMC", "C C",
'C', new ItemStack(Items.dye, 1, 3), 'C', new ItemStack(Items.dye, 1, 3),
'M', new ItemStack(Items.milk_bucket)); 'M', new ItemStack(Items.milk_bucket));
recipeChocolate = Util.lastIRecipe(); recipeChocolate = Util.GetRecipes.lastIRecipe();
} }
//Chocolate Cake //Chocolate Cake
@ -186,14 +186,14 @@ public class FoodCrafting{
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
'S', new ItemStack(Items.sugar), 'S', new ItemStack(Items.sugar),
'C', new ItemStack(Items.dye, 1, 3))); 'C', new ItemStack(Items.dye, 1, 3)));
recipeChocolateCake = Util.lastIRecipe(); recipeChocolateCake = Util.GetRecipes.lastIRecipe();
} }
//Toast //Toast
if(ConfigCrafting.TOAST.isEnabled()){ if(ConfigCrafting.TOAST.isEnabled()){
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()), GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()),
new ItemStack(Items.bread)); new ItemStack(Items.bread));
recipeToast = Util.lastIRecipe(); recipeToast = Util.GetRecipes.lastIRecipe();
} }
} }

View file

@ -76,7 +76,7 @@ public class ItemCrafting{
//Booklet //Booklet
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemLexicon), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.paper))); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemLexicon), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.paper)));
recipeBook = Util.lastIRecipe(); recipeBook = Util.GetRecipes.lastIRecipe();
//Rice Stuff //Rice Stuff
if(ConfigCrafting.RICE_GADGETS.isEnabled()){ if(ConfigCrafting.RICE_GADGETS.isEnabled()){
@ -101,7 +101,7 @@ public class ItemCrafting{
'I', "ingotIron", 'I', "ingotIron",
'P', new ItemStack(Blocks.piston), 'P', new ItemStack(Blocks.piston),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLeafBlower = Util.lastIRecipe(); recipeLeafBlower = Util.GetRecipes.lastIRecipe();
} }
//Drill //Drill
@ -112,7 +112,7 @@ public class ItemCrafting{
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'R', "dustRedstone", 'R', "dustRedstone",
'I', "blockIron")); 'I', "blockIron"));
recipeDrill = Util.lastIRecipe(); recipeDrill = Util.GetRecipes.lastIRecipe();
} }
//Tele Staff //Tele Staff
@ -122,7 +122,7 @@ public class ItemCrafting{
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()), 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()),
'B', new ItemStack(InitItems.itemBattery, 1, Util.WILDCARD))); 'B', new ItemStack(InitItems.itemBattery, 1, Util.WILDCARD)));
recipeStaff = Util.lastIRecipe(); recipeStaff = Util.GetRecipes.lastIRecipe();
} }
//Drill Speed //Drill Speed
@ -132,21 +132,21 @@ public class ItemCrafting{
'I', "ingotIron", 'I', "ingotIron",
'S', Items.sugar, 'S', Items.sugar,
'R', "dustRedstone")); 'R', "dustRedstone"));
recipeDrillSpeedI = Util.lastIRecipe(); recipeDrillSpeedI = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedII), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedII),
"ISI", "SCS", "ISI", "ISI", "SCS", "ISI",
'I', "ingotIron", 'I', "ingotIron",
'S', Items.sugar, 'S', Items.sugar,
'C', Items.cake)); 'C', Items.cake));
recipeDrillSpeedII = Util.lastIRecipe(); recipeDrillSpeedII = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedIII), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedIII),
"ISI", "SFS", "ISI", "ISI", "SFS", "ISI",
'I', "ingotIron", 'I', "ingotIron",
'S', Items.sugar, 'S', Items.sugar,
'F', "gemDiamond")); 'F', "gemDiamond"));
recipeDrillSpeedIII = Util.lastIRecipe(); recipeDrillSpeedIII = Util.GetRecipes.lastIRecipe();
} }
//Drill Fortune //Drill Fortune
@ -156,14 +156,14 @@ public class ItemCrafting{
'I', Blocks.glowstone, 'I', Blocks.glowstone,
'S', Items.redstone, 'S', Items.redstone,
'R', Blocks.diamond_block)); 'R', Blocks.diamond_block));
recipeDrillFortuneI = Util.lastIRecipe(); recipeDrillFortuneI = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFortuneII), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFortuneII),
"ISI", "SRS", "ISI", "ISI", "SRS", "ISI",
'I', Blocks.glowstone, 'I', Blocks.glowstone,
'S', Items.redstone, 'S', Items.redstone,
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()))); 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())));
recipeDrillFortuneII = Util.lastIRecipe(); recipeDrillFortuneII = Util.GetRecipes.lastIRecipe();
} }
//Drill Size //Drill Size
@ -173,14 +173,14 @@ public class ItemCrafting{
'I', "ingotIron", 'I', "ingotIron",
'D', "gemDiamond", 'D', "gemDiamond",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())));
recipeDrillThree = Util.lastIRecipe(); recipeDrillThree = Util.GetRecipes.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFiveByFive), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFiveByFive),
"DID", "ICI", "DID", "DID", "ICI", "DID",
'I', "ingotIron", 'I', "ingotIron",
'D', "gemDiamond", 'D', "gemDiamond",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeDrillFive = Util.lastIRecipe(); recipeDrillFive = Util.GetRecipes.lastIRecipe();
} }
//Drill Silk Touch //Drill Silk Touch
@ -190,7 +190,7 @@ public class ItemCrafting{
'D', "gemEmerald", 'D', "gemEmerald",
'S', "gemDiamond", 'S', "gemDiamond",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeDrillSilk = Util.lastIRecipe(); recipeDrillSilk = Util.GetRecipes.lastIRecipe();
} }
//Drill Placing //Drill Placing
@ -201,7 +201,7 @@ public class ItemCrafting{
'E', Items.ender_pearl, 'E', Items.ender_pearl,
'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', "ingotIron")); 'R', "ingotIron"));
recipeDrillPlacing = Util.lastIRecipe(); recipeDrillPlacing = Util.GetRecipes.lastIRecipe();
} }
//Battery //Battery
@ -211,7 +211,7 @@ public class ItemCrafting{
'R', "dustRedstone", 'R', "dustRedstone",
'I', "ingotIron", 'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBattery = Util.lastIRecipe(); recipeBattery = Util.GetRecipes.lastIRecipe();
} }
//Double Battery //Double Battery
@ -221,7 +221,7 @@ public class ItemCrafting{
'R', new ItemStack(InitItems.itemBattery), 'R', new ItemStack(InitItems.itemBattery),
'I', "ingotIron", 'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryDouble = Util.lastIRecipe(); recipeBatteryDouble = Util.GetRecipes.lastIRecipe();
} }
//Magnet Ring //Magnet Ring
@ -232,7 +232,7 @@ public class ItemCrafting{
'I', "ingotIron", 'I', "ingotIron",
'B', new ItemStack(Items.dye, 1, 4), 'B', new ItemStack(Items.dye, 1, 4),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()))); 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())));
recipeMagnetRing = Util.lastIRecipe(); recipeMagnetRing = Util.GetRecipes.lastIRecipe();
} }
//Growth Ring //Growth Ring
@ -242,7 +242,7 @@ public class ItemCrafting{
'S', new ItemStack(Items.wheat_seeds), 'S', new ItemStack(Items.wheat_seeds),
'I', "ingotIron", 'I', "ingotIron",
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()))); 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())));
recipeGrowthRing = Util.lastIRecipe(); recipeGrowthRing = Util.GetRecipes.lastIRecipe();
} }
//Water Ring //Water Ring
@ -252,7 +252,7 @@ public class ItemCrafting{
'B', new ItemStack(Items.water_bucket), 'B', new ItemStack(Items.water_bucket),
'I', "ingotIron", 'I', "ingotIron",
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()))); 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())));
recipeWaterRing = Util.lastIRecipe(); recipeWaterRing = Util.GetRecipes.lastIRecipe();
} }
//Triple Battery //Triple Battery
@ -262,7 +262,7 @@ public class ItemCrafting{
'R', new ItemStack(InitItems.itemBatteryDouble), 'R', new ItemStack(InitItems.itemBatteryDouble),
'I', "ingotIron", 'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryTriple = Util.lastIRecipe(); recipeBatteryTriple = Util.GetRecipes.lastIRecipe();
} }
//Quadruple Battery //Quadruple Battery
@ -272,7 +272,7 @@ public class ItemCrafting{
'R', new ItemStack(InitItems.itemBatteryTriple), 'R', new ItemStack(InitItems.itemBatteryTriple),
'I', "ingotIron", 'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryQuadruple = Util.lastIRecipe(); recipeBatteryQuadruple = Util.GetRecipes.lastIRecipe();
} }
//Quintuple Battery //Quintuple Battery
@ -282,7 +282,7 @@ public class ItemCrafting{
'R', new ItemStack(InitItems.itemBatteryQuadruple), 'R', new ItemStack(InitItems.itemBatteryQuadruple),
'I', "ingotIron", 'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryQuintuple = Util.lastIRecipe(); recipeBatteryQuintuple = Util.GetRecipes.lastIRecipe();
} }
//Bat Wings //Bat Wings
@ -292,7 +292,7 @@ public class ItemCrafting{
'W', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal()), 'W', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal()),
'N', "blockDiamond", 'N', "blockDiamond",
'D', new ItemStack(Items.nether_star))); 'D', new ItemStack(Items.nether_star)));
recipeWings = Util.lastIRecipe(); recipeWings = Util.GetRecipes.lastIRecipe();
} }
//Quartz //Quartz
@ -308,7 +308,7 @@ public class ItemCrafting{
" R ", "RIR", " R ", " R ", "RIR", " R ",
'I', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 'I', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'R', "dustRedstone")); 'R', "dustRedstone"));
recipeCoil = Util.lastIRecipe(); recipeCoil = Util.GetRecipes.lastIRecipe();
} }
//Cup //Cup
@ -317,7 +317,7 @@ public class ItemCrafting{
"S S", "SCS", "SSS", "S S", "SCS", "SSS",
'S', "stone", 'S', "stone",
'C', InitItems.itemCoffeeBean)); 'C', InitItems.itemCoffeeBean));
recipeCup = Util.lastIRecipe(); recipeCup = Util.GetRecipes.lastIRecipe();
} }
//Resonant Rice //Resonant Rice
@ -332,7 +332,7 @@ public class ItemCrafting{
" G ", "GCG", " G ", " G ", "GCG", " G ",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'G', "ingotGold")); 'G', "ingotGold"));
recipeCoilAdvanced = Util.lastIRecipe(); recipeCoilAdvanced = Util.GetRecipes.lastIRecipe();
} }
//Ender Pearl //Ender Pearl
@ -353,7 +353,7 @@ public class ItemCrafting{
'D', "gemDiamond", 'D', "gemDiamond",
'P', new ItemStack(Blocks.piston), 'P', new ItemStack(Blocks.piston),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLeafBlowerAdvanced = Util.lastIRecipe(); recipeLeafBlowerAdvanced = Util.GetRecipes.lastIRecipe();
} }
//Phantom Connector //Phantom Connector
@ -363,7 +363,7 @@ public class ItemCrafting{
'Y', Items.ender_eye, 'Y', Items.ender_eye,
'E', Items.ender_pearl, 'E', Items.ender_pearl,
'S', "stickWood")); 'S', "stickWood"));
recipePhantomConnector = Util.lastIRecipe(); recipePhantomConnector = Util.GetRecipes.lastIRecipe();
} }
//Quartz //Quartz
@ -375,7 +375,7 @@ public class ItemCrafting{
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemKnife), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemKnife),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()))); new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal())));
recipeKnife = Util.lastIRecipe(); recipeKnife = Util.GetRecipes.lastIRecipe();
} }
//Crafter on a Stick //Crafter on a Stick
@ -388,10 +388,10 @@ public class ItemCrafting{
//Tiny Coal //Tiny Coal
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_COAL.ordinal()), GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_COAL.ordinal()),
new ItemStack(Items.coal)); new ItemStack(Items.coal));
recipeTinyCoal = Util.lastIRecipe(); recipeTinyCoal = Util.GetRecipes.lastIRecipe();
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_CHAR.ordinal()), GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_CHAR.ordinal()),
new ItemStack(Items.coal, 1, 1)); new ItemStack(Items.coal, 1, 1));
recipeTinyChar = Util.lastIRecipe(); recipeTinyChar = Util.GetRecipes.lastIRecipe();
//Rice Seeds //Rice Seeds
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed), GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed),
@ -430,7 +430,7 @@ public class ItemCrafting{
'G', "ingotGold", 'G', "ingotGold",
'I', "ingotIron", 'I', "ingotIron",
'D', "dustGlowstone")); 'D', "dustGlowstone"));
recipeRing = Util.lastIRecipe(); recipeRing = Util.GetRecipes.lastIRecipe();
if(ConfigCrafting.RING_SPEED.isEnabled()){ if(ConfigCrafting.RING_SPEED.isEnabled()){
addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal()); addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal());
@ -466,9 +466,9 @@ public class ItemCrafting{
public static void addRingRecipeWithStack(ItemStack mainStack, int meta){ public static void addRingRecipeWithStack(ItemStack mainStack, int meta){
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRing, 1, meta), mainStack, mainStack, mainStack, mainStack, new ItemStack(Blocks.diamond_block), new ItemStack(Items.nether_wart), new ItemStack(Items.potionitem), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())); GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRing, 1, meta), mainStack, mainStack, mainStack, mainStack, new ItemStack(Blocks.diamond_block), new ItemStack(Items.nether_wart), new ItemStack(Items.potionitem), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
recipesPotionRings.add(Util.lastIRecipe()); recipesPotionRings.add(Util.GetRecipes.lastIRecipe());
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, meta), new ItemStack(InitItems.itemPotionRing, 1, meta), new ItemStack(Items.nether_star), new ItemStack(Items.nether_star)); GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, meta), new ItemStack(InitItems.itemPotionRing, 1, meta), new ItemStack(Items.nether_star), new ItemStack(Items.nether_star));
recipesPotionRings.add(Util.lastIRecipe()); recipesPotionRings.add(Util.GetRecipes.lastIRecipe());
} }
public static void initMashedFoodRecipes(){ public static void initMashedFoodRecipes(){
@ -478,7 +478,7 @@ public class ItemCrafting{
if(!isBlacklisted(item)){ if(!isBlacklisted(item)){
ItemStack ingredient = new ItemStack((Item)item, 1, Util.WILDCARD); ItemStack ingredient = new ItemStack((Item)item, 1, Util.WILDCARD);
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.MASHED_FOOD.ordinal()), ingredient, ingredient, ingredient, ingredient, new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD)); GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.MASHED_FOOD.ordinal()), ingredient, ingredient, ingredient, ingredient, new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD));
recipesMashedFood.add(Util.lastIRecipe()); recipesMashedFood.add(Util.GetRecipes.lastIRecipe());
} }
} }
} }

View file

@ -29,14 +29,14 @@ public class MiscCrafting{
if(ConfigCrafting.DOUGH.isEnabled()){ if(ConfigCrafting.DOUGH.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()),
"cropWheat", "cropWheat")); "cropWheat", "cropWheat"));
ItemCrafting.recipeDough = Util.lastIRecipe(); ItemCrafting.recipeDough = Util.GetRecipes.lastIRecipe();
} }
//Rice Dough //Rice Dough
if(ConfigCrafting.RICE_DOUGH.isEnabled()){ if(ConfigCrafting.RICE_DOUGH.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.RICE_DOUGH.ordinal()), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.RICE_DOUGH.ordinal()),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()))); new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal())));
ItemCrafting.recipeRiceDough = Util.lastIRecipe(); ItemCrafting.recipeRiceDough = Util.GetRecipes.lastIRecipe();
} }
//Paper Cone //Paper Cone
@ -51,7 +51,7 @@ public class MiscCrafting{
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()),
"stickWood", "stickWood",
new ItemStack(Items.leather))); new ItemStack(Items.leather)));
ItemCrafting.recipeKnifeHandle = Util.lastIRecipe(); ItemCrafting.recipeKnifeHandle = Util.GetRecipes.lastIRecipe();
} }
//Knife Blade //Knife Blade
@ -60,7 +60,7 @@ public class MiscCrafting{
"K", "K", "F", "K", "K", "F",
'K', "ingotIron", 'K', "ingotIron",
'F', new ItemStack(Items.flint))); 'F', new ItemStack(Items.flint)));
ItemCrafting.recipeKnifeBlade = Util.lastIRecipe(); ItemCrafting.recipeKnifeBlade = Util.GetRecipes.lastIRecipe();
} }
} }

View file

@ -194,56 +194,56 @@ public class ToolCrafting{
new ItemStack(Items.wooden_shovel), new ItemStack(Items.wooden_shovel),
new ItemStack(Items.wooden_sword), new ItemStack(Items.wooden_sword),
new ItemStack(Items.wooden_hoe))); new ItemStack(Items.wooden_hoe)));
recipesPaxels.add(Util.lastIRecipe()); recipesPaxels.add(Util.GetRecipes.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.stonePaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.stonePaxel),
new ItemStack(Items.stone_axe), new ItemStack(Items.stone_axe),
new ItemStack(Items.stone_pickaxe), new ItemStack(Items.stone_pickaxe),
new ItemStack(Items.stone_shovel), new ItemStack(Items.stone_shovel),
new ItemStack(Items.stone_sword), new ItemStack(Items.stone_sword),
new ItemStack(Items.stone_hoe))); new ItemStack(Items.stone_hoe)));
recipesPaxels.add(Util.lastIRecipe()); recipesPaxels.add(Util.GetRecipes.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.ironPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.ironPaxel),
new ItemStack(Items.iron_axe), new ItemStack(Items.iron_axe),
new ItemStack(Items.iron_pickaxe), new ItemStack(Items.iron_pickaxe),
new ItemStack(Items.iron_shovel), new ItemStack(Items.iron_shovel),
new ItemStack(Items.iron_sword), new ItemStack(Items.iron_sword),
new ItemStack(Items.iron_hoe))); new ItemStack(Items.iron_hoe)));
recipesPaxels.add(Util.lastIRecipe()); recipesPaxels.add(Util.GetRecipes.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.goldPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.goldPaxel),
new ItemStack(Items.golden_axe), new ItemStack(Items.golden_axe),
new ItemStack(Items.golden_pickaxe), new ItemStack(Items.golden_pickaxe),
new ItemStack(Items.golden_shovel), new ItemStack(Items.golden_shovel),
new ItemStack(Items.golden_sword), new ItemStack(Items.golden_sword),
new ItemStack(Items.golden_hoe))); new ItemStack(Items.golden_hoe)));
recipesPaxels.add(Util.lastIRecipe()); recipesPaxels.add(Util.GetRecipes.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.diamondPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.diamondPaxel),
new ItemStack(Items.diamond_axe), new ItemStack(Items.diamond_axe),
new ItemStack(Items.diamond_pickaxe), new ItemStack(Items.diamond_pickaxe),
new ItemStack(Items.diamond_shovel), new ItemStack(Items.diamond_shovel),
new ItemStack(Items.diamond_sword), new ItemStack(Items.diamond_sword),
new ItemStack(Items.diamond_hoe))); new ItemStack(Items.diamond_hoe)));
recipesPaxels.add(Util.lastIRecipe()); recipesPaxels.add(Util.GetRecipes.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.emeraldPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.emeraldPaxel),
new ItemStack(InitItems.itemAxeEmerald), new ItemStack(InitItems.itemAxeEmerald),
new ItemStack(InitItems.itemPickaxeEmerald), new ItemStack(InitItems.itemPickaxeEmerald),
new ItemStack(InitItems.itemSwordEmerald), new ItemStack(InitItems.itemSwordEmerald),
new ItemStack(InitItems.itemShovelEmerald), new ItemStack(InitItems.itemShovelEmerald),
new ItemStack(InitItems.itemHoeEmerald))); new ItemStack(InitItems.itemHoeEmerald)));
recipesPaxels.add(Util.lastIRecipe()); recipesPaxels.add(Util.GetRecipes.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.obsidianPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.obsidianPaxel),
new ItemStack(InitItems.itemAxeObsidian), new ItemStack(InitItems.itemAxeObsidian),
new ItemStack(InitItems.itemPickaxeObsidian), new ItemStack(InitItems.itemPickaxeObsidian),
new ItemStack(InitItems.itemSwordObsidian), new ItemStack(InitItems.itemSwordObsidian),
new ItemStack(InitItems.itemShovelObsidian), new ItemStack(InitItems.itemShovelObsidian),
new ItemStack(InitItems.itemHoeObsidian))); new ItemStack(InitItems.itemHoeObsidian)));
recipesPaxels.add(Util.lastIRecipe()); recipesPaxels.add(Util.GetRecipes.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.quartzPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.quartzPaxel),
new ItemStack(InitItems.itemAxeQuartz), new ItemStack(InitItems.itemAxeQuartz),
new ItemStack(InitItems.itemPickaxeQuartz), new ItemStack(InitItems.itemPickaxeQuartz),
new ItemStack(InitItems.itemSwordQuartz), new ItemStack(InitItems.itemSwordQuartz),
new ItemStack(InitItems.itemShovelQuartz), new ItemStack(InitItems.itemShovelQuartz),
new ItemStack(InitItems.itemHoeQuartz))); new ItemStack(InitItems.itemHoeQuartz)));
recipesPaxels.add(Util.lastIRecipe()); recipesPaxels.add(Util.GetRecipes.lastIRecipe());
} }
} }

View file

@ -33,17 +33,17 @@ public class KeyStates{
private boolean pressed; private boolean pressed;
private boolean pressedLastTime; private boolean pressedLastTime;
private boolean recentlyCheckedPress;
public void tick(boolean pressed){ public void tick(boolean pressed){
this.pressed = pressed && !this.pressedLastTime; this.pressed = pressed && !this.pressedLastTime;
this.pressedLastTime = pressed; this.pressedLastTime = pressed;
this.recentlyCheckedPress = false;
} }
public boolean isPressed(){ public boolean checkPressed(boolean shouldUnpress){
boolean isPressed = this.pressed && !this.recentlyCheckedPress; boolean isPressed = this.pressed;
this.recentlyCheckedPress = true; if(shouldUnpress){
this.pressed = false;
}
return isPressed; return isPressed;
} }
} }

View file

@ -41,7 +41,7 @@ public class TooltipEvent{
int keyCode = KeyBinds.keybindOpenBooklet.getKeyCode(); int keyCode = KeyBinds.keybindOpenBooklet.getKeyCode();
event.toolTip.add(EnumChatFormatting.GOLD+StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID_LOWER+".keyToSeeRecipe", keyCode > 0 && keyCode < Keyboard.KEYBOARD_SIZE ? "'"+Keyboard.getKeyName(keyCode)+"'" : "[NONE]")); event.toolTip.add(EnumChatFormatting.GOLD+StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID_LOWER+".keyToSeeRecipe", keyCode > 0 && keyCode < Keyboard.KEYBOARD_SIZE ? "'"+Keyboard.getKeyName(keyCode)+"'" : "[NONE]"));
} }
if(KeyStates.infoButtonState.isPressed()){ if(KeyStates.infoButtonState.checkPressed(true)){
GuiBooklet book = new GuiBooklet(Minecraft.getMinecraft().currentScreen); GuiBooklet book = new GuiBooklet(Minecraft.getMinecraft().currentScreen);
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
Minecraft.getMinecraft().displayGuiScreen(book); Minecraft.getMinecraft().displayGuiScreen(book);

View file

@ -56,7 +56,7 @@ public class InitForeignPaxels{
if(ConfigCrafting.PAXELS.isEnabled()){ if(ConfigCrafting.PAXELS.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(mtPaxels[i], axe, pickaxe, hoe, sword, shovel)); GameRegistry.addRecipe(new ShapelessOreRecipe(mtPaxels[i], axe, pickaxe, hoe, sword, shovel));
ToolCrafting.recipesPaxels.add(Util.lastIRecipe()); ToolCrafting.recipesPaxels.add(Util.GetRecipes.lastIRecipe());
} }
} }
} }
@ -86,7 +86,7 @@ public class InitForeignPaxels{
if(ConfigCrafting.PAXELS.isEnabled()){ if(ConfigCrafting.PAXELS.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(tfPaxels[i], axe, pickaxe, hoe, sword, shovel)); GameRegistry.addRecipe(new ShapelessOreRecipe(tfPaxels[i], axe, pickaxe, hoe, sword, shovel));
ToolCrafting.recipesPaxels.add(Util.lastIRecipe()); ToolCrafting.recipesPaxels.add(Util.GetRecipes.lastIRecipe());
} }
} }
} }

View file

@ -11,6 +11,7 @@
package ellpeck.actuallyadditions.util; package ellpeck.actuallyadditions.util;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import ellpeck.actuallyadditions.recipe.CrusherRecipeRegistry;
import net.minecraft.block.BlockDispenser; import net.minecraft.block.BlockDispenser;
import net.minecraft.dispenser.BehaviorDefaultDispenseItem; import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
import net.minecraft.item.Item; import net.minecraft.item.Item;
@ -19,6 +20,7 @@ import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@SuppressWarnings("unused") @SuppressWarnings("unused")
@ -35,12 +37,6 @@ public class Util{
BlockDispenser.dispenseBehaviorRegistry.putObject(item, handler); BlockDispenser.dispenseBehaviorRegistry.putObject(item, handler);
} }
public static IRecipe lastIRecipe(){
List list = CraftingManager.getInstance().getRecipeList();
Object recipe = list.get(list.size()-1);
return recipe instanceof IRecipe ? (IRecipe)recipe : null;
}
public static int arrayContains(Object[] array, Object obj){ public static int arrayContains(Object[] array, Object obj){
if(obj != null){ if(obj != null){
for(int i = 0; i < array.length; i++){ for(int i = 0; i < array.length; i++){
@ -51,4 +47,18 @@ public class Util{
} }
return -1; return -1;
} }
public static class GetRecipes{
public static CrusherRecipeRegistry.CrusherRecipe lastCrusherRecipe(){
ArrayList<CrusherRecipeRegistry.CrusherRecipe> list = CrusherRecipeRegistry.recipes;
return list.get(list.size()-1);
}
public static IRecipe lastIRecipe(){
List list = CraftingManager.getInstance().getRecipeList();
Object recipe = list.get(list.size()-1);
return recipe instanceof IRecipe ? (IRecipe)recipe : null;
}
}
} }