From 63b740eacdeb42c8ea17e27ec1cc8d31d2de6f5a Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Sat, 10 May 2014 17:28:30 -0400 Subject: [PATCH] restore te3 recipe plugin --- .../materials/material_alubrass_dust.png | Bin 0 -> 467 bytes .../materials/material_aluminum_dust.png | Bin 0 -> 360 bytes .../items/materials/material_ardite_dust.png | Bin 0 -> 429 bytes .../items/materials/material_cobalt_dust.png | Bin 0 -> 375 bytes .../materials/material_manyullyn_dust.png | Bin 0 -> 375 bytes resources/{assets/tinker => }/pack.mcmeta | 0 src/main/java/tconstruct/common/TRecipes.java | 63 +++++++++++++----- .../java/tconstruct/items/MaterialItem.java | 5 +- .../tconstruct/plugins/PluginController.java | 5 +- .../tconstruct/plugins/te3/TE3Helper.java | 62 +++++++++++++++++ .../plugins/te3/ThermalExpansion.java | 43 ++++++++++++ 11 files changed, 160 insertions(+), 18 deletions(-) create mode 100644 resources/assets/tinker/textures/items/materials/material_alubrass_dust.png create mode 100644 resources/assets/tinker/textures/items/materials/material_aluminum_dust.png create mode 100644 resources/assets/tinker/textures/items/materials/material_ardite_dust.png create mode 100644 resources/assets/tinker/textures/items/materials/material_cobalt_dust.png create mode 100644 resources/assets/tinker/textures/items/materials/material_manyullyn_dust.png rename resources/{assets/tinker => }/pack.mcmeta (100%) create mode 100644 src/main/java/tconstruct/plugins/te3/TE3Helper.java create mode 100644 src/main/java/tconstruct/plugins/te3/ThermalExpansion.java diff --git a/resources/assets/tinker/textures/items/materials/material_alubrass_dust.png b/resources/assets/tinker/textures/items/materials/material_alubrass_dust.png new file mode 100644 index 0000000000000000000000000000000000000000..61159695e19faaf9229cd88afc3dd9bdddc51d04 GIT binary patch literal 467 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{^MbQ4*Y=R#Ki=l*$m0n3-3i=jR%tP-d)Ws%L2E{@KZ#fq~KA z)5S5w!aw=P|Nr)`5~~$7;rJW}7Z=mx2@?d`Hf%6xd+{Qp&60Q3|8&z8fBQQ+7`hvu zB)lq+5|EQSCm=3|o~N>T0Ny9o(M1 zukOsJ|2tdR{y)F6;vf6YrUi_bSBE~BmH6Y1QuBXx_00e8^#gzLe`X6~uJW4tFaBoU zum9I9vqhNCow@dVzsQTG)w|FBFBjGR%f6H8aKp8j*8k6^OZ~Gq_U6wyvDH~Dp{8{G z&;QAHqyF=kW&N8Uy6jJV_Tpdl6QX#Sqc(~D%U==xyS{Gc!~fdWXaB{=WdHepC`;L3 z?{d$-|NRv1-COjp-q;{)gA~IjrZW?K6`H3>G{u_i3=mwC$t@6nFNf(`k1K6 zR;CvBShk8TlU&bez+=qOcJZkpkAirzsEXYGbOwgk`8BWkmizJpBY?rv)z4*}Q$iB} DN%+4T literal 0 HcmV?d00001 diff --git a/resources/assets/tinker/textures/items/materials/material_aluminum_dust.png b/resources/assets/tinker/textures/items/materials/material_aluminum_dust.png new file mode 100644 index 0000000000000000000000000000000000000000..657f8ea95122907629522cf0c3e80f3bc6e0b64b GIT binary patch literal 360 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+L6~vJ#O${~L8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3Q$0gN_s>q|KvhpX zT^vI!{FhF+$<<;Y!1DQj{qsitu1CCG3SAY7=awlymUD|NXXo;{y;6cz@NcWxo@OvQ z{4YV`SYPI>L)&sEs&F!%-W2lfmZj)|Hx_*-KF1up?ZEVKwac+8#;(X|Co^WJMy|+| z>Uun5pO8zS%Jlclj-jCq|Kx1V*T^vI!{FhGH>BZtG;`%r~&rnfo z<7%pFFo;)p)Yh4hq!IW2^){EZtSi?Zd{`B?w|dtq$4~JUvvWU~-F}d}?P0MXi=(fI ztH&gk)W}CQVm7ncH|wmfE_?Qjjq8$$YiQ^Tz14fK7i{EsR@rCKC)oBdp|N(M23O2E z(}S~Q1-*@UZ|T;F%sH3w`cNNB&Ey9aLM7)vaP^rSDcz{Ok89e2cP+2fDlAxU>HcD2 zHw)-sO`Ph;HPv<8Smo{9rLl`Kq`^ z+k>8Yrbm39Jm~x;w#)oyl(5_n{y9f>1f3{U)_HO0K9`K&lNYw{h5v}=fBr7;KCUoh V`Idi@Pk^Dx;OXk;vd$@?2>_x@s>=WX literal 0 HcmV?d00001 diff --git a/resources/assets/tinker/textures/items/materials/material_cobalt_dust.png b/resources/assets/tinker/textures/items/materials/material_cobalt_dust.png new file mode 100644 index 0000000000000000000000000000000000000000..07835b9c99997a09ce4c7f28fe8223bdb8cb8a2b GIT binary patch literal 375 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|KvmB?T^vI!{FhF!<#TitY0dAr#^>U4h;53Mb;W=Clgd%8eyca|SZ`nq zTd;*W`@)O$b7sp3=BwFs>E{=vohwhDx8ha2#bGrFvJrO_kO&mWT#`J%cVFDuHgKYW%Ybm!6H2c<@; z0zB8mr@r&~$+MgxRpwZT2Lh4QhgYw2&C+NdQxTW%X=!Oj7~X04w9!C ze#bG+bKrDs2zIP5-L~nwe849yr8AZ1v=wyrhgTe~DWM4fCB=$q literal 0 HcmV?d00001 diff --git a/resources/assets/tinker/textures/items/materials/material_manyullyn_dust.png b/resources/assets/tinker/textures/items/materials/material_manyullyn_dust.png new file mode 100644 index 0000000000000000000000000000000000000000..757ccd02815de3d80a8c440fc97713b1a02f5175 GIT binary patch literal 375 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|KvmB?T^vI!{FhF!<#TitY0d9Q?dUipG=<7&-6dXgbib$YYYq#7#P>x8`b} z*mTC|&Br<66PB$E2~B-^*@<_}XPfC3eX2ap`x%707Ogma{Li}fkIvZL)bK2a!o>ELLHJBTdhKgTFP< O#|)mXelF{r5}E)}CY5{u literal 0 HcmV?d00001 diff --git a/resources/assets/tinker/pack.mcmeta b/resources/pack.mcmeta similarity index 100% rename from resources/assets/tinker/pack.mcmeta rename to resources/pack.mcmeta diff --git a/src/main/java/tconstruct/common/TRecipes.java b/src/main/java/tconstruct/common/TRecipes.java index 5d833b61..391bf79c 100644 --- a/src/main/java/tconstruct/common/TRecipes.java +++ b/src/main/java/tconstruct/common/TRecipes.java @@ -349,8 +349,10 @@ public class TRecipes ItemStack diamond = new ItemStack(Items.diamond); tb.registerToolMod(new ModRepair()); - tb.registerToolMod(new ModDurability(new ItemStack[] { diamond }, 0, 500, 0f, 3, StatCollector.translateToLocal("gui.modifier.diamond"), "\u00a7b" + StatCollector.translateToLocal("modifier.tool.diamond"), "\u00a7b")); - tb.registerToolMod(new ModDurability(new ItemStack[] { new ItemStack(Items.emerald) }, 1, 0, 0.5f, 2, StatCollector.translateToLocal("gui.modifier.emerald"), "\u00a72" + StatCollector.translateToLocal("modifier.tool.emerald"), "\u00a72")); + tb.registerToolMod(new ModDurability(new ItemStack[] { diamond }, 0, 500, 0f, 3, StatCollector.translateToLocal("gui.modifier.diamond"), "\u00a7b" + + StatCollector.translateToLocal("modifier.tool.diamond"), "\u00a7b")); + tb.registerToolMod(new ModDurability(new ItemStack[] { new ItemStack(Items.emerald) }, 1, 0, 0.5f, 2, StatCollector.translateToLocal("gui.modifier.emerald"), "\u00a72" + + StatCollector.translateToLocal("modifier.tool.emerald"), "\u00a72")); TRepo.modFlux = new ModFlux(); tb.registerToolMod(TRepo.modFlux); @@ -364,13 +366,17 @@ public class TRecipes TRepo.modLapis = new ModLapis(10, new ItemStack[] { lapisItem, lapisBlock }, new int[] { 1, 9 }); tb.registerToolMod(TRepo.modLapis); - tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(TRepo.materials, 1, 6) }, 4, StatCollector.translateToLocal("gui.modifier.moss"), 3, "\u00a72", StatCollector.translateToLocal("modifier.tool.moss"))); + tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(TRepo.materials, 1, 6) }, 4, StatCollector.translateToLocal("gui.modifier.moss"), 3, "\u00a72", StatCollector + .translateToLocal("modifier.tool.moss"))); ItemStack blazePowder = new ItemStack(Items.blaze_powder); tb.registerToolMod(new ModBlaze(7, new ItemStack[] { blazePowder }, new int[] { 1 })); - tb.registerToolMod(new ModAutoSmelt(new ItemStack[] { new ItemStack(TRepo.materials, 1, 7) }, 6, StatCollector.translateToLocal("gui.modifier.lava"), "\u00a74", StatCollector.translateToLocal("modifier.tool.lava"))); - tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(TRepo.materials, 1, 8) }, 8, StatCollector.translateToLocal("gui.modifier.necro"), 1, "\u00a78", StatCollector.translateToLocal("modifier.tool.necro"))); + tb.registerToolMod(new ModAutoSmelt(new ItemStack[] { new ItemStack(TRepo.materials, 1, 7) }, 6, StatCollector.translateToLocal("gui.modifier.lava"), "\u00a74", StatCollector + .translateToLocal("modifier.tool.lava"))); + tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(TRepo.materials, 1, 8) }, 8, StatCollector.translateToLocal("gui.modifier.necro"), 1, "\u00a78", StatCollector + .translateToLocal("modifier.tool.necro"))); - TRepo.modAttack = new ModAttack(StatCollector.translateToLocal("gui.modifier.quartz"), 11, new ItemStack[] { new ItemStack(Items.quartz), new ItemStack(Blocks.quartz_block, 1, Short.MAX_VALUE) }, new int[] { 1, 4 }); + TRepo.modAttack = new ModAttack(StatCollector.translateToLocal("gui.modifier.quartz"), 11, new ItemStack[] { new ItemStack(Items.quartz), + new ItemStack(Blocks.quartz_block, 1, Short.MAX_VALUE) }, new int[] { 1, 4 }); tb.registerToolMod(TRepo.modAttack); tb.registerToolMod(new ModExtraModifier(new ItemStack[] { diamond, new ItemStack(Blocks.gold_block) }, "Tier1Free")); @@ -384,7 +390,8 @@ public class TRecipes ItemStack piston = new ItemStack(Blocks.piston); tb.registerToolMod(new ModPiston(3, new ItemStack[] { piston }, new int[] { 1 })); - tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(Blocks.obsidian), new ItemStack(Items.ender_pearl) }, 13, StatCollector.translateToLocal("modifier.tool.beheading"), 1, "\u00a7d", StatCollector.translateToLocal("modifier.tool.beheading"))); + tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(Blocks.obsidian), new ItemStack(Items.ender_pearl) }, 13, StatCollector.translateToLocal("modifier.tool.beheading"), 1, + "\u00a7d", StatCollector.translateToLocal("modifier.tool.beheading"))); ItemStack holySoil = new ItemStack(TRepo.craftedSoil, 1, 4); tb.registerToolMod(new ModSmite(StatCollector.translateToLocal("modifier.tool.smite"), 14, new ItemStack[] { holySoil }, new int[] { 1 })); @@ -566,6 +573,12 @@ public class TRecipes FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreGravel, 1, 4), new ItemStack(TRepo.materials, 1, 11), 0.2f); FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.speedBlock, 1, 0), new ItemStack(TRepo.speedBlock, 1, 2), 0.2f); + FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 38), new ItemStack(TRepo.materials, 1, 4), 0.2f); + FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 39), new ItemStack(TRepo.materials, 1, 3), 0.2f); + FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 40), new ItemStack(TRepo.materials, 1, 11), 0.2f); + FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 41), new ItemStack(TRepo.materials, 1, 5), 0.2f); + FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 42), new ItemStack(TRepo.materials, 1, 14), 0.2f); + } protected static void addRecipesForCraftingTable () @@ -886,6 +899,10 @@ public class TRecipes new ItemStack(TRepo.strangeFood, 1, 1), new ItemStack(TRepo.strangeFood, 1, 1), new ItemStack(Items.redstone)); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.slimeChannel, 1, 0), "slimeball", "slimeball", "slimeball", "slimeball", new ItemStack(Items.redstone))); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.slimePad, 1, 0), TRepo.slimeChannel, "slimeball")); + + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.materials, 1, 41), "dustArdite", "dustCobalt")); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.materials, 4, 42), "dustAluminium", "dustCopper", "dustCopper", "dustCopper")); + } protected static void addRecipesForDryingRack () @@ -1032,6 +1049,14 @@ public class TRecipes ensureOreIsRegistered("nuggetGold", new ItemStack(Items.gold_nugget)); OreDictionary.registerOre("nuggetPigIron", new ItemStack(TRepo.materials, 1, 35)); + OreDictionary.registerOre("dustArdite", new ItemStack(TRepo.materials, 1, 38)); + OreDictionary.registerOre("dustCobalt", new ItemStack(TRepo.materials, 1, 39)); + OreDictionary.registerOre("dustAluminium", new ItemStack(TRepo.materials, 1, 40)); + OreDictionary.registerOre("dustAluminum", new ItemStack(TRepo.materials, 1, 40)); + OreDictionary.registerOre("dustManyullyn", new ItemStack(TRepo.materials, 1, 41)); + OreDictionary.registerOre("dustAluminiumBrass", new ItemStack(TRepo.materials, 1, 42)); + OreDictionary.registerOre("dustAluminumBrass", new ItemStack(TRepo.materials, 1, 42)); + OreDictionary.registerOre("slabCloth", new ItemStack(TRepo.woolSlab1, 1, Short.MAX_VALUE)); OreDictionary.registerOre("slabCloth", new ItemStack(TRepo.woolSlab2, 1, Short.MAX_VALUE)); @@ -1045,10 +1070,11 @@ public class TRecipes String[] matNames = { "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze", "Alumite", "Steel", "Blueslime" }; - for (int i = 0; i < matNames.length; i++){ + for (int i = 0; i < matNames.length; i++) + { //TODO 1.8 remove this ore dict entry as it's outdated(use materialRod instead) OreDictionary.registerOre(matNames[i].toLowerCase() + "Rod", new ItemStack(TRepo.toolRod, 1, i)); - OreDictionary.registerOre("rod" + matNames[i] , new ItemStack(TRepo.toolRod, 1, i)); + OreDictionary.registerOre("rod" + matNames[i], new ItemStack(TRepo.toolRod, 1, i)); } OreDictionary.registerOre("thaumiumRod", new ItemStack(TRepo.toolRod, 1, 31)); @@ -1197,7 +1223,7 @@ public class TRecipes RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_hoe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_sword)); } - + if (PHConstruct.labotimizeVanillaTools) { Items.wooden_pickaxe.setMaxDamage(1); @@ -1205,25 +1231,25 @@ public class TRecipes Items.wooden_shovel.setMaxDamage(1); Items.wooden_hoe.setMaxDamage(1); Items.wooden_sword.setMaxDamage(1); - + Items.stone_pickaxe.setMaxDamage(1); Items.stone_axe.setMaxDamage(1); Items.stone_shovel.setMaxDamage(1); Items.stone_hoe.setMaxDamage(1); Items.stone_sword.setMaxDamage(1); - + Items.iron_pickaxe.setMaxDamage(1); Items.iron_axe.setMaxDamage(1); Items.iron_shovel.setMaxDamage(1); Items.iron_hoe.setMaxDamage(1); Items.iron_sword.setMaxDamage(1); - + Items.diamond_pickaxe.setMaxDamage(1); Items.diamond_axe.setMaxDamage(1); Items.diamond_shovel.setMaxDamage(1); Items.diamond_hoe.setMaxDamage(1); Items.diamond_sword.setMaxDamage(1); - + Items.golden_pickaxe.setMaxDamage(1); Items.golden_axe.setMaxDamage(1); Items.golden_shovel.setMaxDamage(1); @@ -1362,6 +1388,12 @@ public class TRecipes Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.shears), 0, TConstruct.ingotLiquidValue * 2); Smeltery.addMelting(FluidType.Emerald, new ItemStack(Items.emerald), -50, 640); + Smeltery.addMelting(FluidType.Ardite, new ItemStack(TRepo.materials, 1, 38), 0, TConstruct.ingotLiquidValue); + Smeltery.addMelting(FluidType.Cobalt, new ItemStack(TRepo.materials, 1, 39), 0, TConstruct.ingotLiquidValue); + Smeltery.addMelting(FluidType.Aluminum, new ItemStack(TRepo.materials, 1, 40), 0, TConstruct.ingotLiquidValue); + Smeltery.addMelting(FluidType.Manyullyn, new ItemStack(TRepo.materials, 1, 41), 0, TConstruct.ingotLiquidValue); + Smeltery.addMelting(FluidType.AluminumBrass, new ItemStack(TRepo.materials, 1, 42), 0, TConstruct.ingotLiquidValue); + // Blocks melt as themselves! // Ore Smeltery.addMelting(Blocks.iron_ore, 0, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2)); @@ -1484,7 +1516,8 @@ public class TRecipes TRepo.thaumcraftAvailable = true; TConstructClientRegistry.addMaterialRenderMapping(31, "tinker", "thaumium", true); TConstructRegistry.addToolMaterial(31, "Thaumium", 3, 400, 700, 2, 1.3F, 0, 0f, "\u00A75", StatCollector.translateToLocal("materialtraits.thaumic")); - PatternBuilder.instance.registerFullMaterial(new ItemStack((Item) obj, 1, 2), 2, StatCollector.translateToLocal("gui.partbuilder.material.thaumium"), new ItemStack(TRepo.toolShard, 1, 31), new ItemStack(TRepo.toolRod, 1, 31), 31); + PatternBuilder.instance.registerFullMaterial(new ItemStack((Item) obj, 1, 2), 2, StatCollector.translateToLocal("gui.partbuilder.material.thaumium"), + new ItemStack(TRepo.toolShard, 1, 31), new ItemStack(TRepo.toolRod, 1, 31), 31); for (int meta = 0; meta < TRepo.patternOutputs.length; meta++) { if (TRepo.patternOutputs[meta] != null) diff --git a/src/main/java/tconstruct/items/MaterialItem.java b/src/main/java/tconstruct/items/MaterialItem.java index 5f4b5870..1361712b 100644 --- a/src/main/java/tconstruct/items/MaterialItem.java +++ b/src/main/java/tconstruct/items/MaterialItem.java @@ -27,10 +27,11 @@ public class MaterialItem extends CraftingItem static String[] materialNames = new String[] { "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone", "CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AluBrassIngot", "AlumiteIngot", "SteelIngot", "BlueSlimeCrystal", "ObsidianIngot", "IronNugget", "CopperNugget", "TinNugget", "AluminumNugget", "EssenceCrystal", "AluBrassNugget", "SilkyCloth", "SilkyJewel", "ObsidianNugget", "CobaltNugget", "ArditeNugget", "ManyullynNugget", "BronzeNugget", - "AlumiteNugget", "SteelNugget", "PigIronIngot", "PigIronNugget", "GlueBall", "SearedBrick" }; + "AlumiteNugget", "SteelNugget", "PigIronIngot", "PigIronNugget", "GlueBall", "SearedBrick", "ArditeDust", "CobaltDust", "AluminumDust", "ManyullynDust", "AluBrassDust" }; static String[] craftingTextures = new String[] { "paperstack", "slimecrystal", "searedbrick", "cobaltingot", "arditeingot", "manyullyningot", "mossball", "lavacrystal", "necroticbone", "copperingot", "tiningot", "aluminumingot", "aluminumraw", "bronzeingot", "alubrassingot", "alumiteingot", "steelingot", "blueslimecrystal", "obsidianingot", "nugget_iron", "nugget_copper", "nugget_tin", "nugget_aluminum", "", "nugget_alubrass", "silkycloth", "silkyjewel", "nugget_obsidian", "nugget_cobalt", "nugget_ardite", "nugget_manyullyn", - "nugget_bronze", "nugget_alumite", "nugget_steel", "pigironingot", "nugget_pigiron", "glueball", "searedbrick_nether" }; + "nugget_bronze", "nugget_alumite", "nugget_steel", "pigironingot", "nugget_pigiron", "glueball", "searedbrick_nether", "ardite_dust", "cobalt_dust", "aluminium_dust", "manyullyn_dust", + "alubrass_dust" }; } diff --git a/src/main/java/tconstruct/plugins/PluginController.java b/src/main/java/tconstruct/plugins/PluginController.java index 50ef099c..f4f6b7af 100644 --- a/src/main/java/tconstruct/plugins/PluginController.java +++ b/src/main/java/tconstruct/plugins/PluginController.java @@ -8,6 +8,8 @@ import tconstruct.plugins.imc.BuildcraftTransport; import tconstruct.plugins.imc.Mystcraft; import tconstruct.plugins.imc.Thaumcraft; import tconstruct.plugins.nei.NotEnoughItems; +import tconstruct.plugins.te3.ThermalExpansion; +import tconstruct.plugins.waila.Waila; public class PluginController { @@ -26,7 +28,8 @@ public class PluginController moduleLoader.registerModule(IC2.class); moduleLoader.registerModule(Thaumcraft.class); moduleLoader.registerModule(NotEnoughItems.class); - + moduleLoader.registerModule(Waila.class); + moduleLoader.registerModule(ThermalExpansion.class); } } diff --git a/src/main/java/tconstruct/plugins/te3/TE3Helper.java b/src/main/java/tconstruct/plugins/te3/TE3Helper.java new file mode 100644 index 00000000..0f43e7f2 --- /dev/null +++ b/src/main/java/tconstruct/plugins/te3/TE3Helper.java @@ -0,0 +1,62 @@ +package tconstruct.plugins.te3; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import cpw.mods.fml.common.event.FMLInterModComms; + +public class TE3Helper { + + public static void addInductionSmelterRecipe(int energy, ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, int chance) + { + NBTTagCompound data = new NBTTagCompound(); + + data.setInteger("energy", energy); + + NBTTagCompound input1Compound = new NBTTagCompound(); + input1.writeToNBT(input1Compound); + data.setTag("primaryInput", input1Compound); + + NBTTagCompound input2Compound = new NBTTagCompound(); + input2.writeToNBT(input2Compound); + data.setTag("secondaryInput", input2Compound); + + NBTTagCompound output1Compound = new NBTTagCompound(); + output1.writeToNBT(output1Compound); + data.setTag("primaryOutput", output1Compound); + + if (output2 != null) { + NBTTagCompound output2Compound = new NBTTagCompound(); + output2.writeToNBT(output2Compound); + data.setTag("secondaryOutput", output2Compound); + + data.setInteger("secondaryChance", chance); + } + + FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", data); + } + + public static void addPulveriserRecipe(int energy, ItemStack input, ItemStack output, ItemStack bonus, int chance) + { + NBTTagCompound data = new NBTTagCompound(); + + data.setInteger("energy", energy); + + NBTTagCompound inputCompound = new NBTTagCompound(); + input.writeToNBT(inputCompound); + data.setTag("input", inputCompound); + + NBTTagCompound outputCompound = new NBTTagCompound(); + output.writeToNBT(outputCompound); + data.setTag("primaryOutput", outputCompound); + + if (bonus != null) { + NBTTagCompound outputCompound2 = new NBTTagCompound(); + bonus.writeToNBT(outputCompound2); + data.setTag("secondaryOutput", outputCompound2); + + data.setInteger("secondaryChance", chance); + } + + FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", data); + } +} \ No newline at end of file diff --git a/src/main/java/tconstruct/plugins/te3/ThermalExpansion.java b/src/main/java/tconstruct/plugins/te3/ThermalExpansion.java new file mode 100644 index 00000000..cecf27ec --- /dev/null +++ b/src/main/java/tconstruct/plugins/te3/ThermalExpansion.java @@ -0,0 +1,43 @@ +package tconstruct.plugins.te3; + +import tconstruct.common.TRepo; +import cpw.mods.fml.common.registry.GameRegistry; +import mantle.module.ILoadableModule; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class ThermalExpansion implements ILoadableModule +{ + + @SuppressWarnings("unused") + public static String modId = "ThermalExpansion"; + + @Override + public void preInit() { + // Nothing + } + + @Override + public void init() + { + ItemStack crystalCinnabar = OreDictionary.getOres("crystalCinnabar").get(0); + + TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 11), new ItemStack(TRepo.materials, 1, 40), null, 0); + TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 3), new ItemStack(TRepo.materials, 1, 39), null, 0); + TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 4), new ItemStack(TRepo.materials, 1, 38), null, 0); + + TE3Helper.addPulveriserRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 1), new ItemStack(TRepo.materials, 2, 39), GameRegistry.findItemStack("ThermalExpansion", "dustIron", 1), 10); + TE3Helper.addInductionSmelterRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 1), crystalCinnabar.copy(), new ItemStack(TRepo.materials, 3, 3), new ItemStack(Items.iron_ingot), 100); + TE3Helper.addPulveriserRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 2), new ItemStack(TRepo.materials, 2, 38), GameRegistry.findItemStack("ThermalExpansion", "dustGold", 1), 10); + TE3Helper.addInductionSmelterRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 2), crystalCinnabar.copy(), new ItemStack(TRepo.materials, 3, 4), new ItemStack(Items.gold_ingot), 100); + + TE3Helper.addInductionSmelterRecipe(4000, new ItemStack(TRepo.materials, 1, 4), new ItemStack(TRepo.materials, 1, 3), new ItemStack(TRepo.materials, 1, 5), null, 0); + TE3Helper.addInductionSmelterRecipe(4000, new ItemStack(TRepo.materials, 1, 9), new ItemStack(TRepo.materials, 3, 11), new ItemStack(TRepo.materials, 4, 14), null, 0); + } @Override + public void postInit() { + // Nothing + } + + +}