From 3bc2e46b5515b958c8ed53134faf715ee545431f Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Wed, 5 Aug 2015 00:15:36 +0200 Subject: [PATCH] Fixed slabs not placing against doubleslabs, closes #269 Removed Arc Furance from rreative tab. My oversight, but users are stil la bit dense. fixed Villager selling the wrong wire fixed steel not beign craftable into blocks and nuggets --- .../ImmersiveEngineering.java | 2 +- .../common/IERecipes.java | 46 ++++++++++--------- .../common/IEVillagerTradeHandler.java | 4 +- .../common/blocks/ItemBlockIESlabs.java | 3 +- .../blocks/metal/BlockMetalMultiblocks.java | 18 +++++++- .../blocks/metal/TileEntityArcFurnace.java | 1 - 6 files changed, 46 insertions(+), 28 deletions(-) diff --git a/src/main/java/blusunrize/immersiveengineering/ImmersiveEngineering.java b/src/main/java/blusunrize/immersiveengineering/ImmersiveEngineering.java index fafcf88eaa..c922f9e337 100644 --- a/src/main/java/blusunrize/immersiveengineering/ImmersiveEngineering.java +++ b/src/main/java/blusunrize/immersiveengineering/ImmersiveEngineering.java @@ -89,7 +89,7 @@ public void postInit(FMLPostInitializationEvent event) for(IECompatModule compat : IECompatModule.modules) if(Loader.isModLoaded(compat.modId)) compat.postInit(); - IERecipes.postInitCrusherRecipes(); + IERecipes.postInitCrusherAndArcRecipes(); } @Mod.EventHandler public void loadComplete(FMLLoadCompleteEvent event) diff --git a/src/main/java/blusunrize/immersiveengineering/common/IERecipes.java b/src/main/java/blusunrize/immersiveengineering/common/IERecipes.java index ca4b0a9a39..f519714d05 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/IERecipes.java +++ b/src/main/java/blusunrize/immersiveengineering/common/IERecipes.java @@ -161,7 +161,7 @@ else if(!OreDictionary.getOres("ingotCyanite").isEmpty()) addOredictRecipe(new ItemStack(IEContent.blockStoneDevice,2,4), " G ","IDI"," G ", 'G',"blockGlass",'I',"dustIron",'D',"dyeGreen"); addTwoWayStorageRecipe(new ItemStack(Items.iron_ingot), new ItemStack(IEContent.itemMetal,1,21)); - for(int i=0; i<7; i++) + for(int i=0; i<=7; i++) { addTwoWayStorageRecipe(new ItemStack(IEContent.itemMetal,1,i), new ItemStack(IEContent.itemMetal,1,22+i)); addTwoWayStorageRecipe(new ItemStack(IEContent.blockStorage,1,i), new ItemStack(IEContent.itemMetal,1,i)); @@ -221,7 +221,7 @@ public static void addTwoWayStorageRecipe(ItemStack storage, ItemStack component addOredictRecipe(storage, "III","III","III", 'I',component); addShapelessOredictRecipe(Utils.copyStackWithAmount(component,9), storage); } - + public static void initFurnaceRecipes() { @@ -268,7 +268,7 @@ public static void initCrusherRecipes() oreOutputModifier.put("Nickel", new ItemStack(IEContent.itemMetal,2,14)); oreOutputSecondaries.put("Nickel", new Object[]{"dustPlatinum",.1f}); - + addCrusherRecipe(new ItemStack(IEContent.itemMetal,1,15), "ingotConstantan", 3600, null,0); addCrusherRecipe(new ItemStack(IEContent.itemMetal,1,16), "ingotElectrum", 3600, null,0); addCrusherRecipe(new ItemStack(IEContent.itemMetal,1,19), "ingotHOPGraphite", 3600, null,0); @@ -305,7 +305,7 @@ public static void initCrusherRecipes() addItemToOreDictCrusherRecipe("dustCoal",1, new ItemStack(Items.coal), 2400); addItemToOreDictCrusherRecipe("dustWood",2, "logWood", 1600); } - public static void postInitCrusherRecipes() + public static void postInitCrusherAndArcRecipes() { for(String name : OreDictionary.getOreNames()) if(name.startsWith("ore")) @@ -331,6 +331,16 @@ public static void postInitCrusherRecipes() Float f = secondaries!=null&&secondaries.length>1&&secondaries[1] instanceof Float?(Float)secondaries[1]: 0; addOreProcessingRecipe(out, ore, 6000, true, s, f); } + + out = arcOutputModifier.get(ore); + if(out==null) + { + ArrayList ingots = OreDictionary.getOres("ingot"+ore); + if(!ingots.isEmpty()) + out = Utils.copyStackWithAmount(ingots.get(0), 2); + } + if(out!=null) + addArcRecipe(out, "ore"+ore, 200,512, new ItemStack(IEContent.itemMaterial,1,13)); } } @@ -395,29 +405,21 @@ public static CrusherRecipe addItemToOreDictCrusherRecipe(String oreName, int ou } - + public static HashMap arcOutputModifier = new HashMap(); public static void initArcSmeltingRecipes() { //Steel ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,1,7), "ingotIron", new ItemStack(IEContent.itemMaterial,1,13), 400,512, "dustCoke"); ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,1,7), "dustIron", new ItemStack(IEContent.itemMaterial,1,13), 400,512, "dustCoke"); //Vanilla+IE Ores - ArcFurnaceRecipe.addRecipe(new ItemStack(Items.iron_ingot,2), "oreIron", new ItemStack(IEContent.itemMaterial,1,13), 200,512); - ArcFurnaceRecipe.addRecipe(new ItemStack(Items.gold_ingot,2), "oreGold", new ItemStack(IEContent.itemMaterial,1,13), 200,512); - ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,2,0), "oreCopper", new ItemStack(IEContent.itemMaterial,1,13), 200,512); - ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,2,1), "oreAluminum", new ItemStack(IEContent.itemMaterial,1,13), 200,512); - ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,2,2), "oreLead", new ItemStack(IEContent.itemMaterial,1,13), 200,512); - ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,2,3), "oreSilver", new ItemStack(IEContent.itemMaterial,1,13), 200,512); - ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,2,4), "oreNickel", new ItemStack(IEContent.itemMaterial,1,13), 200,512); - //Other common ores - addArcOreSmelting("Tin"); - addArcOreSmelting("Mithril"); - addArcOreSmelting("Platinum"); - addArcOreSmelting("Ardite"); - addArcOreSmelting("Cobalt"); - addArcOreSmelting("Zinc"); - addArcOreSmelting("Uranium"); - addArcOreSmelting("Yellorium"); + arcOutputModifier.put("Iron", new ItemStack(Items.iron_ingot,2)); + arcOutputModifier.put("Gold", new ItemStack(Items.gold_ingot,2)); + arcOutputModifier.put("Copper", new ItemStack(IEContent.itemMetal,2,0)); + arcOutputModifier.put("Aluminum", new ItemStack(IEContent.itemMetal,2,1)); + arcOutputModifier.put("Aluminium", new ItemStack(IEContent.itemMetal,2,1)); + arcOutputModifier.put("Lead", new ItemStack(IEContent.itemMetal,2,2)); + arcOutputModifier.put("Silver", new ItemStack(IEContent.itemMetal,2,3)); + arcOutputModifier.put("Nickel", new ItemStack(IEContent.itemMetal,2,4)); } public static void addArcRecipe(ItemStack output, Object input, int time, int energyPerTick, ItemStack slag, Object... additives) { @@ -427,7 +429,7 @@ public static void addArcOreSmelting(String oreName) { if(!OreDictionary.getOres("ore"+oreName).isEmpty() && !OreDictionary.getOres("ingot"+oreName).isEmpty() ) { - ItemStack out = OreDictionary.getOres("ingot"+oreName).get(0); + ItemStack out = Utils.copyStackWithAmount(OreDictionary.getOres("ingot"+oreName).get(0), 2); addArcRecipe(out, "ore"+oreName, 200,512, new ItemStack(IEContent.itemMaterial,1,13)); } } diff --git a/src/main/java/blusunrize/immersiveengineering/common/IEVillagerTradeHandler.java b/src/main/java/blusunrize/immersiveengineering/common/IEVillagerTradeHandler.java index b2eff9934b..1c484683ab 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/IEVillagerTradeHandler.java +++ b/src/main/java/blusunrize/immersiveengineering/common/IEVillagerTradeHandler.java @@ -46,8 +46,8 @@ public IEVillagerTradeHandler() addDeal(.4f, new ItemStack(IEContent.itemWireCoil,1,0),12,20, Items.emerald); addDeal(.3f, Items.emerald,1,3, new ItemStack(IEContent.itemWireCoil,1,1),12,20); addDeal(.3f, new ItemStack(IEContent.itemWireCoil,1,1),12,20, Items.emerald,1,3); - addDeal(.2f, Items.emerald,1,3, new ItemStack(IEContent.itemWireCoil,1,1),6,12); - addDeal(.2f, new ItemStack(IEContent.itemWireCoil,1,1),6,12, Items.emerald,1,3); + addDeal(.2f, Items.emerald,1,3, new ItemStack(IEContent.itemWireCoil,1,2),6,12); + addDeal(.2f, new ItemStack(IEContent.itemWireCoil,1,2),6,12, Items.emerald,1,3); addDeal(.4f, Items.emerald,1,3, new ItemStack(IEContent.itemMaterial,1,11),2,6); addDeal(.4f, new ItemStack(IEContent.itemMaterial,1,11),2,6, Items.emerald,1,3); diff --git a/src/main/java/blusunrize/immersiveengineering/common/blocks/ItemBlockIESlabs.java b/src/main/java/blusunrize/immersiveengineering/common/blocks/ItemBlockIESlabs.java index 7603cf9efd..30fc6cd0b4 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/blocks/ItemBlockIESlabs.java +++ b/src/main/java/blusunrize/immersiveengineering/common/blocks/ItemBlockIESlabs.java @@ -69,7 +69,8 @@ else if(field_150939_a.equals(world.getBlock(x1,y1,z1)) && world.getBlockMetadat --stack.stackSize; return true; } - return false; + else + return super.onItemUse(stack,player,world,x,y,z,side,hitX,hitY,hitZ); } @Override diff --git a/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/BlockMetalMultiblocks.java b/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/BlockMetalMultiblocks.java index 36b48aae4c..4bff419601 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/BlockMetalMultiblocks.java +++ b/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/BlockMetalMultiblocks.java @@ -61,7 +61,7 @@ public boolean allowHammerHarvest(int meta) public void getSubBlocks(Item item, CreativeTabs tab, List list) { for(int i=0; i