From 3de90bded20e30d41b3c4ac2aaf93a290327d1ea Mon Sep 17 00:00:00 2001 From: mDiyo Date: Mon, 30 Jun 2014 14:57:06 -0800 Subject: [PATCH] Modularize TConstruct using Pulsar --- src/main/java/tconstruct/TConstruct.java | 63 +- .../tconstruct/armor/ArmorProxyClient.java | 11 + .../tconstruct/armor/ArmorProxyCommon.java | 12 + .../java/tconstruct/armor/TinkerArmor.java | 25 +- .../tconstruct/blocks/slime/SlimeFluid.java | 3 + .../java/tconstruct/client/TProxyClient.java | 9 +- .../java/tconstruct/common/TProxyCommon.java | 55 +- src/main/java/tconstruct/common/TRecipes.java | 1659 ----------------- src/main/java/tconstruct/common/TRepo.java | 285 --- .../library/crafting/FluidType.java | 34 +- .../mechworks/MechworksProxyClient.java | 12 + .../mechworks/MechworksProxyCommon.java | 15 +- .../tconstruct/mechworks/TinkerMechworks.java | 92 +- .../smeltery/SmelteryProxyClient.java | 15 +- .../smeltery/SmelteryProxyCommon.java | 12 + .../tconstruct/smeltery/TinkerSmeltery.java | 228 ++- .../blocks/CastingChannelBlock.java | 2 +- .../java/tconstruct/tools/TinkerTools.java | 16 +- .../tconstruct/tools/ToolProxyClient.java | 16 + .../tconstruct/tools/ToolProxyCommon.java | 20 +- .../tools/blocks/ToolForgeBlock.java | 4 +- .../java/tconstruct/util/TEventHandler.java | 785 -------- .../tconstruct/util/config/PHConstruct.java | 60 +- .../java/tconstruct/world/TinkerWorld.java | 126 +- 24 files changed, 511 insertions(+), 3048 deletions(-) delete mode 100644 src/main/java/tconstruct/common/TRecipes.java delete mode 100644 src/main/java/tconstruct/common/TRepo.java rename src/main/java/tconstruct/{world => smeltery}/blocks/CastingChannelBlock.java (98%) delete mode 100644 src/main/java/tconstruct/util/TEventHandler.java diff --git a/src/main/java/tconstruct/TConstruct.java b/src/main/java/tconstruct/TConstruct.java index 0137a6939f7..4eeb1f8a39d 100644 --- a/src/main/java/tconstruct/TConstruct.java +++ b/src/main/java/tconstruct/TConstruct.java @@ -3,21 +3,25 @@ import java.util.Random; import mantle.lib.TabTools; -import mantle.module.ModuleController; +import mantle.pulsar.control.PulseManager; +import mantle.pulsar.pulse.IPulse; import net.minecraft.world.gen.structure.MapGenStructureIO; import net.minecraftforge.common.MinecraftForge; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import tconstruct.armor.TinkerArmor; import tconstruct.client.TControls; -import tconstruct.client.event.EventCloakRender; import tconstruct.common.TProxyCommon; import tconstruct.library.TConstructRegistry; import tconstruct.library.crafting.Detailing; import tconstruct.library.crafting.LiquidCasting; +import tconstruct.mechworks.TinkerMechworks; import tconstruct.mechworks.landmine.behavior.Behavior; import tconstruct.mechworks.landmine.behavior.stackCombo.SpecialStackHandler; +import tconstruct.smeltery.TinkerSmeltery; +import tconstruct.tools.TinkerTools; import tconstruct.util.EnvironmentChecks; import tconstruct.util.config.DimensionBlacklist; import tconstruct.util.config.PHConstruct; @@ -25,8 +29,6 @@ import tconstruct.util.player.TPlayerHandler; import tconstruct.world.TinkerWorld; import tconstruct.world.gen.SlimeIslandGen; -import tconstruct.world.gen.TBaseWorldGenerator; -import tconstruct.world.gen.TerrainGenEventHandler; import tconstruct.world.village.ComponentSmeltery; import tconstruct.world.village.ComponentToolWorkshop; import tconstruct.world.village.TVillageTrades; @@ -54,7 +56,7 @@ */ @Mod(modid = "TConstruct", name = "TConstruct", version = "${version}", - dependencies = "required-after:Forge@[9.11,);required-after:Mantle;after:ForgeMultipart;after:MineFactoryReloaded;after:NotEnoughItems;after:Waila;after:ThermalExpansion") + dependencies = "required-after:Forge@[9.11,);required-after:Mantle;after:MineFactoryReloaded;after:NotEnoughItems;after:Waila;after:ThermalExpansion") public class TConstruct { /** The value of one ingot in millibuckets */ @@ -65,32 +67,23 @@ public class TConstruct public static final int nuggetLiquidValue = ingotLiquidValue / 9; public static final int liquidUpdateAmount = 6; - - // the entire mod public static final String modID = "TConstruct"; - - // Shared mod logger public static final Logger logger = LogManager.getLogger(modID); + public static final PacketPipeline packetPipeline = new PacketPipeline(); + public static Random random = new Random(); /* Instance of this mod, used for grabbing prototype fields */ @Instance(modID) public static TConstruct instance; - /* Proxies for sides, used for graphics processing */ + /* Proxies for sides, used for graphics processing and client controls */ @SidedProxy(clientSide = "tconstruct.client.TProxyClient", serverSide = "tconstruct.common.TProxyCommon") public static TProxyCommon proxy; - // Module loader - public static final ModuleController moduleLoader = new ModuleController("TDynstruct.cfg", modID); - - // The packet pipeline - public static final PacketPipeline packetPipeline = new PacketPipeline(); - - public static Random random = new Random(); + /* Loads modules in a way that doesn't clutter the @Mod list */ + private PulseManager pulsar = new PulseManager(modID); //Scheduled to change shortly. public TConstruct() { - - //logger.setParent(FMLCommonHandler.instance().getFMLLogger()); if (Loader.isModLoaded("Natura")) { logger.info("Natura, what are we going to do tomorrow night?"); @@ -102,14 +95,29 @@ public TConstruct() } EnvironmentChecks.verifyEnvironmentSanity(); - //PluginController.registerModules(); } @EventHandler public void preInit (FMLPreInitializationEvent event) { + PHConstruct.initProps(event.getModConfigurationDirectory()); + + //Temporarily hijacked + if (PHConstruct.worldModule) + pulsar.registerPulse(new TinkerWorld()); + if (PHConstruct.toolModule) + pulsar.registerPulse(new TinkerTools()); + if (PHConstruct.smelteryModule) + pulsar.registerPulse(new TinkerSmeltery()); + if (PHConstruct.mechworksModule) + pulsar.registerPulse(new TinkerMechworks()); + if (PHConstruct.armorModule) + pulsar.registerPulse(new TinkerArmor()); + /*if (PHConstruct.prayerModule) + pulsar.registerPulse(new TinkerPrayers()); + if (PHConstruct.cropifyModule) + pulsar.registerPulse(new TinkerCropify());*/ - PHConstruct.initProps(event.getSuggestedConfigurationFile()); TConstructRegistry.materialTab = new TabTools("TConstructMaterials"); TConstructRegistry.toolTab = new TabTools("TConstructTools"); TConstructRegistry.partTab = new TabTools("TConstructParts"); @@ -119,10 +127,7 @@ public void preInit (FMLPreInitializationEvent event) basinCasting = new LiquidCasting(); chiselDetailing = new Detailing(); - GameRegistry.registerWorldGenerator(new TBaseWorldGenerator(), 0); - MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenEventHandler()); //GameRegistry.registerFuelHandler(content); - //NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy); if (PHConstruct.addToVillages) { @@ -147,13 +152,14 @@ public void preInit (FMLPreInitializationEvent event) // GameRegistry.registerPlayerTracker(playerTracker); FMLCommonHandler.instance().bus().register(playerTracker); MinecraftForge.EVENT_BUS.register(playerTracker); + NetworkRegistry.INSTANCE.registerGuiHandler(TConstruct.instance, proxy); if (event.getSide() == Side.CLIENT) { FMLCommonHandler.instance().bus().register(new TControls()); } - moduleLoader.preInit(); + pulsar.preInit(event); } @EventHandler @@ -168,17 +174,18 @@ public void init (FMLInitializationEvent event) DimensionBlacklist.getBadBimensions(); GameRegistry.registerWorldGenerator(new SlimeIslandGen(TinkerWorld.slimePool, 2), 2); - moduleLoader.init(); + pulsar.init(event); } @EventHandler - public void postInit (FMLPostInitializationEvent evt) + public void postInit (FMLPostInitializationEvent event) { packetPipeline.postInitialise(); Behavior.registerBuiltInBehaviors(); SpecialStackHandler.registerBuiltInStackHandlers(); - moduleLoader.postInit(); + proxy.initialize(); + pulsar.postInit(event); } public static LiquidCasting getTableCasting () diff --git a/src/main/java/tconstruct/armor/ArmorProxyClient.java b/src/main/java/tconstruct/armor/ArmorProxyClient.java index ef954f4d938..3211d7e0b86 100644 --- a/src/main/java/tconstruct/armor/ArmorProxyClient.java +++ b/src/main/java/tconstruct/armor/ArmorProxyClient.java @@ -47,6 +47,7 @@ import tconstruct.client.tabs.InventoryTabKnapsack; import tconstruct.client.tabs.InventoryTabVanilla; import tconstruct.client.tabs.TabRegistry; +import tconstruct.common.TProxyCommon; import tconstruct.mechworks.MechworksProxyCommon; import tconstruct.mechworks.inventory.ContainerLandmine; import tconstruct.mechworks.logic.TileEntityLandmine; @@ -68,9 +69,19 @@ public class ArmorProxyClient extends ArmorProxyCommon { public ArmorProxyClient() { + registerGuiHandler(); MinecraftForge.EVENT_BUS.register(this); } + @Override + protected void registerGuiHandler() + { + super.registerGuiHandler(); + TProxyCommon.registerClientGuiHandler(inventoryGui, this); + TProxyCommon.registerClientGuiHandler(armorGuiID, this); + TProxyCommon.registerClientGuiHandler(knapsackGuiID, this); + } + @Override public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) { diff --git a/src/main/java/tconstruct/armor/ArmorProxyCommon.java b/src/main/java/tconstruct/armor/ArmorProxyCommon.java index 7f14608a1e8..8c7e4cd3c93 100644 --- a/src/main/java/tconstruct/armor/ArmorProxyCommon.java +++ b/src/main/java/tconstruct/armor/ArmorProxyCommon.java @@ -2,6 +2,7 @@ import tconstruct.armor.inventory.ArmorExtendedContainer; import tconstruct.armor.inventory.KnapsackContainer; +import tconstruct.common.TProxyCommon; import tconstruct.util.player.TPlayerStats; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; @@ -12,6 +13,17 @@ public class ArmorProxyCommon implements IGuiHandler public static final int inventoryGui = 100; public static final int armorGuiID = 101; public static final int knapsackGuiID = 102; + public ArmorProxyCommon() + { + registerGuiHandler(); + } + + protected void registerGuiHandler() + { + TProxyCommon.registerServerGuiHandler(inventoryGui, this); + TProxyCommon.registerServerGuiHandler(armorGuiID, this); + TProxyCommon.registerServerGuiHandler(knapsackGuiID, this); + } @Override public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) diff --git a/src/main/java/tconstruct/armor/TinkerArmor.java b/src/main/java/tconstruct/armor/TinkerArmor.java index 3b05bf703f8..ca7920b6054 100644 --- a/src/main/java/tconstruct/armor/TinkerArmor.java +++ b/src/main/java/tconstruct/armor/TinkerArmor.java @@ -1,5 +1,8 @@ package tconstruct.armor; +import mantle.pulsar.pulse.IPulse; +import mantle.pulsar.pulse.Pulse; +import mantle.pulsar.pulse.PulseProxy; import net.minecraft.block.Block; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -17,34 +20,36 @@ import tconstruct.armor.items.HeartCanister; import tconstruct.armor.items.Jerky; import tconstruct.armor.items.Knapsack; +import tconstruct.blocks.logic.DryingRackLogic; import tconstruct.library.TConstructRegistry; import tconstruct.library.armor.EnumArmorPart; import tconstruct.library.crafting.DryingRackRecipes; import tconstruct.library.crafting.LiquidCasting; import tconstruct.library.crafting.ToolBuilder; -import tconstruct.smeltery.SmelteryProxyCommon; import tconstruct.tools.TinkerTools; import tconstruct.util.config.PHConstruct; import tconstruct.world.TinkerWorld; import tconstruct.world.items.GoldenHead; import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.Mod; -import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; -@Mod(modid = "TinkerArmor", name = "TinkerArmor", version = "${tinkerarmorversion}") -public class TinkerArmor +@ObjectHolder(TConstruct.modID) +@Pulse(id = TConstruct.modID) +public class TinkerArmor implements IPulse //TODO: Remove IPulse implementation, keep annotation { @Instance("TinkerArmor") public static TinkerArmor instance; - @SidedProxy(clientSide = "tconstruct.armor.ArmorProxyClient", serverSide = "tconstruct.armor.ArmorProxyCommon") + @PulseProxy(client = "tconstruct.armor.ArmorProxyClient", server = "tconstruct.armor.ArmorProxyCommon") public static ArmorProxyCommon proxy; - + public static Item diamondApple; public static Item jerky; // public static Item stonePattern; @@ -69,7 +74,7 @@ public class TinkerArmor public static Item exoShoes; public static Item bootsWood; public static ArmorMaterial materialWood; - + public TinkerArmor() { MinecraftForge.EVENT_BUS.register(new TinkerArmorEvents()); @@ -79,6 +84,8 @@ public TinkerArmor() public void preInit (FMLPreInitializationEvent event) { TinkerArmor.dryingRack = new DryingRack().setBlockName("Armor.DryingRack"); + GameRegistry.registerBlock(TinkerArmor.dryingRack, "Armor.DryingRack"); + GameRegistry.registerTileEntity(DryingRackLogic.class, "Armor.DryingRack"); TinkerArmor.diamondApple = new DiamondApple().setUnlocalizedName("tconstruct.apple.diamond"); GameRegistry.registerItem(TinkerArmor.diamondApple, "diamondApple"); boolean foodOverhaul = false; @@ -121,7 +128,7 @@ public void preInit (FMLPreInitializationEvent event) TinkerArmor.exoChest = new ExoArmor(EnumArmorPart.CHEST, "exosuit").setUnlocalizedName("tconstruct.exoChest"); TinkerArmor.exoPants = new ExoArmor(EnumArmorPart.PANTS, "exosuit").setUnlocalizedName("tconstruct.exoPants"); TinkerArmor.exoShoes = new ExoArmor(EnumArmorPart.SHOES, "exosuit").setUnlocalizedName("tconstruct.exoShoes"); - + GameRegistry.registerItem(TinkerArmor.exoGoggles, "helmetExo"); GameRegistry.registerItem(TinkerArmor.exoChest, "chestplateExo"); GameRegistry.registerItem(TinkerArmor.exoPants, "leggingsExo"); diff --git a/src/main/java/tconstruct/blocks/slime/SlimeFluid.java b/src/main/java/tconstruct/blocks/slime/SlimeFluid.java index d487f2a9ba1..a06e153e78d 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeFluid.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeFluid.java @@ -11,6 +11,7 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; +import tconstruct.world.TinkerWorld; import tconstruct.world.entity.BlueSlime; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -31,6 +32,8 @@ public void registerBlockIcons (IIconRegister iconRegister) { stillIcon = iconRegister.registerIcon("tinker:slime_blue"); flowIcon = iconRegister.registerIcon("tinker:slime_blue_flow"); + TinkerWorld.blueSlimeFluid.setStillIcon(stillIcon); + TinkerWorld.blueSlimeFluid.setFlowingIcon(flowIcon); } @Override diff --git a/src/main/java/tconstruct/client/TProxyClient.java b/src/main/java/tconstruct/client/TProxyClient.java index b8c0b362574..6235c6cfdf0 100644 --- a/src/main/java/tconstruct/client/TProxyClient.java +++ b/src/main/java/tconstruct/client/TProxyClient.java @@ -157,6 +157,7 @@ public class TProxyClient extends TProxyCommon { + /* TODO: Split this class up into its respective parts */ public static SmallFontRenderer smallFontRenderer; public static IIcon metalBall; public static Minecraft mc; @@ -164,7 +165,13 @@ public class TProxyClient extends TProxyCommon public static ArmorExtended armorExtended = new ArmorExtended(); public static KnapsackInventory knapsack = new KnapsackInventory(); - + + public void initialize() + { + registerRenderer(); + readManuals(); + } + /* Registers any rendering code. */ public void registerRenderer () { diff --git a/src/main/java/tconstruct/common/TProxyCommon.java b/src/main/java/tconstruct/common/TProxyCommon.java index 7601b7ca240..840fb54ab79 100644 --- a/src/main/java/tconstruct/common/TProxyCommon.java +++ b/src/main/java/tconstruct/common/TProxyCommon.java @@ -1,26 +1,49 @@ package tconstruct.common; -import cpw.mods.fml.common.network.IGuiHandler; -import mantle.blocks.abstracts.InventoryLogic; +import java.util.HashMap; + import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import tconstruct.TConstruct; -import tconstruct.armor.ArmorProxyCommon; -import tconstruct.armor.inventory.ArmorExtendedContainer; -import tconstruct.armor.inventory.KnapsackContainer; -import tconstruct.mechworks.MechworksProxyCommon; -import tconstruct.mechworks.inventory.ContainerLandmine; -import tconstruct.mechworks.logic.TileEntityLandmine; -import tconstruct.util.player.TPlayerStats; - -/** - * Common proxy class for InfiTools - */ +import cpw.mods.fml.common.network.IGuiHandler; -public class TProxyCommon +public class TProxyCommon implements IGuiHandler { + public void initialize() + { + + } public void spawnParticle (String slimeParticle, double xPos, double yPos, double zPos, double velX, double velY, double velZ) { } + + @Override + public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) + { + IGuiHandler handler = serverGuiHandlers.get(ID); + if (handler != null) + return handler.getServerGuiElement(ID, player, world, x, y, z); + return null; + } + + @Override + public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) + { + IGuiHandler handler = clientGuiHandlers.get(ID); + if (handler != null) + return handler.getClientGuiElement(ID, player, world, x, y, z); + return null; + } + + private static HashMap serverGuiHandlers = new HashMap(); + private static HashMap clientGuiHandlers = new HashMap(); + + public static void registerServerGuiHandler(int gui, IGuiHandler handler) + { + serverGuiHandlers.put(gui, handler); + } + + public static void registerClientGuiHandler(int gui, IGuiHandler handler) + { + clientGuiHandlers.put(gui, handler); + } } diff --git a/src/main/java/tconstruct/common/TRecipes.java b/src/main/java/tconstruct/common/TRecipes.java deleted file mode 100644 index 218b51056e3..00000000000 --- a/src/main/java/tconstruct/common/TRecipes.java +++ /dev/null @@ -1,1659 +0,0 @@ -package tconstruct.common; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; - -import mantle.blocks.abstracts.MultiServantLogic; -import mantle.utils.RecipeRemover; -import net.minecraft.block.Block; -import net.minecraft.block.BlockDispenser; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.item.crafting.ShapedRecipes; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; -import net.minecraftforge.oredict.ShapedOreRecipe; -import net.minecraftforge.oredict.ShapelessOreRecipe; -import tconstruct.TConstruct; -import tconstruct.armor.modifiers.AModDamageBoost; -import tconstruct.armor.modifiers.AModDoubleJump; -import tconstruct.armor.modifiers.AModHealthBoost; -import tconstruct.armor.modifiers.AModKnockbackResistance; -import tconstruct.armor.modifiers.AModMoveSpeed; -import tconstruct.armor.modifiers.AModProtection; -import tconstruct.blocks.logic.DryingRackLogic; -import tconstruct.common.itemblocks.MetadataItemBlock; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.armor.EnumArmorPart; -import tconstruct.library.client.TConstructClientRegistry; -import tconstruct.library.crafting.Detailing; -import tconstruct.library.crafting.DryingRackRecipes; -import tconstruct.library.crafting.FluidType; -import tconstruct.library.crafting.LiquidCasting; -import tconstruct.library.crafting.PatternBuilder; -import tconstruct.library.crafting.Smeltery; -import tconstruct.library.crafting.ToolBuilder; -import tconstruct.library.util.IPattern; -import tconstruct.mechworks.itemblocks.ItemBlockLandmine; -import tconstruct.mechworks.logic.TileEntityLandmine; -import tconstruct.smeltery.itemblocks.CastingChannelItem; -import tconstruct.smeltery.itemblocks.GlassBlockItem; -import tconstruct.smeltery.itemblocks.GlassPaneItem; -import tconstruct.smeltery.itemblocks.LavaTankItemBlock; -import tconstruct.smeltery.itemblocks.MetalItemBlock; -import tconstruct.smeltery.itemblocks.SearedSlabItem; -import tconstruct.smeltery.itemblocks.SearedTableItemBlock; -import tconstruct.smeltery.itemblocks.SmelteryItemBlock; -import tconstruct.smeltery.itemblocks.SpeedBlockItem; -import tconstruct.smeltery.itemblocks.SpeedSlabItem; -import tconstruct.smeltery.itemblocks.StainedGlassClearItem; -import tconstruct.smeltery.itemblocks.StainedGlassClearPaneItem; -import tconstruct.smeltery.logic.AdaptiveDrainLogic; -import tconstruct.smeltery.logic.AdaptiveSmelteryLogic; -import tconstruct.smeltery.logic.CastingBasinLogic; -import tconstruct.smeltery.logic.CastingChannelLogic; -import tconstruct.smeltery.logic.CastingTableLogic; -import tconstruct.smeltery.logic.FaucetLogic; -import tconstruct.smeltery.logic.LavaTankLogic; -import tconstruct.smeltery.logic.SmelteryDrainLogic; -import tconstruct.smeltery.logic.SmelteryLogic; -import tconstruct.smeltery.logic.TankAirLogic; -import tconstruct.tools.BowRecipe; -import tconstruct.tools.TDispenserBehaviorArrow; -import tconstruct.tools.itemblocks.CraftingSlabItemBlock; -import tconstruct.tools.itemblocks.MultiBrickFancyItem; -import tconstruct.tools.itemblocks.MultiBrickItem; -import tconstruct.tools.itemblocks.ToolStationItemBlock; -import tconstruct.tools.logic.CraftingStationLogic; -import tconstruct.tools.logic.FrypanLogic; -import tconstruct.tools.logic.FurnaceLogic; -import tconstruct.tools.logic.PartBuilderLogic; -import tconstruct.tools.logic.PatternChestLogic; -import tconstruct.tools.logic.StencilTableLogic; -import tconstruct.tools.logic.ToolForgeLogic; -import tconstruct.tools.logic.ToolStationLogic; -import tconstruct.tools.modifiers.ModAntiSpider; -import tconstruct.tools.modifiers.ModAttack; -import tconstruct.tools.modifiers.ModAutoSmelt; -import tconstruct.tools.modifiers.ModBlaze; -import tconstruct.tools.modifiers.ModButtertouch; -import tconstruct.tools.modifiers.ModCreativeToolModifier; -import tconstruct.tools.modifiers.ModDurability; -import tconstruct.tools.modifiers.ModExtraModifier; -import tconstruct.tools.modifiers.ModFlux; -import tconstruct.tools.modifiers.ModInteger; -import tconstruct.tools.modifiers.ModLapis; -import tconstruct.tools.modifiers.ModPiston; -import tconstruct.tools.modifiers.ModRedstone; -import tconstruct.tools.modifiers.ModReinforced; -import tconstruct.tools.modifiers.ModRepair; -import tconstruct.tools.modifiers.ModSmite; -import tconstruct.tools.modifiers.TActiveOmniMod; -import tconstruct.util.config.PHConstruct; -import tconstruct.world.TDispenserBehaviorSpawnEgg; -import tconstruct.world.itemblocks.BarricadeItem; -import tconstruct.world.itemblocks.CraftedSoilItemBlock; -import tconstruct.world.itemblocks.GravelOreItem; -import tconstruct.world.itemblocks.HamboneItemBlock; -import tconstruct.world.itemblocks.MetalOreItemBlock; -import tconstruct.world.itemblocks.OreberryBushItem; -import tconstruct.world.itemblocks.OreberryBushSecondItem; -import tconstruct.world.itemblocks.SlimeGelItemBlock; -import tconstruct.world.itemblocks.SlimeGrassItemBlock; -import tconstruct.world.itemblocks.SlimeLeavesItemBlock; -import tconstruct.world.itemblocks.SlimeSaplingItemBlock; -import tconstruct.world.itemblocks.SlimeTallGrassItem; -import tconstruct.world.itemblocks.WoolSlab1Item; -import tconstruct.world.itemblocks.WoolSlab2Item; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.registry.GameRegistry; - -public class TRecipes -{ - static void registerBlockRecipes () - { - // Tool Tables - GameRegistry.registerBlock(TRepo.toolStationWood, ToolStationItemBlock.class, "ToolStationBlock"); - GameRegistry.registerTileEntity(ToolStationLogic.class, "ToolStation"); - GameRegistry.registerTileEntity(PartBuilderLogic.class, "PartCrafter"); - GameRegistry.registerTileEntity(PatternChestLogic.class, "PatternHolder"); - GameRegistry.registerTileEntity(StencilTableLogic.class, "PatternShaper"); - GameRegistry.registerBlock(TRepo.toolForge, MetadataItemBlock.class, "ToolForgeBlock"); - GameRegistry.registerTileEntity(ToolForgeLogic.class, "ToolForge"); - GameRegistry.registerBlock(TRepo.craftingStationWood, "CraftingStation"); - GameRegistry.registerTileEntity(CraftingStationLogic.class, "CraftingStation"); - GameRegistry.registerBlock(TRepo.craftingSlabWood, CraftingSlabItemBlock.class, "CraftingSlab"); - GameRegistry.registerBlock(TRepo.furnaceSlab, "FurnaceSlab"); - GameRegistry.registerTileEntity(FurnaceLogic.class, "TConstruct.Furnace"); - GameRegistry.registerBlock(TRepo.heldItemBlock, "HeldItemBlock"); - GameRegistry.registerTileEntity(FrypanLogic.class, "FrypanLogic"); - - GameRegistry.registerBlock(TRepo.craftedSoil, CraftedSoilItemBlock.class, "CraftedSoil"); - - GameRegistry.registerBlock(TRepo.searedSlab, SearedSlabItem.class, "SearedSlab"); - GameRegistry.registerBlock(TRepo.speedSlab, SpeedSlabItem.class, "SpeedSlab"); - - GameRegistry.registerBlock(TRepo.metalBlock, MetalItemBlock.class, "MetalBlock"); - GameRegistry.registerBlock(TRepo.meatBlock, HamboneItemBlock.class, "MeatBlock"); - - OreDictionary.registerOre("hambone", new ItemStack(TRepo.meatBlock)); - GameRegistry.addRecipe(new ItemStack(TRepo.meatBlock), "mmm", "mbm", "mmm", 'b', new ItemStack(Items.bone), 'm', new ItemStack(Items.porkchop)); - - GameRegistry.registerBlock(TRepo.glueBlock, "GlueBlock"); - OreDictionary.registerOre("blockRubber", new ItemStack(TRepo.glueBlock)); - - GameRegistry.registerBlock(TRepo.woolSlab1, WoolSlab1Item.class, "WoolSlab1"); - GameRegistry.registerBlock(TRepo.woolSlab2, WoolSlab2Item.class, "WoolSlab2"); - - // Smeltery stuff - GameRegistry.registerBlock(TRepo.smeltery, SmelteryItemBlock.class, "Smeltery"); - GameRegistry.registerBlock(TRepo.smelteryNether, SmelteryItemBlock.class, "SmelteryNether"); - if (PHConstruct.newSmeltery) - { - GameRegistry.registerTileEntity(AdaptiveSmelteryLogic.class, "TConstruct.Smeltery"); - GameRegistry.registerTileEntity(AdaptiveDrainLogic.class, "TConstruct.SmelteryDrain"); - } - else - { - GameRegistry.registerTileEntity(SmelteryLogic.class, "TConstruct.Smeltery"); - GameRegistry.registerTileEntity(SmelteryDrainLogic.class, "TConstruct.SmelteryDrain"); - } - GameRegistry.registerTileEntity(MultiServantLogic.class, "TConstruct.Servants"); - GameRegistry.registerBlock(TRepo.lavaTank, LavaTankItemBlock.class, "LavaTank"); - GameRegistry.registerBlock(TRepo.lavaTankNether, LavaTankItemBlock.class, "LavaTankNether"); - GameRegistry.registerTileEntity(LavaTankLogic.class, "TConstruct.LavaTank"); - - GameRegistry.registerBlock(TRepo.searedBlock, SearedTableItemBlock.class, "SearedBlock"); - GameRegistry.registerBlock(TRepo.searedBlockNether, SearedTableItemBlock.class, "SearedBlockNether"); - GameRegistry.registerTileEntity(CastingTableLogic.class, "CastingTable"); - GameRegistry.registerTileEntity(FaucetLogic.class, "Faucet"); - GameRegistry.registerTileEntity(CastingBasinLogic.class, "CastingBasin"); - - GameRegistry.registerBlock(TRepo.castingChannel, CastingChannelItem.class, "CastingChannel"); - GameRegistry.registerTileEntity(CastingChannelLogic.class, "CastingChannel"); - - GameRegistry.registerBlock(TRepo.tankAir, "TankAir"); - GameRegistry.registerTileEntity(TankAirLogic.class, "tconstruct.tank.air"); - - // Traps - GameRegistry.registerBlock(TRepo.landmine, ItemBlockLandmine.class, "Redstone.Landmine"); - GameRegistry.registerTileEntity(TileEntityLandmine.class, "Landmine"); - GameRegistry.registerBlock(TRepo.punji, "trap.punji"); - GameRegistry.registerBlock(TRepo.barricadeOak, BarricadeItem.class, "trap.barricade.oak"); - GameRegistry.registerBlock(TRepo.barricadeSpruce, BarricadeItem.class, "trap.barricade.spruce"); - GameRegistry.registerBlock(TRepo.barricadeBirch, BarricadeItem.class, "trap.barricade.birch"); - GameRegistry.registerBlock(TRepo.barricadeJungle, BarricadeItem.class, "trap.barricade.jungle"); - GameRegistry.registerBlock(TRepo.slimeExplosive, MetadataItemBlock.class, "explosive.slime"); - - GameRegistry.registerBlock(TRepo.dryingRack, "Armor.DryingRack"); - GameRegistry.registerTileEntity(DryingRackLogic.class, "Armor.DryingRack"); - // fluids - - // Slime Islands - GameRegistry.registerBlock(TRepo.slimeGel, SlimeGelItemBlock.class, "slime.gel"); - GameRegistry.registerBlock(TRepo.slimeGrass, SlimeGrassItemBlock.class, "slime.grass"); - GameRegistry.registerBlock(TRepo.slimeTallGrass, SlimeTallGrassItem.class, "slime.grass.tall"); - GameRegistry.registerBlock(TRepo.slimeLeaves, SlimeLeavesItemBlock.class, "slime.leaves"); - GameRegistry.registerBlock(TRepo.slimeSapling, SlimeSaplingItemBlock.class, "slime.sapling"); - GameRegistry.registerBlock(TRepo.slimeChannel, "slime.channel"); - GameRegistry.registerBlock(TRepo.bloodChannel, "blood.channel"); - GameRegistry.registerBlock(TRepo.slimePad, "slime.pad"); - // TODO fix this - /* - * TConstructRegistry.drawbridgeState[TRepo.slimePad] = 1; - * TConstructRegistry.drawbridgeState[TRepo.bloodChannel] = 1; - */ - - // Decoration - GameRegistry.registerBlock(TRepo.stoneTorch, "decoration.stonetorch"); - GameRegistry.registerBlock(TRepo.stoneLadder, "decoration.stoneladder"); - GameRegistry.registerBlock(TRepo.multiBrick, MultiBrickItem.class, "decoration.multibrick"); - GameRegistry.registerBlock(TRepo.multiBrickFancy, MultiBrickFancyItem.class, "decoration.multibrickfancy"); - - // Ores - GameRegistry.registerBlock(TRepo.oreBerry, OreberryBushItem.class, "ore.berries.one"); - GameRegistry.registerBlock(TRepo.oreBerrySecond, OreberryBushSecondItem.class, "ore.berries.two"); - GameRegistry.registerBlock(TRepo.oreSlag, MetalOreItemBlock.class, "SearedBrick"); - GameRegistry.registerBlock(TRepo.oreGravel, GravelOreItem.class, "GravelOre"); - - GameRegistry.registerBlock(TRepo.speedBlock, SpeedBlockItem.class, "SpeedBlock"); - - // Glass - GameRegistry.registerBlock(TRepo.clearGlass, GlassBlockItem.class, "GlassBlock"); - GameRegistry.registerBlock(TRepo.glassPane, GlassPaneItem.class, "GlassPane"); - GameRegistry.registerBlock(TRepo.stainedGlassClear, StainedGlassClearItem.class, "GlassBlock.StainedClear"); - GameRegistry.registerBlock(TRepo.stainedGlassClearPane, StainedGlassClearPaneItem.class, "GlassPaneClearStained"); - - // Rail - GameRegistry.registerBlock(TRepo.woodenRail, "rail.wood"); - } - - static void registerItemRecipes () - { - - } - - public void addOreDictionarySmelteryRecipes () - { - List exceptions = Arrays.asList(new FluidType[] { FluidType.Water, FluidType.Stone, FluidType.Ender, FluidType.Glass, FluidType.Slime, FluidType.Obsidian }); - for (FluidType ft : FluidType.values()) - { - if (exceptions.contains(ft)) - continue; - - // Nuggets - Smeltery.addDictionaryMelting("nugget" + ft.toString(), ft, -100, TConstruct.nuggetLiquidValue); - - // Ingots, Dust - registerIngotCasting(ft); - Smeltery.addDictionaryMelting("ingot" + ft.toString(), ft, -50, TConstruct.ingotLiquidValue); - Smeltery.addDictionaryMelting("dust" + ft.toString(), ft, -75, TConstruct.ingotLiquidValue); - - // Factorization support - Smeltery.addDictionaryMelting("crystalline" + ft.toString(), ft, -50, TConstruct.ingotLiquidValue); - - // Ores - Smeltery.addDictionaryMelting("ore" + ft.toString(), ft, 0, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsPerOre)); - - // NetherOres support - Smeltery.addDictionaryMelting("oreNether" + ft.toString(), ft, 75, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsPerOre * 2)); - - // Blocks - Smeltery.addDictionaryMelting("block" + ft.toString(), ft, 100, TConstruct.blockLiquidValue); - - if (ft.isToolpart) - { - registerPatternMaterial("ingot" + ft.toString(), 2, ft.toString()); - registerPatternMaterial("block" + ft.toString(), 18, ft.toString()); - } - } - // Obsidian, different dust amount - { - FluidType ft = FluidType.Obsidian; - Smeltery.addDictionaryMelting("nugget" + ft.toString(), ft, -100, TConstruct.nuggetLiquidValue); - - // Ingots, Dust - registerIngotCasting(ft); - Smeltery.addDictionaryMelting("ingot" + ft.toString(), ft, -50, TConstruct.ingotLiquidValue); - Smeltery.addDictionaryMelting("dust" + ft.toString(), ft, -75, TConstruct.ingotLiquidValue / 4); - - // Factorization support - Smeltery.addDictionaryMelting("crystalline" + ft.toString(), ft, -50, TConstruct.ingotLiquidValue); - - // Ores - Smeltery.addDictionaryMelting("ore" + ft.toString(), ft, 0, ((int) TConstruct.ingotLiquidValue * (int) PHConstruct.ingotsPerOre)); - - // NetherOres support - Smeltery.addDictionaryMelting("oreNether" + ft.toString(), ft, 75, ((int) TConstruct.ingotLiquidValue * (int) PHConstruct.ingotsPerOre * 2)); - - // Blocks - Smeltery.addDictionaryMelting("block" + ft.toString(), ft, 100, TConstruct.blockLiquidValue); - - if (ft.isToolpart) - { - registerPatternMaterial("ingot" + ft.toString(), 2, ft.toString()); - registerPatternMaterial("block" + ft.toString(), 18, ft.toString()); - } - } - - // Compressed materials - for (int i = 1; i <= 8; i++) - { - Smeltery.addDictionaryMelting("compressedCobblestone" + i + "x", FluidType.Stone, 0, TConstruct.ingotLiquidValue / 18 * (9 ^ i)); - } - Smeltery.addDictionaryMelting("compressedSand1x", FluidType.Glass, 175, FluidContainerRegistry.BUCKET_VOLUME * 9); - - registerPatternMaterial("plankWood", 2, "Wood"); - registerPatternMaterial("stickWood", 1, "Wood"); - registerPatternMaterial("slabWood", 1, "Wood"); - registerPatternMaterial("compressedCobblestone1x", 18, "Stone"); - } - - protected static void addRecipesForToolBuilder () - { - ToolBuilder tb = ToolBuilder.instance; - tb.addNormalToolRecipe(TRepo.pickaxe, TRepo.pickaxeHead, TRepo.toolRod, TRepo.binding); - tb.addNormalToolRecipe(TRepo.broadsword, TRepo.swordBlade, TRepo.toolRod, TRepo.wideGuard); - tb.addNormalToolRecipe(TRepo.hatchet, TRepo.hatchetHead, TRepo.toolRod); - tb.addNormalToolRecipe(TRepo.shovel, TRepo.shovelHead, TRepo.toolRod); - tb.addNormalToolRecipe(TRepo.longsword, TRepo.swordBlade, TRepo.toolRod, TRepo.handGuard); - tb.addNormalToolRecipe(TRepo.rapier, TRepo.swordBlade, TRepo.toolRod, TRepo.crossbar); - tb.addNormalToolRecipe(TRepo.frypan, TRepo.frypanHead, TRepo.toolRod); - tb.addNormalToolRecipe(TRepo.battlesign, TRepo.signHead, TRepo.toolRod); - tb.addNormalToolRecipe(TRepo.mattock, TRepo.hatchetHead, TRepo.toolRod, TRepo.shovelHead); - tb.addNormalToolRecipe(TRepo.dagger, TRepo.knifeBlade, TRepo.toolRod, TRepo.crossbar); - tb.addNormalToolRecipe(TRepo.cutlass, TRepo.swordBlade, TRepo.toolRod, TRepo.fullGuard); - tb.addNormalToolRecipe(TRepo.chisel, TRepo.chiselHead, TRepo.toolRod); - - tb.addNormalToolRecipe(TRepo.scythe, TRepo.scytheBlade, TRepo.toughRod, TRepo.toughBinding, TRepo.toughRod); - tb.addNormalToolRecipe(TRepo.lumberaxe, TRepo.broadAxeHead, TRepo.toughRod, TRepo.largePlate, TRepo.toughBinding); - tb.addNormalToolRecipe(TRepo.cleaver, TRepo.largeSwordBlade, TRepo.toughRod, TRepo.largePlate, TRepo.toughRod); - tb.addNormalToolRecipe(TRepo.excavator, TRepo.excavatorHead, TRepo.toughRod, TRepo.largePlate, TRepo.toughBinding); - tb.addNormalToolRecipe(TRepo.hammer, TRepo.hammerHead, TRepo.toughRod, TRepo.largePlate, TRepo.largePlate); - tb.addNormalToolRecipe(TRepo.battleaxe, TRepo.broadAxeHead, TRepo.toughRod, TRepo.broadAxeHead, TRepo.toughBinding); - - BowRecipe recipe = new BowRecipe(TRepo.toolRod, TRepo.bowstring, TRepo.toolRod, TRepo.shortbow); - tb.addCustomToolRecipe(recipe); - tb.addNormalToolRecipe(TRepo.arrow, TRepo.arrowhead, TRepo.toolRod, TRepo.fletching); - - 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")); - - TRepo.modFlux = new ModFlux(); - tb.registerToolMod(TRepo.modFlux); - - ItemStack redstoneItem = new ItemStack(Items.redstone); - ItemStack redstoneBlock = new ItemStack(Blocks.redstone_block); - tb.registerToolMod(new ModRedstone(2, new ItemStack[] { redstoneItem, redstoneBlock }, new int[] { 1, 9 })); - - ItemStack lapisItem = new ItemStack(Items.dye, 1, 4); - ItemStack lapisBlock = new ItemStack(Blocks.lapis_block); - 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"))); - 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"))); - - 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")); - tb.registerToolMod(new ModExtraModifier(new ItemStack[] { new ItemStack(Blocks.diamond_block), new ItemStack(Items.golden_apple, 1, 1) }, "Tier1.5Free")); - tb.registerToolMod(new ModExtraModifier(new ItemStack[] { new ItemStack(Items.nether_star) }, "Tier2Free")); - tb.registerToolMod(new ModCreativeToolModifier(new ItemStack[] { new ItemStack(TRepo.creativeModifier) })); - - ItemStack silkyJewel = new ItemStack(TRepo.materials, 1, 26); - tb.registerToolMod(new ModButtertouch(new ItemStack[] { silkyJewel }, 12)); - - 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"))); - - ItemStack holySoil = new ItemStack(TRepo.craftedSoil, 1, 4); - tb.registerToolMod(new ModSmite(StatCollector.translateToLocal("modifier.tool.smite"), 14, new ItemStack[] { holySoil }, new int[] { 1 })); - - ItemStack spidereyeball = new ItemStack(Items.fermented_spider_eye); - tb.registerToolMod(new ModAntiSpider(StatCollector.translateToLocal("gui.modifier.spider"), 15, new ItemStack[] { spidereyeball }, new int[] { 1 })); - - ItemStack obsidianPlate = new ItemStack(TRepo.largePlate, 1, 6); - tb.registerToolMod(new ModReinforced(new ItemStack[] { obsidianPlate }, 16, 1)); - - EnumSet allArmors = EnumSet.of(EnumArmorPart.HELMET, EnumArmorPart.CHEST, EnumArmorPart.PANTS, EnumArmorPart.SHOES); - EnumSet chest = EnumSet.of(EnumArmorPart.CHEST); - tb.registerArmorMod(new AModMoveSpeed(0, allArmors, new ItemStack[] { redstoneItem, redstoneBlock }, new int[] { 1, 9 }, false)); - tb.registerArmorMod(new AModKnockbackResistance(1, allArmors, new ItemStack[] { new ItemStack(Items.gold_ingot), new ItemStack(Blocks.gold_block) }, new int[] { 1, 9 }, false)); - tb.registerArmorMod(new AModHealthBoost(2, allArmors, new ItemStack[] { new ItemStack(TRepo.heartCanister, 1, 2) }, new int[] { 2 }, true)); - tb.registerArmorMod(new AModDamageBoost(3, allArmors, new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Blocks.diamond_block) }, new int[] { 1, 9 }, false, 3, 0.05)); - tb.registerArmorMod(new AModDamageBoost(4, chest, new ItemStack[] { new ItemStack(Blocks.quartz_block, 1, Short.MAX_VALUE) }, new int[] { 1 }, true, 5, 1)); - tb.registerArmorMod(new AModProtection(5, allArmors, new ItemStack[] { new ItemStack(TRepo.largePlate, 1, 2) }, new int[] { 2 })); - - tb.registerArmorMod(new AModDoubleJump(new ItemStack[] { new ItemStack(Items.ghast_tear), new ItemStack(TRepo.slimeGel, 1, 0), new ItemStack(TRepo.slimeGel, 1, 1) })); - - TConstructRegistry.registerActiveToolMod(new TActiveOmniMod()); - } - - protected static void addPartMapping () - { - /* Tools */ - TRepo.patternOutputs = new Item[] { TRepo.toolRod, TRepo.pickaxeHead, TRepo.shovelHead, TRepo.hatchetHead, TRepo.swordBlade, TRepo.wideGuard, TRepo.handGuard, TRepo.crossbar, TRepo.binding, - TRepo.frypanHead, TRepo.signHead, TRepo.knifeBlade, TRepo.chiselHead, TRepo.toughRod, TRepo.toughBinding, TRepo.largePlate, TRepo.broadAxeHead, TRepo.scytheBlade, TRepo.excavatorHead, - TRepo.largeSwordBlade, TRepo.hammerHead, TRepo.fullGuard, null, null, TRepo.arrowhead, null }; - - int[] nonMetals = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 17 }; - - if (PHConstruct.craftMetalTools) - { - for (int mat = 0; mat < 18; mat++) - { - for (int meta = 0; meta < TRepo.patternOutputs.length; meta++) - { - if (TRepo.patternOutputs[meta] != null) - TConstructRegistry.addPartMapping(TRepo.woodPattern, meta + 1, mat, new ItemStack(TRepo.patternOutputs[meta], 1, mat)); - } - } - } - else - { - for (int mat = 0; mat < nonMetals.length; mat++) - { - for (int meta = 0; meta < TRepo.patternOutputs.length; meta++) - { - if (TRepo.patternOutputs[meta] != null) - TConstructRegistry.addPartMapping(TRepo.woodPattern, meta + 1, nonMetals[mat], new ItemStack(TRepo.patternOutputs[meta], 1, nonMetals[mat])); - } - } - } - } - - protected static void addRecipesForTableCasting () - { - /* Smeltery */ - ItemStack ingotcast = new ItemStack(TRepo.metalPattern, 1, 0); - ItemStack gemcast = new ItemStack(TRepo.metalPattern, 1, 26); - LiquidCasting tableCasting = TConstructRegistry.instance.getTableCasting(); - // Blank - tableCasting.addCastingRecipe(new ItemStack(TRepo.blankPattern, 1, 1), new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue), 80); - tableCasting.addCastingRecipe(new ItemStack(TRepo.blankPattern, 1, 2), new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), 80); - tableCasting.addCastingRecipe(gemcast, new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(Items.emerald), 80); - tableCasting.addCastingRecipe(gemcast, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(Items.emerald), 80); - - // Ingots - tableCasting.addCastingRecipe(new ItemStack(TRepo.materials, 1, 2), new FluidStack(TRepo.moltenStoneFluid, TConstruct.ingotLiquidValue / 4), ingotcast, 80); // stone - - // Misc - tableCasting.addCastingRecipe(new ItemStack(Items.emerald), new FluidStack(TRepo.moltenEmeraldFluid, 640), gemcast, 80); - tableCasting.addCastingRecipe(new ItemStack(TRepo.materials, 1, 36), new FluidStack(TRepo.glueFluid, TConstruct.ingotLiquidValue), null, 50); - tableCasting.addCastingRecipe(new ItemStack(TRepo.strangeFood, 1, 1), new FluidStack(TRepo.bloodFluid, 160), null, 50); - - // Buckets - ItemStack bucket = new ItemStack(Items.bucket); - - for (int sc = 0; sc < 24; sc++) - { - tableCasting.addCastingRecipe(new ItemStack(TRepo.buckets, 1, sc), new FluidStack(TRepo.fluids[sc], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10); - } - tableCasting.addCastingRecipe(new ItemStack(TRepo.buckets, 1, 26), new FluidStack(TRepo.fluids[26], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10); - - // Clear glass pane casting - tableCasting.addCastingRecipe(new ItemStack(TRepo.glassPane), new FluidStack(TRepo.moltenGlassFluid, 250), null, 80); - - // Metal toolpart casting - TRepo.liquids = new FluidStack[] { new FluidStack(TRepo.moltenIronFluid, 1), new FluidStack(TRepo.moltenCopperFluid, 1), new FluidStack(TRepo.moltenCobaltFluid, 1), - new FluidStack(TRepo.moltenArditeFluid, 1), new FluidStack(TRepo.moltenManyullynFluid, 1), new FluidStack(TRepo.moltenBronzeFluid, 1), new FluidStack(TRepo.moltenAlumiteFluid, 1), - new FluidStack(TRepo.moltenObsidianFluid, 1), new FluidStack(TRepo.moltenSteelFluid, 1), new FluidStack(TRepo.pigIronFluid, 1) }; - int[] liquidDamage = new int[] { 2, 13, 10, 11, 12, 14, 15, 6, 16, 18 }; // ItemStack - // damage - // value - int fluidAmount = 0; - Fluid fs = null; - - for (int iter = 0; iter < TRepo.patternOutputs.length; iter++) - { - if (TRepo.patternOutputs[iter] != null) - { - ItemStack cast = new ItemStack(TRepo.metalPattern, 1, iter + 1); - - tableCasting.addCastingRecipe(cast, new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(TRepo.patternOutputs[iter], 1, Short.MAX_VALUE), false, 50); - tableCasting.addCastingRecipe(cast, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(TRepo.patternOutputs[iter], 1, Short.MAX_VALUE), false, 50); - - for (int iterTwo = 0; iterTwo < TRepo.liquids.length; iterTwo++) - { - fs = TRepo.liquids[iterTwo].getFluid(); - fluidAmount = ((IPattern) TRepo.metalPattern).getPatternCost(cast) * TConstruct.ingotLiquidValue / 2; - ItemStack metalCast = new ItemStack(TRepo.patternOutputs[iter], 1, liquidDamage[iterTwo]); - tableCasting.addCastingRecipe(metalCast, new FluidStack(fs, fluidAmount), cast, 50); - Smeltery.addMelting(FluidType.getFluidType(fs), metalCast, 0, fluidAmount); - } - } - } - - ItemStack[] ingotShapes = { new ItemStack(Items.brick), new ItemStack(Items.netherbrick), new ItemStack(TRepo.materials, 1, 2), new ItemStack(TRepo.materials, 1, 37) }; - for (int i = 0; i < ingotShapes.length; i++) - { - tableCasting.addCastingRecipe(ingotcast, new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue), ingotShapes[i], false, 50); - tableCasting.addCastingRecipe(ingotcast, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), ingotShapes[i], false, 50); - } - - ItemStack fullguardCast = new ItemStack(TRepo.metalPattern, 1, 22); - tableCasting.addCastingRecipe(fullguardCast, new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(TRepo.fullGuard, 1, Short.MAX_VALUE), false, 50); - tableCasting.addCastingRecipe(fullguardCast, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(TRepo.fullGuard, 1, Short.MAX_VALUE), false, 50); - - // Golden Food Stuff - FluidStack goldAmount = null; - if (PHConstruct.goldAppleRecipe) - { - goldAmount = new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 8); - } - else - { - goldAmount = new FluidStack(TRepo.moltenGoldFluid, TConstruct.nuggetLiquidValue * 8); - } - tableCasting.addCastingRecipe(new ItemStack(Items.golden_apple, 1), goldAmount, new ItemStack(Items.apple), true, 50); - tableCasting.addCastingRecipe(new ItemStack(Items.golden_carrot, 1), goldAmount, new ItemStack(Items.carrot), true, 50); - tableCasting.addCastingRecipe(new ItemStack(Items.speckled_melon, 1), goldAmount, new ItemStack(Items.melon), true, 50); - tableCasting.addCastingRecipe(new ItemStack(TRepo.goldHead), goldAmount, new ItemStack(Items.skull, 1, 3), true, 50); - } - - protected static void addRecipesForFurnace () - { - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 1, 3), new ItemStack(TRepo.craftedSoil, 1, 4), 0.2f); // Concecrated - // Soil - - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 1, 0), new ItemStack(TRepo.materials, 1, 1), 2f); // Slime - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 1, 1), new ItemStack(TRepo.materials, 1, 2), 2f); // Seared brick item - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 1, 2), new ItemStack(TRepo.materials, 1, 17), 2f); // Blue Slime - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 1, 6), new ItemStack(TRepo.materials, 1, 37), 2f); // Nether seared - // brick - - // FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, - // 1, new ItemStack(TRepo.materials, 1, 3), 3f); - // FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, - // 2, new ItemStack(TRepo.materials, 1, 4), 3f); - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, 1, 3), new ItemStack(TRepo.materials, 1, 9), 0.5f); - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, 1, 4), new ItemStack(TRepo.materials, 1, 10), 0.5f); - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, 1, 5), new ItemStack(TRepo.materials, 1, 11), 0.5f); - - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreBerries, 1, 0), new ItemStack(TRepo.materials, 1, 19), 0.2f); - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreBerries, 1, 1), new ItemStack(Items.gold_nugget), 0.2f); - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreBerries, 1, 2), new ItemStack(TRepo.materials, 1, 20), 0.2f); - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreBerries, 1, 3), new ItemStack(TRepo.materials, 1, 21), 0.2f); - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreBerries, 1, 4), new ItemStack(TRepo.materials, 1, 22), 0.2f); - // FurnaceRecipes.smelting().func_151394_a(new - // ItemStack(TRepo.oreBerries, 5, new ItemStack(TRepo.materials, 1, 23), - // 0.2f); - - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreGravel, 1, 0), new ItemStack(Items.iron_ingot), 0.2f); - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreGravel, 1, 1), new ItemStack(Items.gold_ingot), 0.2f); - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreGravel, 1, 2), new ItemStack(TRepo.materials, 1, 9), 0.2f); - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreGravel, 1, 3), new ItemStack(TRepo.materials, 1, 10), 0.2f); - 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 () - { - String[] patBlock = { "###", "###", "###" }; - String[] patSurround = { "###", "#m#", "###" }; - - Object[] toolForgeBlocks = { "blockIron", "blockGold", Blocks.diamond_block, Blocks.emerald_block, "blockCobalt", "blockArdite", "blockManyullyn", "blockCopper", "blockBronze", "blockTin", - "blockAluminum", "blockAluminumBrass", "blockAlumite", "blockSteel" }; - - // ToolForge Recipes (Metal Version) - for (int sc = 0; sc < toolForgeBlocks.length; sc++) - { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.toolForge, 1, sc), "bbb", "msm", "m m", 'b', new ItemStack(TRepo.smeltery, 1, 2), 's', new ItemStack(TRepo.toolStationWood, - 1, 0), 'm', toolForgeBlocks[sc])); - // adding slab version recipe - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 5), "bbb", "msm", "m m", 'b', new ItemStack(TRepo.smeltery, 1, 2), 's', new ItemStack( - TRepo.craftingSlabWood, 1, 1), 'm', toolForgeBlocks[sc])); - } - - // ToolStation Recipes (Wooden Version) - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.toolStationWood, 1, 0), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', "crafterWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.toolStationWood, 1, 0), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', "craftingTableWood")); - GameRegistry.addRecipe(new ItemStack(TRepo.toolStationWood, 1, 0), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', new ItemStack(TRepo.craftingStationWood, 1, 0)); - GameRegistry.addRecipe(new ItemStack(TRepo.toolStationWood, 1, 0), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', new ItemStack(TRepo.craftingSlabWood, 1, 0)); - GameRegistry.addRecipe(new ItemStack(TRepo.toolStationWood, 1, 2), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', new ItemStack(Blocks.log, 1, 1)); - GameRegistry.addRecipe(new ItemStack(TRepo.toolStationWood, 1, 3), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', new ItemStack(Blocks.log, 1, 2)); - GameRegistry.addRecipe(new ItemStack(TRepo.toolStationWood, 1, 4), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', new ItemStack(Blocks.log, 1, 3)); - GameRegistry.addRecipe(new ItemStack(TRepo.toolStationWood, 1, 5), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', Blocks.chest); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.toolStationWood, 1, 1), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', "logWood")); - GameRegistry.addRecipe(new ItemStack(TRepo.toolStationWood, 1, 10), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', new ItemStack(Blocks.planks, 1, 0)); - GameRegistry.addRecipe(new ItemStack(TRepo.toolStationWood, 1, 11), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', new ItemStack(Blocks.planks, 1, 1)); - GameRegistry.addRecipe(new ItemStack(TRepo.toolStationWood, 1, 12), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', new ItemStack(Blocks.planks, 1, 2)); - GameRegistry.addRecipe(new ItemStack(TRepo.toolStationWood, 1, 13), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', new ItemStack(Blocks.planks, 1, 3)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.toolStationWood, 1, 10), "p", "w", 'p', new ItemStack(TRepo.blankPattern, 1, 0), 'w', "plankWood")); - - GameRegistry.addRecipe(new ItemStack(TRepo.furnaceSlab, 1, 0), "###", "# #", "###", '#', new ItemStack(Blocks.stone_slab, 1, 3)); - - // Blank Pattern Recipe - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.blankPattern, 1, 0), "ps", "sp", 'p', "plankWood", 's', "stickWood")); - // Manual Book Recipes - GameRegistry.addRecipe(new ItemStack(TRepo.manualBook), "wp", 'w', new ItemStack(TRepo.blankPattern, 1, 0), 'p', Items.paper); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.manualBook, 2, 0), new ItemStack(TRepo.manualBook, 1, 0), Items.book); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.manualBook, 1, 1), new ItemStack(TRepo.manualBook, 1, 0)); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.manualBook, 2, 1), new ItemStack(TRepo.manualBook, 1, 1), Items.book); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.manualBook, 1, 2), new ItemStack(TRepo.manualBook, 1, 1)); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.manualBook, 2, 2), new ItemStack(TRepo.manualBook, 1, 2), Items.book); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.manualBook, 1, 3), new ItemStack(TRepo.manualBook, 1, 2)); - // alternative Vanilla Book Recipe - GameRegistry.addShapelessRecipe(new ItemStack(Items.book), Items.paper, Items.paper, Items.paper, Items.string, TRepo.blankPattern, TRepo.blankPattern); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.name_tag), "P~ ", "~O ", " ~", '~', Items.string, 'P', Items.paper, 'O', "slimeball")); - - // Paperstack Recipe - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 0), "pp", "pp", 'p', Items.paper); - // Mossball Recipe - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.materials, 1, 6), patBlock, '#', "stoneMossy")); - // LavaCrystal Recipes -Auto-smelt - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 7), "xcx", "cbc", "xcx", 'b', Items.lava_bucket, 'c', Items.fire_charge, 'x', Items.blaze_rod); - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 7), "xcx", "cbc", "xcx", 'b', Items.lava_bucket, 'x', Items.fire_charge, 'c', Items.blaze_rod); - // Slimy sand Recipes - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 1, 0), Items.slime_ball, Items.slime_ball, Items.slime_ball, Items.slime_ball, Blocks.sand, Blocks.dirt); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 1, 2), TRepo.strangeFood, TRepo.strangeFood, TRepo.strangeFood, TRepo.strangeFood, Blocks.sand, Blocks.dirt); - // Grout Recipes - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 2, 1), Items.clay_ball, Blocks.sand, Blocks.gravel); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 8, 1), new ItemStack(Blocks.clay, 1, Short.MAX_VALUE), Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.gravel, - Blocks.gravel, Blocks.gravel, Blocks.gravel); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 2, 6), Items.nether_wart, Blocks.soul_sand, Blocks.gravel); - // Graveyard Soil Recipes - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 1, 3), Blocks.dirt, Items.rotten_flesh, new ItemStack(Items.dye, 1, 15)); - // Silky Cloth Recipes - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 25), patSurround, 'm', new ItemStack(TRepo.materials, 1, 24), '#', new ItemStack(Items.string)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.materials, 1, 25), patSurround, 'm', "nuggetGold", '#', new ItemStack(Items.string))); - // Silky Jewel Recipes - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 26), " c ", "cec", " c ", 'c', new ItemStack(TRepo.materials, 1, 25), 'e', new ItemStack(Items.emerald)); - // Armor Recipes - Object[] helm = new String[] { "www", "w w" }; - Object[] chest = new String[] { "w w", "www", "www" }; - Object[] pants = new String[] { "www", "w w", "w w" }; - Object[] shoes = new String[] { "w w", "w w" }; - GameRegistry.addRecipe(new ShapedOreRecipe(TRepo.helmetWood, helm, 'w', "logWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(TRepo.chestplateWood, chest, 'w', "logWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(TRepo.leggingsWood, pants, 'w', "logWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(TRepo.bootsWood, shoes, 'w', "logWood")); - - ItemStack exoGoggleStack = new ItemStack(TRepo.exoGoggles); - ItemStack exoChestStack = new ItemStack(TRepo.exoChest); - ItemStack exoPantsStack = new ItemStack(TRepo.exoPants); - ItemStack exoShoesStack = new ItemStack(TRepo.exoShoes); - if (PHConstruct.exoCraftingEnabled) - { - ToolBuilder.instance.addArmorTag(exoGoggleStack); - ToolBuilder.instance.addArmorTag(exoChestStack); - ToolBuilder.instance.addArmorTag(exoPantsStack); - ToolBuilder.instance.addArmorTag(exoShoesStack); - GameRegistry.addShapedRecipe(exoGoggleStack, helm, 'w', new ItemStack(TRepo.largePlate, 1, 14)); - GameRegistry.addShapedRecipe(exoChestStack, chest, 'w', new ItemStack(TRepo.largePlate, 1, 14)); - GameRegistry.addShapedRecipe(exoPantsStack, pants, 'w', new ItemStack(TRepo.largePlate, 1, 14)); - GameRegistry.addShapedRecipe(exoShoesStack, shoes, 'w', new ItemStack(TRepo.largePlate, 1, 14)); - } - - // Metal conversion Recipes - GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 3), patBlock, '#', new ItemStack(TRepo.materials, 1, 9)); // Copper - GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 5), patBlock, '#', new ItemStack(TRepo.materials, 1, 10)); // Tin - GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 6), patBlock, '#', new ItemStack(TRepo.materials, 1, 11)); // Aluminum - // GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 6), - // patBlock, '#', new ItemStack(TRepo.materials, 1, 12)); // Aluminum - GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 4), patBlock, '#', new ItemStack(TRepo.materials, 1, 13)); // Bronze - GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 7), patBlock, '#', new ItemStack(TRepo.materials, 1, 14)); // AluBrass - GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 0), patBlock, '#', new ItemStack(TRepo.materials, 1, 3)); // Cobalt - GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 1), patBlock, '#', new ItemStack(TRepo.materials, 1, 4)); // Ardite - GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 2), patBlock, '#', new ItemStack(TRepo.materials, 1, 5)); // Manyullyn - GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 8), patBlock, '#', new ItemStack(TRepo.materials, 1, 15)); // Alumite - GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 9), patBlock, '#', new ItemStack(TRepo.materials, 1, 16)); // Steel - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 11), "#", '#', new ItemStack(TRepo.materials, 1, 12)); // Aluminum raw -> - // ingot - - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 9), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 3)); // Copper - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 10), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 5)); // Tin - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 11), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 6)); // Aluminum - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 13), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 4)); // Bronze - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 14), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 7)); // AluBrass - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 3), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 0)); // Cobalt - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 4), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 1)); // Ardite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 5), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 2)); // Manyullyn - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 15), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 8)); // Alumite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 16), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 9)); // Steel - - GameRegistry.addRecipe(new ItemStack(Items.iron_ingot), patBlock, '#', new ItemStack(TRepo.materials, 1, 19)); // Iron - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 9), patBlock, '#', new ItemStack(TRepo.materials, 1, 20)); // Copper - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 10), patBlock, '#', new ItemStack(TRepo.materials, 1, 21)); // Tin - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 11), patBlock, '#', new ItemStack(TRepo.materials, 1, 22)); // Aluminum - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 14), patBlock, '#', new ItemStack(TRepo.materials, 1, 24)); // Aluminum Brass - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 18), patBlock, '#', new ItemStack(TRepo.materials, 1, 27)); // Obsidian - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 3), patBlock, '#', new ItemStack(TRepo.materials, 1, 28)); // Cobalt - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 4), patBlock, '#', new ItemStack(TRepo.materials, 1, 29)); // Ardite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 5), patBlock, '#', new ItemStack(TRepo.materials, 1, 30)); // Manyullyn - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 13), patBlock, '#', new ItemStack(TRepo.materials, 1, 31)); // Bronze - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 15), patBlock, '#', new ItemStack(TRepo.materials, 1, 32)); // Alumite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 16), patBlock, '#', new ItemStack(TRepo.materials, 1, 33)); // Steel - - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 19), "m", 'm', new ItemStack(Items.iron_ingot)); // Iron - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 20), "m", 'm', new ItemStack(TRepo.materials, 1, 9)); // Copper - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 21), "m", 'm', new ItemStack(TRepo.materials, 1, 10)); // Tin - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 22), "m", 'm', new ItemStack(TRepo.materials, 1, 11)); // Aluminum - // GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 22), "m", - // 'm', new ItemStack(TRepo.materials, 1, 12)); //Aluminum - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 24), "m", 'm', new ItemStack(TRepo.materials, 1, 14)); // Aluminum Brass - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 27), "m", 'm', new ItemStack(TRepo.materials, 1, 18)); // Obsidian - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 28), "m", 'm', new ItemStack(TRepo.materials, 1, 3)); // Cobalt - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 29), "m", 'm', new ItemStack(TRepo.materials, 1, 4)); // Ardite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 30), "m", 'm', new ItemStack(TRepo.materials, 1, 5)); // Manyullyn - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 31), "m", 'm', new ItemStack(TRepo.materials, 1, 13)); // Bronze - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 32), "m", 'm', new ItemStack(TRepo.materials, 1, 15)); // Alumite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 33), "m", 'm', new ItemStack(TRepo.materials, 1, 16)); // Steel - - // stained Glass Recipes - String[] dyeTypes = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime", "dyeYellow", "dyeLightBlue", - "dyeMagenta", "dyeOrange", "dyeWhite" }; - String color = ""; - for (int i = 0; i < 16; i++) - { - color = dyeTypes[15 - i]; - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.wool, 8, i), patSurround, 'm', color, '#', new ItemStack(Blocks.wool, 1, Short.MAX_VALUE))); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.stainedGlassClear, 8, i), patSurround, 'm', color, '#', TRepo.clearGlass)); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.stainedGlassClear, 1, i), color, TRepo.clearGlass)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.stainedGlassClear, 8, i), patSurround, 'm', color, '#', new ItemStack(TRepo.stainedGlassClear, 1, Short.MAX_VALUE))); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.stainedGlassClear, 1, i), color, new ItemStack(TRepo.stainedGlassClear, 1, Short.MAX_VALUE))); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.stainedGlassClearPane, 8, i), patSurround, 'm', color, '#', TRepo.glassPane)); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.stainedGlassClearPane, 1, i), color, TRepo.glassPane)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.stainedGlassClearPane, 8, i), patSurround, 'm', color, '#', new ItemStack(TRepo.stainedGlassClearPane, 1, Short.MAX_VALUE))); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.stainedGlassClearPane, 1, i), color, new ItemStack(TRepo.stainedGlassClearPane, 1, Short.MAX_VALUE))); - } - - // Glass Recipes - GameRegistry.addRecipe(new ItemStack(Items.glass_bottle, 3), new Object[] { "# #", " # ", '#', TRepo.clearGlass }); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.daylight_detector), new Object[] { "GGG", "QQQ", "WWW", 'G', "blockGlass", 'Q', Items.quartz, 'W', "slabWood" })); - GameRegistry.addRecipe(new ItemStack(Blocks.beacon, 1), new Object[] { "GGG", "GSG", "OOO", 'G', TRepo.clearGlass, 'S', Items.nether_star, 'O', Blocks.obsidian }); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.glassPane, 16, 0), "GGG", "GGG", 'G', TRepo.clearGlass)); - - // Smeltery Components Recipes - ItemStack searedBrick = new ItemStack(TRepo.materials, 1, 2); - GameRegistry.addRecipe(new ItemStack(TRepo.smeltery, 1, 0), "bbb", "b b", "bbb", 'b', searedBrick); // Controller - GameRegistry.addRecipe(new ItemStack(TRepo.smeltery, 1, 1), "b b", "b b", "b b", 'b', searedBrick); // Drain - GameRegistry.addRecipe(new ItemStack(TRepo.smeltery, 1, 2), "bb", "bb", 'b', searedBrick); // Bricks - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTank, 1, 0), patSurround, '#', searedBrick, 'm', "blockGlass")); // Tank - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTank, 1, 1), "bgb", "ggg", "bgb", 'b', searedBrick, 'g', "blockGlass")); // Glass - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTank, 1, 2), "bgb", "bgb", "bgb", 'b', searedBrick, 'g', "blockGlass")); // Window - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlock, 1, 0), "bbb", "b b", "b b", 'b', searedBrick); // Table - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlock, 1, 1), "b b", " b ", 'b', searedBrick); // Faucet - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlock, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); // Basin - GameRegistry.addRecipe(new ItemStack(TRepo.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); // Channel - - searedBrick = new ItemStack(TRepo.materials, 1, 37); - GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 0), "bbb", "b b", "bbb", 'b', searedBrick); // Controller - GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 1), "b b", "b b", "b b", 'b', searedBrick); // Drain - GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 2), "bb", "bb", 'b', searedBrick); // Bricks - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 0), patSurround, '#', searedBrick, 'm', "blockGlass")); // Tank - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 1), "bgb", "ggg", "bgb", 'b', searedBrick, 'g', "blockGlass")); // Glass - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 2), "bgb", "bgb", "bgb", 'b', searedBrick, 'g', "blockGlass")); // Window - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 0), "bbb", "b b", "b b", 'b', searedBrick); // Table - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 1), "b b", " b ", 'b', searedBrick); // Faucet - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); // Basin - GameRegistry.addRecipe(new ItemStack(TRepo.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); // Channel - - // Jack o'Latern Recipe - Stone Torch - GameRegistry.addRecipe(new ItemStack(Blocks.lit_pumpkin, 1, 0), "p", "s", 'p', new ItemStack(Blocks.pumpkin), 's', new ItemStack(TRepo.stoneTorch)); - // Stone Torch Recipe - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.stoneTorch, 4), "p", "w", 'p', new ItemStack(Items.coal, 1, Short.MAX_VALUE), 'w', "rodStone")); - // Stone Ladder Recipe - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.stoneLadder, 3), "w w", "www", "w w", 'w', "rodStone")); - // Wooden Rail Recipe - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.woodenRail, 4, 0), "b b", "bxb", "b b", 'b', "plankWood", 'x', "stickWood")); - // Stonesticks Recipes - GameRegistry.addRecipe(new ItemStack(TRepo.toolRod, 4, 1), "c", "c", 'c', new ItemStack(Blocks.stone)); - GameRegistry.addRecipe(new ItemStack(TRepo.toolRod, 2, 1), "c", "c", 'c', new ItemStack(Blocks.cobblestone)); - // - ItemStack aluBrass = new ItemStack(TRepo.materials, 1, 14); - // Clock Recipe - Vanilla alternativ - GameRegistry.addRecipe(new ItemStack(Items.clock), " i ", "iri", " i ", 'i', aluBrass, 'r', new ItemStack(Items.redstone)); - // Gold Pressure Plate - Vanilla alternativ - GameRegistry.addRecipe(new ItemStack(Blocks.light_weighted_pressure_plate), "ii", 'i', aluBrass); - // Accessories - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#', "ingotAluminum")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#', "ingotAluminium")); - // GameRegistry.addRecipe(new ShapedOreRecipe(new - // ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#', - // "ingotNaturalAluminum")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), " # ", "#B#", " # ", '#', "ingotTin", 'B', Items.bone)); - - GameRegistry.addRecipe(new ItemStack(TRepo.diamondApple), " d ", "d#d", " d ", 'd', new ItemStack(Items.diamond), '#', new ItemStack(Items.apple)); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.heartCanister, 1, 2), new ItemStack(TRepo.diamondApple), new ItemStack(TRepo.materials, 1, 8), new ItemStack(TRepo.heartCanister, 1, 0), - new ItemStack(TRepo.heartCanister, 1, 1)); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.heartCanister, 1, 4), new ItemStack(TRepo.heartCanister, 1, 2), new ItemStack(TRepo.heartCanister, 1, 3), new ItemStack(Items.golden_apple, - 1, 1)); - //GameRegistry.addShapelessRecipe(new ItemStack(heartCanister, 1, 6), new ItemStack(heartCanister, 1, 0), new ItemStack(heartCanister, 1, 4), new ItemStack(heartCanister, 1, 5)); - - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.knapsack, 1, 0), "###", "rmr", "###", '#', new ItemStack(Items.leather), 'r', new ItemStack(TRepo.toughRod, 1, 2), 'm', - "ingotGold")); - GameRegistry.addRecipe(new ItemStack(TRepo.knapsack, 1, 0), "###", "rmr", "###", '#', new ItemStack(Items.leather), 'r', new ItemStack(TRepo.toughRod, 1, 2), 'm', aluBrass); - // Drying Rack Recipes - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.dryingRack, 1, 0), "bbb", 'b', "slabWood")); - // Landmine Recipes - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.landmine, 1, 0), "mcm", "rpr", 'm', "plankWood", 'c', new ItemStack(TRepo.blankPattern, 1, 1), 'r', Items.redstone, 'p', - Blocks.stone_pressure_plate)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.landmine, 1, 1), "mcm", "rpr", 'm', Blocks.stone, 'c', new ItemStack(TRepo.blankPattern, 1, 1), 'r', Items.redstone, 'p', - Blocks.stone_pressure_plate)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.landmine, 1, 2), "mcm", "rpr", 'm', Blocks.obsidian, 'c', new ItemStack(TRepo.blankPattern, 1, 1), 'r', Items.redstone, 'p', - Blocks.stone_pressure_plate)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.landmine, 1, 3), "mcm", "rpr", 'm', Items.repeater, 'c', new ItemStack(TRepo.blankPattern, 1, 1), 'r', Items.redstone, 'p', - Blocks.stone_pressure_plate)); - - // Ultra hardcore recipes - GameRegistry.addRecipe(new ItemStack(TRepo.goldHead), patSurround, '#', new ItemStack(Items.gold_ingot), 'm', new ItemStack(Items.skull, 1, 3)); - - // Slab Smeltery Components Recipes - for (int i = 0; i < 7; i++) - { - GameRegistry.addRecipe(new ItemStack(TRepo.speedSlab, 6, i), "bbb", 'b', new ItemStack(TRepo.speedBlock, 1, i)); - } - GameRegistry.addRecipe(new ItemStack(TRepo.searedSlab, 6, 0), "bbb", 'b', new ItemStack(TRepo.smeltery, 1, 2)); - GameRegistry.addRecipe(new ItemStack(TRepo.searedSlab, 6, 1), "bbb", 'b', new ItemStack(TRepo.smeltery, 1, 4)); - GameRegistry.addRecipe(new ItemStack(TRepo.searedSlab, 6, 2), "bbb", 'b', new ItemStack(TRepo.smeltery, 1, 5)); - GameRegistry.addRecipe(new ItemStack(TRepo.searedSlab, 6, 3), "bbb", 'b', new ItemStack(TRepo.smeltery, 1, 6)); - GameRegistry.addRecipe(new ItemStack(TRepo.searedSlab, 6, 4), "bbb", 'b', new ItemStack(TRepo.smeltery, 1, 8)); - GameRegistry.addRecipe(new ItemStack(TRepo.searedSlab, 6, 5), "bbb", 'b', new ItemStack(TRepo.smeltery, 1, 9)); - GameRegistry.addRecipe(new ItemStack(TRepo.searedSlab, 6, 6), "bbb", 'b', new ItemStack(TRepo.smeltery, 1, 10)); - GameRegistry.addRecipe(new ItemStack(TRepo.searedSlab, 6, 7), "bbb", 'b', new ItemStack(TRepo.smeltery, 1, 11)); - - // Wool Slab Recipes - for (int sc = 0; sc <= 7; sc++) - { - GameRegistry.addRecipe(new ItemStack(TRepo.woolSlab1, 6, sc), "www", 'w', new ItemStack(Blocks.wool, 1, sc)); - GameRegistry.addRecipe(new ItemStack(TRepo.woolSlab2, 6, sc), "www", 'w', new ItemStack(Blocks.wool, 1, sc + 8)); - - GameRegistry.addShapelessRecipe(new ItemStack(Blocks.wool, 1, sc), new ItemStack(TRepo.woolSlab1, 1, sc), new ItemStack(TRepo.woolSlab1, 1, sc)); - GameRegistry.addShapelessRecipe(new ItemStack(Blocks.wool, 1, sc + 8), new ItemStack(TRepo.woolSlab2, 1, sc), new ItemStack(TRepo.woolSlab2, 1, sc)); - } - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.wool, 1, 0), "slabCloth", "slabCloth")); - // Trap Recipes - GameRegistry.addRecipe(new ItemStack(TRepo.punji, 5, 0), "b b", " b ", "b b", 'b', new ItemStack(Items.reeds)); - GameRegistry.addRecipe(new ItemStack(TRepo.barricadeSpruce, 1, 0), "b", "b", 'b', new ItemStack(Blocks.log, 1, 1)); - GameRegistry.addRecipe(new ItemStack(TRepo.barricadeBirch, 1, 0), "b", "b", 'b', new ItemStack(Blocks.log, 1, 2)); - GameRegistry.addRecipe(new ItemStack(TRepo.barricadeJungle, 1, 0), "b", "b", 'b', new ItemStack(Blocks.log, 1, 3)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.barricadeOak, 1, 0), "b", "b", 'b', "logWood")); - // Advanced WorkBench Recipes - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.craftingStationWood, 1, 0), "b", 'b', "crafterWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.craftingStationWood, 1, 0), "b", 'b', "craftingTableWood")); - // Slab crafters - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.craftingSlabWood, 6, 0), "bbb", 'b', "crafterWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.craftingSlabWood, 6, 0), "bbb", 'b', "craftingTableWood")); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 0), "b", 'b', new ItemStack(TRepo.craftingStationWood, 1, 0)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 1), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 0)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 2), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 1)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 2), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 2)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 2), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 3)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 2), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 4)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 4), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 5)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 3), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 10)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 3), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 11)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 3), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 12)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 3), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 13)); - GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 5), "b", 'b', new ItemStack(TRepo.toolForge, 1, Short.MAX_VALUE)); - // EssenceExtractor Recipe - // Slime Recipes - GameRegistry.addRecipe(new ItemStack(TRepo.slimeGel, 1, 0), "##", "##", '#', TRepo.strangeFood); - GameRegistry.addRecipe(new ItemStack(TRepo.strangeFood, 4, 0), "#", '#', new ItemStack(TRepo.slimeGel, 1, 0)); - GameRegistry.addRecipe(new ItemStack(TRepo.slimeGel, 1, 1), "##", "##", '#', Items.slime_ball); - GameRegistry.addRecipe(new ItemStack(Items.slime_ball, 4, 0), "#", '#', new ItemStack(TRepo.slimeGel, 1, 1)); - // slimeExplosive - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.slimeExplosive, 1, 0), Items.slime_ball, Blocks.tnt); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.slimeExplosive, 1, 2), TRepo.strangeFood, Blocks.tnt); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.slimeExplosive, 1, 0), "slimeball", Blocks.tnt)); - - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.slimeChannel, 1, 0), new ItemStack(TRepo.slimeGel, 1, Short.MAX_VALUE), new ItemStack(Items.redstone)); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.bloodChannel, 1, 0), new ItemStack(TRepo.strangeFood, 1, 1), new ItemStack(TRepo.strangeFood, 1, 1), - 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 () - { - // Drying rack - DryingRackRecipes.addDryingRecipe(Items.beef, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 0)); - DryingRackRecipes.addDryingRecipe(Items.chicken, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 1)); - DryingRackRecipes.addDryingRecipe(Items.porkchop, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 2)); - // DryingRackRecipes.addDryingRecipe(Item.muttonRaw, 20 * 60 * 5, new - // ItemStack(TRepo.jerky, 1, 3)); - DryingRackRecipes.addDryingRecipe(Items.fish, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 4)); - DryingRackRecipes.addDryingRecipe(Items.rotten_flesh, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 5)); - DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.strangeFood, 1, 0), 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 6)); - DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.strangeFood, 1, 1), 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 7)); - - // DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.jerky, 1, 5), - // 20 * 60 * 10, Item.leather); - } - - protected static void addRecipesForChisel () - { - /* Detailing */ - Detailing chiseling = TConstructRegistry.getChiselDetailing(); - chiseling.addDetailing(Blocks.stone, 0, Blocks.stonebrick, 0, TRepo.chisel); - chiseling.addDetailing(TRepo.speedBlock, 0, TRepo.speedBlock, 1, TRepo.chisel); - chiseling.addDetailing(TRepo.speedBlock, 2, TRepo.speedBlock, 3, TRepo.chisel); - chiseling.addDetailing(TRepo.speedBlock, 3, TRepo.speedBlock, 4, TRepo.chisel); - chiseling.addDetailing(TRepo.speedBlock, 4, TRepo.speedBlock, 5, TRepo.chisel); - chiseling.addDetailing(TRepo.speedBlock, 5, TRepo.speedBlock, 6, TRepo.chisel); - - chiseling.addDetailing(Blocks.obsidian, 0, TRepo.multiBrick, 0, TRepo.chisel); - chiseling.addDetailing(Blocks.sandstone, 0, Blocks.sandstone, 2, TRepo.chisel); - chiseling.addDetailing(Blocks.sandstone, 2, Blocks.sandstone, 1, TRepo.chisel); - chiseling.addDetailing(Blocks.sandstone, 1, TRepo.multiBrick, 1, TRepo.chisel); - // chiseling.addDetailing(Block.netherrack, 0, TRepo.multiBrick, 2, - // TRepo.chisel); - // chiseling.addDetailing(Block.stone_refined, 0, TRepo.multiBrick, 3, - // TRepo.chisel); - chiseling.addDetailing(Items.iron_ingot, 0, TRepo.multiBrick, 4, TRepo.chisel); - chiseling.addDetailing(Items.gold_ingot, 0, TRepo.multiBrick, 5, TRepo.chisel); - chiseling.addDetailing(Items.dye, 4, TRepo.multiBrick, 6, TRepo.chisel); - chiseling.addDetailing(Items.diamond, 0, TRepo.multiBrick, 7, TRepo.chisel); - chiseling.addDetailing(Items.redstone, 0, TRepo.multiBrick, 8, TRepo.chisel); - chiseling.addDetailing(Items.bone, 0, TRepo.multiBrick, 9, TRepo.chisel); - chiseling.addDetailing(Items.slime_ball, 0, TRepo.multiBrick, 10, TRepo.chisel); - chiseling.addDetailing(TRepo.strangeFood, 0, TRepo.multiBrick, 11, TRepo.chisel); - chiseling.addDetailing(Blocks.end_stone, 0, TRepo.multiBrick, 12, TRepo.chisel); - chiseling.addDetailing(TRepo.materials, 18, TRepo.multiBrick, 13, TRepo.chisel); - - // adding multiBrick / multiBrickFanxy meta 0-13 to list - for (int sc = 0; sc < 14; sc++) - { - chiseling.addDetailing(TRepo.multiBrick, sc, TRepo.multiBrickFancy, sc, TRepo.chisel); - } - - chiseling.addDetailing(Blocks.stonebrick, 0, TRepo.multiBrickFancy, 15, TRepo.chisel); - chiseling.addDetailing(TRepo.multiBrickFancy, 15, TRepo.multiBrickFancy, 14, TRepo.chisel); - chiseling.addDetailing(TRepo.multiBrickFancy, 14, Blocks.stonebrick, 3, TRepo.chisel); - /* - * chiseling.addDetailing(TRepo.multiBrick, 14, TRepo.multiBrickFancy, - * 14, TRepo.chisel); chiseling.addDetailing(TRepo.multiBrick, 15, - * TRepo.multiBrickFancy, 15, TRepo.chisel); - */ - - chiseling.addDetailing(TRepo.smeltery, 4, TRepo.smeltery, 6, TRepo.chisel); - chiseling.addDetailing(TRepo.smeltery, 6, TRepo.smeltery, 11, TRepo.chisel); - chiseling.addDetailing(TRepo.smeltery, 11, TRepo.smeltery, 2, TRepo.chisel); - chiseling.addDetailing(TRepo.smeltery, 2, TRepo.smeltery, 8, TRepo.chisel); - chiseling.addDetailing(TRepo.smeltery, 8, TRepo.smeltery, 9, TRepo.chisel); - chiseling.addDetailing(TRepo.smeltery, 9, TRepo.smeltery, 10, TRepo.chisel); - } - - public void oreRegistry () - { - OreDictionary.registerOre("oreCobalt", new ItemStack(TRepo.oreSlag, 1, 1)); - OreDictionary.registerOre("oreArdite", new ItemStack(TRepo.oreSlag, 1, 2)); - OreDictionary.registerOre("oreCopper", new ItemStack(TRepo.oreSlag, 1, 3)); - OreDictionary.registerOre("oreTin", new ItemStack(TRepo.oreSlag, 1, 4)); - OreDictionary.registerOre("oreAluminum", new ItemStack(TRepo.oreSlag, 1, 5)); - OreDictionary.registerOre("oreAluminium", new ItemStack(TRepo.oreSlag, 1, 5)); - - OreDictionary.registerOre("oreIron", new ItemStack(TRepo.oreGravel, 1, 0)); - OreDictionary.registerOre("oreGold", new ItemStack(TRepo.oreGravel, 1, 1)); - OreDictionary.registerOre("oreCobalt", new ItemStack(TRepo.oreGravel, 1, 5)); - OreDictionary.registerOre("oreCopper", new ItemStack(TRepo.oreGravel, 1, 2)); - OreDictionary.registerOre("oreTin", new ItemStack(TRepo.oreGravel, 1, 3)); - OreDictionary.registerOre("oreAluminum", new ItemStack(TRepo.oreGravel, 1, 4)); - OreDictionary.registerOre("oreAluminium", new ItemStack(TRepo.oreGravel, 1, 4)); - - OreDictionary.registerOre("ingotCobalt", new ItemStack(TRepo.materials, 1, 3)); - OreDictionary.registerOre("ingotArdite", new ItemStack(TRepo.materials, 1, 4)); - OreDictionary.registerOre("ingotManyullyn", new ItemStack(TRepo.materials, 1, 5)); - OreDictionary.registerOre("ingotCopper", new ItemStack(TRepo.materials, 1, 9)); - OreDictionary.registerOre("ingotTin", new ItemStack(TRepo.materials, 1, 10)); - OreDictionary.registerOre("ingotAluminum", new ItemStack(TRepo.materials, 1, 11)); - OreDictionary.registerOre("ingotAluminium", new ItemStack(TRepo.materials, 1, 11)); - OreDictionary.registerOre("ingotBronze", new ItemStack(TRepo.materials, 1, 13)); - OreDictionary.registerOre("ingotAluminumBrass", new ItemStack(TRepo.materials, 1, 14)); - OreDictionary.registerOre("ingotAluminiumBrass", new ItemStack(TRepo.materials, 1, 14)); - OreDictionary.registerOre("ingotAlumite", new ItemStack(TRepo.materials, 1, 15)); - OreDictionary.registerOre("ingotSteel", new ItemStack(TRepo.materials, 1, 16)); - ensureOreIsRegistered("ingotIron", new ItemStack(Items.iron_ingot)); - ensureOreIsRegistered("ingotGold", new ItemStack(Items.gold_ingot)); - OreDictionary.registerOre("ingotObsidian", new ItemStack(TRepo.materials, 1, 18)); - OreDictionary.registerOre("ingotPigIron", new ItemStack(TRepo.materials, 1, 34)); - OreDictionary.registerOre("itemRawRubber", new ItemStack(TRepo.materials, 1, 36)); - - OreDictionary.registerOre("blockCobalt", new ItemStack(TRepo.metalBlock, 1, 0)); - OreDictionary.registerOre("blockArdite", new ItemStack(TRepo.metalBlock, 1, 1)); - OreDictionary.registerOre("blockManyullyn", new ItemStack(TRepo.metalBlock, 1, 2)); - OreDictionary.registerOre("blockCopper", new ItemStack(TRepo.metalBlock, 1, 3)); - OreDictionary.registerOre("blockBronze", new ItemStack(TRepo.metalBlock, 1, 4)); - OreDictionary.registerOre("blockTin", new ItemStack(TRepo.metalBlock, 1, 5)); - OreDictionary.registerOre("blockAluminum", new ItemStack(TRepo.metalBlock, 1, 6)); - OreDictionary.registerOre("blockAluminium", new ItemStack(TRepo.metalBlock, 1, 6)); - OreDictionary.registerOre("blockAluminumBrass", new ItemStack(TRepo.metalBlock, 1, 7)); - OreDictionary.registerOre("blockAluminiumBrass", new ItemStack(TRepo.metalBlock, 1, 7)); - OreDictionary.registerOre("blockAlumite", new ItemStack(TRepo.metalBlock, 1, 8)); - OreDictionary.registerOre("blockSteel", new ItemStack(TRepo.metalBlock, 1, 9)); - OreDictionary.registerOre("blockEnder", new ItemStack(TRepo.metalBlock, 1, 10)); - ensureOreIsRegistered("blockIron", new ItemStack(Blocks.iron_block)); - ensureOreIsRegistered("blockGold", new ItemStack(Blocks.gold_block)); - - OreDictionary.registerOre("nuggetIron", new ItemStack(TRepo.materials, 1, 19)); - OreDictionary.registerOre("nuggetIron", new ItemStack(TRepo.oreBerries, 1, 0)); - OreDictionary.registerOre("nuggetCopper", new ItemStack(TRepo.materials, 1, 20)); - OreDictionary.registerOre("nuggetCopper", new ItemStack(TRepo.oreBerries, 1, 2)); - OreDictionary.registerOre("nuggetTin", new ItemStack(TRepo.materials, 1, 21)); - OreDictionary.registerOre("nuggetTin", new ItemStack(TRepo.oreBerries, 1, 3)); - OreDictionary.registerOre("nuggetAluminum", new ItemStack(TRepo.materials, 1, 22)); - OreDictionary.registerOre("nuggetAluminum", new ItemStack(TRepo.oreBerries, 1, 4)); - OreDictionary.registerOre("nuggetAluminium", new ItemStack(TRepo.materials, 1, 22)); - OreDictionary.registerOre("nuggetAluminium", new ItemStack(TRepo.oreBerries, 1, 4)); - OreDictionary.registerOre("nuggetAluminumBrass", new ItemStack(TRepo.materials, 1, 24)); - OreDictionary.registerOre("nuggetAluminiumBrass", new ItemStack(TRepo.materials, 1, 24)); - OreDictionary.registerOre("nuggetObsidian", new ItemStack(TRepo.materials, 1, 27)); - OreDictionary.registerOre("nuggetCobalt", new ItemStack(TRepo.materials, 1, 28)); - OreDictionary.registerOre("nuggetArdite", new ItemStack(TRepo.materials, 1, 29)); - OreDictionary.registerOre("nuggetManyullyn", new ItemStack(TRepo.materials, 1, 30)); - OreDictionary.registerOre("nuggetBronze", new ItemStack(TRepo.materials, 1, 31)); - OreDictionary.registerOre("nuggetAlumite", new ItemStack(TRepo.materials, 1, 32)); - OreDictionary.registerOre("nuggetSteel", new ItemStack(TRepo.materials, 1, 33)); - OreDictionary.registerOre("nuggetGold", new ItemStack(TRepo.oreBerries, 1, 1)); - 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)); - - ensureOreIsRegistered("stoneMossy", new ItemStack(Blocks.stonebrick, 1, 1)); - ensureOreIsRegistered("stoneMossy", new ItemStack(Blocks.mossy_cobblestone)); - - OreDictionary.registerOre("crafterWood", new ItemStack(Blocks.crafting_table, 1)); - OreDictionary.registerOre("craftingTableWood", new ItemStack(Blocks.crafting_table, 1)); - - OreDictionary.registerOre("torchStone", new ItemStack(TRepo.stoneTorch)); - - 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++) - { - //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("thaumiumRod", new ItemStack(TRepo.toolRod, 1, 31)); - - String[] glassTypes = { "GlassBlack", "GlassRed", "GlassGreen", "GlassBrown", "GlassBlue", "GlassPurple", "GlassCyan", "GlassLightGray", "GlassGray", "GlassPink", "GlassLime", "GlassYellow", - "GlassLightBlue", "GlassMagenta", "GlassOrange", "GlassWhite" }; - for (int i = 0; i < 16; i++) - { - OreDictionary.registerOre("block" + glassTypes[i], new ItemStack(TRepo.stainedGlassClear, 1, i)); - } - OreDictionary.registerOre("blockGlass", new ItemStack(TRepo.stainedGlassClear, 1, OreDictionary.WILDCARD_VALUE)); - - BlockDispenser.dispenseBehaviorRegistry.putObject(TRepo.titleIcon, new TDispenserBehaviorSpawnEgg()); - - BlockDispenser.dispenseBehaviorRegistry.putObject(TRepo.arrow, new TDispenserBehaviorArrow()); - - // Vanilla stuff - ensureOreIsRegistered("slimeball", new ItemStack(Items.slime_ball)); - OreDictionary.registerOre("slimeball", new ItemStack(TRepo.strangeFood, 1, 0)); - OreDictionary.registerOre("slimeball", new ItemStack(TRepo.strangeFood, 1, 1)); - OreDictionary.registerOre("slimeball", new ItemStack(TRepo.materials, 1, 36)); - OreDictionary.registerOre("blockGlass", new ItemStack(TRepo.clearGlass)); - OreDictionary.registerOre("blockGlassColorless", new ItemStack(TRepo.clearGlass)); - ensureOreIsRegistered("blockGlass", new ItemStack(Blocks.glass)); - ensureOreIsRegistered("blockGlassColorless", new ItemStack(Blocks.glass)); - RecipeRemover.removeShapedRecipe(new ItemStack(Blocks.sticky_piston)); - RecipeRemover.removeShapedRecipe(new ItemStack(Items.magma_cream)); - RecipeRemover.removeShapedRecipe(new ItemStack(Items.lead)); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.sticky_piston), "slimeball", Blocks.piston)); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.magma_cream), "slimeball", Items.blaze_powder)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.lead, 2), "ss ", "sS ", " s", 's', Items.string, 'S', "slimeball")); - } - - private static void ensureOreIsRegistered (String oreName, ItemStack is) - { - int oreId = OreDictionary.getOreID(is); - if (oreId == -1) - { - OreDictionary.registerOre(oreName, is); - } - } - - public void addShapedRecipeFirst (List recipeList, ItemStack itemstack, Object... objArray) - { - String var3 = ""; - int var4 = 0; - int var5 = 0; - int var6 = 0; - - if (objArray[var4] instanceof String[]) - { - String[] var7 = ((String[]) objArray[var4++]); - - for (int var8 = 0; var8 < var7.length; ++var8) - { - String var9 = var7[var8]; - ++var6; - var5 = var9.length(); - var3 = var3 + var9; - } - } - else - { - while (objArray[var4] instanceof String) - { - String var11 = (String) objArray[var4++]; - ++var6; - var5 = var11.length(); - var3 = var3 + var11; - } - } - - HashMap var12; - - for (var12 = new HashMap(); var4 < objArray.length; var4 += 2) - { - Character var13 = (Character) objArray[var4]; - ItemStack var14 = null; - - if (objArray[var4 + 1] instanceof Item) - { - var14 = new ItemStack((Item) objArray[var4 + 1]); - } - else if (objArray[var4 + 1] instanceof Block) - { - var14 = new ItemStack((Block) objArray[var4 + 1], 1, Short.MAX_VALUE); - } - else if (objArray[var4 + 1] instanceof ItemStack) - { - var14 = (ItemStack) objArray[var4 + 1]; - } - - var12.put(var13, var14); - } - - ItemStack[] var15 = new ItemStack[var5 * var6]; - - for (int var16 = 0; var16 < var5 * var6; ++var16) - { - char var10 = var3.charAt(var16); - - if (var12.containsKey(Character.valueOf(var10))) - { - var15[var16] = ((ItemStack) var12.get(Character.valueOf(var10))).copy(); - } - else - { - var15[var16] = null; - } - } - - ShapedRecipes var17 = new ShapedRecipes(var5, var6, var15, itemstack); - recipeList.add(0, var17); - } - - public void modRecipes () - { - if (!TRepo.initRecipes) - { - TRepo.initRecipes = true; - if (PHConstruct.removeVanillaToolRecipes) - { - RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_pickaxe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_axe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_shovel)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_hoe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_sword)); - - RecipeRemover.removeAnyRecipe(new ItemStack(Items.stone_pickaxe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.stone_axe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.stone_shovel)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.stone_hoe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.stone_sword)); - - RecipeRemover.removeAnyRecipe(new ItemStack(Items.iron_pickaxe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.iron_axe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.iron_shovel)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.iron_hoe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.iron_sword)); - - RecipeRemover.removeAnyRecipe(new ItemStack(Items.diamond_pickaxe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.diamond_axe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.diamond_shovel)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.diamond_hoe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.diamond_sword)); - - RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_pickaxe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_axe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_shovel)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_hoe)); - RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_sword)); - } - - if (PHConstruct.labotimizeVanillaTools) - { - Items.wooden_pickaxe.setMaxDamage(1); - Items.wooden_axe.setMaxDamage(1); - 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); - Items.golden_hoe.setMaxDamage(1); - Items.golden_sword.setMaxDamage(1); - } - } - } - - private static void registerPatternMaterial (String oreName, int value, String materialName) - { - for (ItemStack ore : OreDictionary.getOres(oreName)) - { - PatternBuilder.instance.registerMaterial(ore, value, materialName); - } - } - - private static void registerIngotCasting (FluidType ft) - { - ItemStack pattern = new ItemStack(TRepo.metalPattern, 1, 0); - LiquidCasting tableCasting = TConstructRegistry.instance.getTableCasting(); - for (ItemStack ore : OreDictionary.getOres("ingot" + ft.toString())) - { - tableCasting.addCastingRecipe(pattern, new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(ore.getItem(), 1, ore.getItemDamage()), false, 50); - tableCasting.addCastingRecipe(pattern, new FluidStack(TRepo.moltenGoldFluid, TConstruct.oreLiquidValue), new ItemStack(ore.getItem(), 1, ore.getItemDamage()), false, 50); - tableCasting.addCastingRecipe(new ItemStack(ore.getItem(), 1, ore.getItemDamage()), new FluidStack(ft.fluid, TConstruct.ingotLiquidValue), pattern, 80); - } - - } - - protected static void addRecipesForBasinCasting () - { - LiquidCasting basinCasting = TConstructRegistry.getBasinCasting(); - // Block Casting - basinCasting.addCastingRecipe(new ItemStack(Blocks.iron_block), new FluidStack(TRepo.moltenIronFluid, TConstruct.blockLiquidValue), null, true, 100); // Iron - basinCasting.addCastingRecipe(new ItemStack(Blocks.gold_block), new FluidStack(TRepo.moltenGoldFluid, TConstruct.blockLiquidValue), null, true, 100); // gold - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 3), new FluidStack(TRepo.moltenCopperFluid, TConstruct.blockLiquidValue), null, true, 100); // copper - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 5), new FluidStack(TRepo.moltenTinFluid, TConstruct.blockLiquidValue), null, true, 100); // tin - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 6), new FluidStack(TRepo.moltenAluminumFluid, TConstruct.blockLiquidValue), null, true, 100); // aluminum - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 0), new FluidStack(TRepo.moltenCobaltFluid, TConstruct.blockLiquidValue), null, true, 100); // cobalt - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 1), new FluidStack(TRepo.moltenArditeFluid, TConstruct.blockLiquidValue), null, true, 100); // ardite - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 4), new FluidStack(TRepo.moltenBronzeFluid, TConstruct.blockLiquidValue), null, true, 100); // bronze - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 7), new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.blockLiquidValue), null, true, 100); // albrass - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 2), new FluidStack(TRepo.moltenManyullynFluid, TConstruct.blockLiquidValue), null, true, 100); // manyullyn - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 8), new FluidStack(TRepo.moltenAlumiteFluid, TConstruct.blockLiquidValue), null, true, 100); // alumite - basinCasting.addCastingRecipe(new ItemStack(Blocks.obsidian), new FluidStack(TRepo.moltenObsidianFluid, TConstruct.oreLiquidValue), null, true, 100);// obsidian - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 9), new FluidStack(TRepo.moltenSteelFluid, TConstruct.blockLiquidValue), null, true, 100); // steel - basinCasting.addCastingRecipe(new ItemStack(TRepo.clearGlass, 1, 0), new FluidStack(TRepo.moltenGlassFluid, FluidContainerRegistry.BUCKET_VOLUME), null, true, 100); // glass - basinCasting.addCastingRecipe(new ItemStack(TRepo.smeltery, 1, 4), new FluidStack(TRepo.moltenStoneFluid, TConstruct.ingotLiquidValue), null, true, 100); // seared - // stone - basinCasting.addCastingRecipe(new ItemStack(TRepo.smeltery, 1, 5), new FluidStack(TRepo.moltenStoneFluid, TConstruct.chunkLiquidValue), new ItemStack(Blocks.cobblestone), true, 100); - basinCasting.addCastingRecipe(new ItemStack(Blocks.emerald_block), new FluidStack(TRepo.moltenEmeraldFluid, 640 * 9), null, true, 100); // emerald - basinCasting.addCastingRecipe(new ItemStack(TRepo.speedBlock, 1, 0), new FluidStack(TRepo.moltenTinFluid, TConstruct.nuggetLiquidValue), new ItemStack(Blocks.gravel), true, 100); // brownstone - if (PHConstruct.craftEndstone) - { - basinCasting.addCastingRecipe(new ItemStack(Blocks.end_stone), new FluidStack(TRepo.moltenEnderFluid, 50), new ItemStack(Blocks.obsidian), true, 100); - basinCasting.addCastingRecipe(new ItemStack(Blocks.end_stone), new FluidStack(TRepo.moltenEnderFluid, 250), new ItemStack(Blocks.sandstone), true, 100); - } - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 10), new FluidStack(TRepo.moltenEnderFluid, 1000), null, true, 100); // ender - basinCasting.addCastingRecipe(new ItemStack(TRepo.glueBlock), new FluidStack(TRepo.glueFluid, TConstruct.blockLiquidValue), null, true, 100); // glue - - // basinCasting.addCastingRecipe(new ItemStack(slimeGel, 1, 0), new - // FluidStack(blueSlimeFluid, FluidContainerRegistry.BUCKET_VOLUME), - // null, true, 100); - - // Armor casts - /* - * FluidRenderProperties frp = new - * FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, - * Applications.BASIN); FluidStack aluFlu = new - * FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue * - * 10); FluidStack gloFlu = new FluidStack(TRepo.moltenGoldFluid, - * TConstruct.ingotLiquidValue * 10); ItemStack[] armor = { new - * ItemStack(helmetWood), new ItemStack(chestplateWood), new - * ItemStack(leggingsWood), new ItemStack(bootsWood) }; for (int sc = 0; - * sc < armor.length; sc++) { basinCasting.addCastingRecipe(new - * ItemStack(armorPattern, 1, sc), aluFlu, armor[sc], 50, frp); - * basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, sc), - * gloFlu, armor[sc], 50, frp); } - */ - } - - protected static void addRecipesForSmeltery () - { - // Alloy Smelting - Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenBronzeFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsBronzeAlloy)), new FluidStack(TRepo.moltenCopperFluid, - TConstruct.ingotLiquidValue * 3), new FluidStack(TRepo.moltenTinFluid, TConstruct.ingotLiquidValue)); // Bronze - Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenAlubrassFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAluminumBrassAlloy)), new FluidStack(TRepo.moltenAluminumFluid, - TConstruct.ingotLiquidValue * 3), new FluidStack(TRepo.moltenCopperFluid, TConstruct.ingotLiquidValue * 1)); // Aluminum Brass - Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenAlumiteFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAlumiteAlloy)), new FluidStack(TRepo.moltenAluminumFluid, - TConstruct.ingotLiquidValue * 5), new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2), new FluidStack(TRepo.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); // Alumite - Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenManyullynFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsManyullynAlloy)), new FluidStack(TRepo.moltenCobaltFluid, - TConstruct.ingotLiquidValue), new FluidStack(TRepo.moltenArditeFluid, TConstruct.ingotLiquidValue)); // Manyullyn - Smeltery.addAlloyMixing(new FluidStack(TRepo.pigIronFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsPigironAlloy)), new FluidStack(TRepo.moltenIronFluid, - TConstruct.ingotLiquidValue), new FluidStack(TRepo.moltenEmeraldFluid, 640), new FluidStack(TRepo.bloodFluid, 80)); // Pigiron - Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenObsidianFluid, TConstruct.oreLiquidValue), new FluidStack(FluidRegistry.LAVA, 1000), new FluidStack(FluidRegistry.WATER, 1000)); //Obsidian - // Stone parts - for (int sc = 0; sc < TRepo.patternOutputs.length; sc++) - { - if (TRepo.patternOutputs[sc] != null) - { - Smeltery.addMelting(FluidType.Stone, new ItemStack(TRepo.patternOutputs[sc], 1, 1), 1, - (8 * ((IPattern) TRepo.woodPattern).getPatternCost(new ItemStack(TRepo.woodPattern, 1, sc + 1))) / 2); - } - } - - // Chunks - Smeltery.addMelting(FluidType.Stone, new ItemStack(TRepo.toolShard, 1, 1), 0, 4); - Smeltery.addMelting(FluidType.Iron, new ItemStack(TRepo.toolShard, 1, 2), 0, TConstruct.chunkLiquidValue); - Smeltery.addMelting(FluidType.Obsidian, new ItemStack(TRepo.toolShard, 1, 6), 0, TConstruct.chunkLiquidValue); - Smeltery.addMelting(FluidType.Cobalt, new ItemStack(TRepo.toolShard, 1, 10), 0, TConstruct.chunkLiquidValue); - Smeltery.addMelting(FluidType.Ardite, new ItemStack(TRepo.toolShard, 1, 11), 0, TConstruct.chunkLiquidValue); - Smeltery.addMelting(FluidType.Manyullyn, new ItemStack(TRepo.toolShard, 1, 12), 0, TConstruct.chunkLiquidValue); - Smeltery.addMelting(FluidType.Copper, new ItemStack(TRepo.toolShard, 1, 13), 0, TConstruct.chunkLiquidValue); - Smeltery.addMelting(FluidType.Bronze, new ItemStack(TRepo.toolShard, 1, 14), 0, TConstruct.chunkLiquidValue); - Smeltery.addMelting(FluidType.Alumite, new ItemStack(TRepo.toolShard, 1, 15), 0, TConstruct.chunkLiquidValue); - Smeltery.addMelting(FluidType.Steel, new ItemStack(TRepo.toolShard, 1, 16), 0, TConstruct.chunkLiquidValue); - - // Items - - Smeltery.addMelting(FluidType.AluminumBrass, new ItemStack(TRepo.blankPattern, 4, 1), -50, TConstruct.ingotLiquidValue); - Smeltery.addMelting(FluidType.Gold, new ItemStack(TRepo.blankPattern, 4, 2), -50, TConstruct.ingotLiquidValue * 2); - Smeltery.addMelting(FluidType.Glue, new ItemStack(TRepo.materials, 1, 36), 0, TConstruct.ingotLiquidValue); - - Smeltery.addMelting(FluidType.Ender, new ItemStack(Items.ender_pearl, 4), 0, 250); - Smeltery.addMelting(TRepo.metalBlock, 10, 50, new FluidStack(TRepo.moltenEnderFluid, 1000)); - Smeltery.addMelting(FluidType.Water, new ItemStack(Items.snowball, 1, 0), 0, 125); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.flint_and_steel, 1, 0), 0, TConstruct.ingotLiquidValue); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.compass, 1, 0), 0, TConstruct.ingotLiquidValue * 4); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.bucket), 0, TConstruct.ingotLiquidValue * 3); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.minecart), 0, TConstruct.ingotLiquidValue * 5); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.chest_minecart), 0, TConstruct.ingotLiquidValue * 5); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.hopper_minecart), 50, TConstruct.ingotLiquidValue * 10); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_door), 0, TConstruct.ingotLiquidValue * 6); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.cauldron), 0, TConstruct.ingotLiquidValue * 7); - 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)); - Smeltery.addMelting(Blocks.gold_ore, 0, 400, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2)); - Smeltery.addMelting(TRepo.oreGravel, 0, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2)); - Smeltery.addMelting(TRepo.oreGravel, 1, 400, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2)); - - // Blocks - Smeltery.addMelting(Blocks.iron_block, 0, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 9)); - Smeltery.addMelting(Blocks.gold_block, 0, 400, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 9)); - Smeltery.addMelting(Blocks.obsidian, 0, 800, new FluidStack(TRepo.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); - Smeltery.addMelting(Blocks.ice, 0, 75, new FluidStack(FluidRegistry.getFluid("water"), 1000)); - Smeltery.addMelting(Blocks.snow, 0, 75, new FluidStack(FluidRegistry.getFluid("water"), 500)); - Smeltery.addMelting(Blocks.snow_layer, 0, 75, new FluidStack(FluidRegistry.getFluid("water"), 250)); - Smeltery.addMelting(Blocks.sand, 0, 625, new FluidStack(TRepo.moltenGlassFluid, FluidContainerRegistry.BUCKET_VOLUME)); - Smeltery.addMelting(Blocks.glass, 0, 625, new FluidStack(TRepo.moltenGlassFluid, FluidContainerRegistry.BUCKET_VOLUME)); - Smeltery.addMelting(Blocks.glass_pane, 0, 625, new FluidStack(TRepo.moltenGlassFluid, 250)); - Smeltery.addMelting(Blocks.stone, 0, 800, new FluidStack(TRepo.moltenStoneFluid, TConstruct.ingotLiquidValue / 18)); - Smeltery.addMelting(Blocks.cobblestone, 0, 800, new FluidStack(TRepo.moltenStoneFluid, TConstruct.ingotLiquidValue / 18)); - Smeltery.addMelting(Blocks.emerald_block, 0, 800, new FluidStack(TRepo.moltenEmeraldFluid, 640 * 9)); - Smeltery.addMelting(TRepo.glueBlock, 0, 250, new FluidStack(TRepo.glueFluid, TConstruct.blockLiquidValue)); - Smeltery.addMelting(TRepo.craftedSoil, 1, 600, new FluidStack(TRepo.moltenStoneFluid, TConstruct.ingotLiquidValue / 4)); - - Smeltery.addMelting(TRepo.clearGlass, 0, 500, new FluidStack(TRepo.moltenGlassFluid, 1000)); - Smeltery.addMelting(TRepo.glassPane, 0, 350, new FluidStack(TRepo.moltenGlassFluid, 250)); - - for (int i = 0; i < 16; i++) - { - Smeltery.addMelting(TRepo.stainedGlassClear, i, 500, new FluidStack(TRepo.moltenGlassFluid, 1000)); - Smeltery.addMelting(TRepo.stainedGlassClearPane, i, 350, new FluidStack(TRepo.moltenGlassFluid, 250)); - } - - // Bricks - Smeltery.addMelting(TRepo.multiBrick, 4, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue)); - Smeltery.addMelting(TRepo.multiBrickFancy, 4, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue)); - Smeltery.addMelting(TRepo.multiBrick, 5, 400, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue)); - Smeltery.addMelting(TRepo.multiBrickFancy, 5, 400, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue)); - Smeltery.addMelting(TRepo.multiBrick, 0, 800, new FluidStack(TRepo.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); - Smeltery.addMelting(TRepo.multiBrickFancy, 0, 800, new FluidStack(TRepo.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); - - // Vanilla blocks - Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.iron_bars), 0, TConstruct.ingotLiquidValue * 6 / 16); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.heavy_weighted_pressure_plate), 0, TConstruct.oreLiquidValue); - Smeltery.addMelting(FluidType.Gold, new ItemStack(Blocks.light_weighted_pressure_plate, 4), 0, TConstruct.oreLiquidValue); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.rail), 0, TConstruct.ingotLiquidValue * 6 / 16); - Smeltery.addMelting(FluidType.Gold, new ItemStack(Blocks.golden_rail), 0, TConstruct.ingotLiquidValue); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.detector_rail), 0, TConstruct.ingotLiquidValue); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.activator_rail), 0, TConstruct.ingotLiquidValue); - Smeltery.addMelting(FluidType.Obsidian, new ItemStack(Blocks.enchanting_table), 0, TConstruct.ingotLiquidValue * 4); - // Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.cauldron), - // 0, TConstruct.ingotLiquidValue * 7); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.anvil, 1, 0), 200, TConstruct.ingotLiquidValue * 31); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.anvil, 1, 1), 200, TConstruct.ingotLiquidValue * 31); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.anvil, 1, 2), 200, TConstruct.ingotLiquidValue * 31); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.hopper), 0, TConstruct.ingotLiquidValue * 5); - - // Vanilla Armor - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_helmet, 1, 0), 50, TConstruct.ingotLiquidValue * 5); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_chestplate, 1, 0), 50, TConstruct.ingotLiquidValue * 8); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_leggings, 1, 0), 50, TConstruct.ingotLiquidValue * 7); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_boots, 1, 0), 50, TConstruct.ingotLiquidValue * 4); - - Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_helmet, 1, 0), 50, TConstruct.ingotLiquidValue * 5); - Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_chestplate, 1, 0), 50, TConstruct.ingotLiquidValue * 8); - Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_leggings, 1, 0), 50, TConstruct.ingotLiquidValue * 7); - Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_boots, 1, 0), 50, TConstruct.ingotLiquidValue * 4); - - Smeltery.addMelting(FluidType.Steel, new ItemStack(Items.chainmail_helmet, 1, 0), 25, TConstruct.ingotLiquidValue); - Smeltery.addMelting(FluidType.Steel, new ItemStack(Items.chainmail_chestplate, 1, 0), 50, TConstruct.oreLiquidValue); - Smeltery.addMelting(FluidType.Steel, new ItemStack(Items.chainmail_leggings, 1, 0), 50, TConstruct.oreLiquidValue); - Smeltery.addMelting(FluidType.Steel, new ItemStack(Items.chainmail_boots, 1, 0), 25, TConstruct.ingotLiquidValue); - - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_horse_armor, 1), 100, TConstruct.ingotLiquidValue * 8); - Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_horse_armor, 1), 100, TConstruct.ingotLiquidValue * 8); - - // Vanilla tools - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_hoe, 1, 0), 0, TConstruct.oreLiquidValue); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_sword, 1, 0), 0, TConstruct.oreLiquidValue); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_shovel, 1, 0), 0, TConstruct.ingotLiquidValue); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_pickaxe, 1, 0), 0, TConstruct.ingotLiquidValue * 3); - Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_axe, 1, 0), 0, TConstruct.ingotLiquidValue * 3); - - Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_hoe, 1, 0), 0, TConstruct.oreLiquidValue); - Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_sword, 1, 0), 0, TConstruct.oreLiquidValue); - Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_shovel, 1, 0), 0, TConstruct.ingotLiquidValue); - Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_pickaxe, 1, 0), 0, TConstruct.ingotLiquidValue * 3); - Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_axe, 1, 0), 0, TConstruct.ingotLiquidValue * 3); - } - - public void modIntegration () - { - /* Natura */ - Block taintedSoil = GameRegistry.findBlock("Natura", "soil.tainted"); - Block heatSand = GameRegistry.findBlock("Natura", "heatsand"); - if (taintedSoil != null && heatSand != null) - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 2, 6), Items.nether_wart, taintedSoil, heatSand); - - ItemStack ironpick = ToolBuilder.instance.buildTool(new ItemStack(TRepo.pickaxeHead, 1, 6), new ItemStack(TRepo.toolRod, 1, 2), new ItemStack(TRepo.binding, 1, 6), ""); - /* TE3 Flux */ - ItemStack batHardened = GameRegistry.findItemStack("ThermalExpansion", "capacitorHardened", 1); - if (batHardened != null) - { - TRepo.modFlux.batteries.add(batHardened); - } - ItemStack basicCell = GameRegistry.findItemStack("ThermalExpansion", "cellBasic", 1); - if (basicCell != null) - { - TRepo.modFlux.batteries.add(basicCell); - } - if (batHardened != null) - TConstructClientRegistry.registerManualModifier("fluxmod", ironpick.copy(), (ItemStack) batHardened); - if (basicCell != null) - TConstructClientRegistry.registerManualModifier("fluxmod2", ironpick.copy(), (ItemStack) basicCell); - - /* Thaumcraft */ - Object obj = getStaticItem("itemResource", "thaumcraft.common.config.ConfigItems"); - if (obj != null) - { - TConstruct.logger.info("Thaumcraft detected. Adding thaumium tools."); - 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); - for (int meta = 0; meta < TRepo.patternOutputs.length; meta++) - { - if (TRepo.patternOutputs[meta] != null) - TConstructRegistry.addPartMapping(TRepo.woodPattern, meta + 1, 31, new ItemStack(TRepo.patternOutputs[meta], 1, 31)); - } - - TConstructRegistry.addBowstringMaterial(1, 2, new ItemStack((Item) obj, 1, 7), new ItemStack(TRepo.bowstring, 1, 1), 1F, 1F, 0.9f); - TConstructRegistry.addBowMaterial(31, 576, 40, 1.2f); - TConstructRegistry.addArrowMaterial(31, 1.8F, 0.5F, 100F); - } - else - { - TConstruct.logger.warn("Thaumcraft not detected."); - } - - if (Loader.isModLoaded("Natura")) - { - try - { - Object plantItem = getStaticItem("plantItem", "mods.natura.common.NContent"); - TConstructRegistry.addBowstringMaterial(2, 2, new ItemStack((Item) plantItem, 1, 7), new ItemStack(TRepo.bowstring, 1, 2), 1.2F, 0.8F, 1.3f); - } - catch (Exception e) - { - } // No need to handle - } - - ItemStack ingotcast = new ItemStack(TRepo.metalPattern, 1, 0); - LiquidCasting tableCasting = TConstructRegistry.instance.getTableCasting(); - LiquidCasting basinCasting = TConstructRegistry.instance.getBasinCasting(); - - /* Thermal Expansion 3 Metals */ - ArrayList ores = OreDictionary.getOres("ingotNickel"); - if (ores.size() > 0) - { - tableCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenNickelFluid, TConstruct.ingotLiquidValue), ingotcast, 80); - } - ores = OreDictionary.getOres("ingotLead"); - if (ores.size() > 0) - { - tableCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenLeadFluid, TConstruct.ingotLiquidValue), ingotcast, 80); - } - ores = OreDictionary.getOres("ingotSilver"); - if (ores.size() > 0) - { - tableCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenSilverFluid, TConstruct.ingotLiquidValue), ingotcast, 80); - } - ores = OreDictionary.getOres("ingotPlatinum"); - if (ores.size() > 0) - { - tableCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenShinyFluid, TConstruct.ingotLiquidValue), ingotcast, 80); - } - ores = OreDictionary.getOres("ingotInvar"); - if (ores.size() > 0) - { - tableCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenInvarFluid, TConstruct.ingotLiquidValue), ingotcast, 80); - Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenInvarFluid, TConstruct.ingotLiquidValue * 3), new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2), new FluidStack( - TRepo.moltenNickelFluid, TConstruct.ingotLiquidValue * 1)); // Invar - } - ores = OreDictionary.getOres("ingotElectrum"); - if (ores.size() > 0) - { - tableCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenElectrumFluid, TConstruct.ingotLiquidValue), ingotcast, 80); - Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenElectrumFluid, TConstruct.ingotLiquidValue * 2), new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue), new FluidStack( - TRepo.moltenSilverFluid, TConstruct.ingotLiquidValue)); // Electrum - } - - ores = OreDictionary.getOres("blockNickel"); - if (ores.size() > 0) - { - basinCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenNickelFluid, TConstruct.blockLiquidValue), null, 100); - } - ores = OreDictionary.getOres("blockLead"); - if (ores.size() > 0) - { - basinCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenLeadFluid, TConstruct.blockLiquidValue), null, 100); - } - ores = OreDictionary.getOres("blockSilver"); - if (ores.size() > 0) - { - basinCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenSilverFluid, TConstruct.blockLiquidValue), null, 100); - } - ores = OreDictionary.getOres("blockPlatinum"); - if (ores.size() > 0) - { - basinCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenShinyFluid, TConstruct.blockLiquidValue), null, 100); - } - ores = OreDictionary.getOres("blockInvar"); - if (ores.size() > 0) - { - basinCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenInvarFluid, TConstruct.blockLiquidValue), null, 100); - } - ores = OreDictionary.getOres("blockElectrum"); - if (ores.size() > 0) - { - basinCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenElectrumFluid, TConstruct.blockLiquidValue), null, 100); - } - - /* Extra Utilities */ - ores = OreDictionary.getOres("compressedGravel1x"); - if (ores.size() > 0) - { - basinCasting.addCastingRecipe(new ItemStack(TRepo.speedBlock, 9), new FluidStack(TRepo.moltenElectrumFluid, TConstruct.blockLiquidValue), ores.get(0), 100); - } - ores = OreDictionary.getOres("compressedGravel2x"); // Higher won't save - // properly - if (ores.size() > 0) - { - basinCasting.addCastingRecipe(new ItemStack(TRepo.speedBlock, 81), new FluidStack(TRepo.moltenElectrumFluid, TConstruct.blockLiquidValue * 9), ores.get(0), 100); - } - - /* Rubber */ - ores = OreDictionary.getOres("itemRubber"); - if (ores.size() > 0) - { - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 36), ores.get(0), 0.2f); - } - } - - public Object getStaticItem (String name, String classPackage) - { - try - { - Class clazz = Class.forName(classPackage); - Field field = clazz.getDeclaredField(name); - Object ret = field.get(null); - if (ret != null && (ret instanceof ItemStack || ret instanceof Item)) - return ret; - return null; - } - catch (Exception e) - { - TConstruct.logger.warn("Could not find " + name + "from " + classPackage); - return null; - } - } - -} diff --git a/src/main/java/tconstruct/common/TRepo.java b/src/main/java/tconstruct/common/TRepo.java deleted file mode 100644 index 3fdc81434bb..00000000000 --- a/src/main/java/tconstruct/common/TRepo.java +++ /dev/null @@ -1,285 +0,0 @@ -package tconstruct.common; - -import net.minecraft.block.Block; -import net.minecraft.block.Block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor.ArmorMaterial; -import net.minecraftforge.common.ChestGenHooks; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import tconstruct.*; -import tconstruct.blocks.slime.*; -import tconstruct.library.tools.*; -import tconstruct.tools.modifiers.*; -import tconstruct.world.blocks.*; -import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; - -@ObjectHolder(TConstruct.modID) -public class TRepo -{ - // Supresses console spam when iguana's tweaks remove stuff - public static boolean supressMissingToolLogs = false; - - // Patterns and other materials - public static Item blankPattern; - public static Item materials; - public static Item toolRod; - public static Item toolShard; - public static Item woodPattern; - public static Item metalPattern; - // public static Item armorPattern; - - public static Item manualBook; - public static Item buckets; - public static Item titleIcon; - - public static Item strangeFood; - public static Item diamondApple; - public static Item jerky; - // public static Item stonePattern; - // public static Item netherPattern; - - // Tools - public static ToolCore pickaxe; - public static ToolCore shovel; - public static ToolCore hatchet; - public static ToolCore broadsword; - public static ToolCore longsword; - public static ToolCore rapier; - public static ToolCore dagger; - public static ToolCore cutlass; - - public static ToolCore frypan; - public static ToolCore battlesign; - public static ToolCore chisel; - public static ToolCore mattock; - - public static ToolCore scythe; - public static ToolCore lumberaxe; - public static ToolCore cleaver; - public static ToolCore excavator; - public static ToolCore hammer; - public static ToolCore battleaxe; - - public static ToolCore shortbow; - public static ToolCore arrow; - - public static Item potionLauncher; - - // Tool parts - public static Item binding; - public static Item toughBinding; - public static Item toughRod; - public static Item largePlate; - - public static Item pickaxeHead; - public static Item shovelHead; - public static Item hatchetHead; - public static Item frypanHead; - public static Item signHead; - public static Item chiselHead; - public static Item scytheBlade; - public static Item broadAxeHead; - public static Item excavatorHead; - public static Item hammerHead; - - public static Item swordBlade; - public static Item largeSwordBlade; - public static Item knifeBlade; - - public static Item wideGuard; - public static Item handGuard; - public static Item crossbar; - public static Item fullGuard; - - public static Item bowstring; - public static Item arrowhead; - public static Item fletching; - - // Crafting blocks - public static Block toolStationWood; - public static Block toolStationStone; - public static Block toolForge; - public static Block craftingStationWood; - public static Block craftingSlabWood; - public static Block furnaceSlab; - - public static Block heldItemBlock; - public static Block battlesignBlock; - public static Block craftedSoil; - - public static Block smeltery; - public static Block lavaTank; - public static Block searedBlock; - public static Block castingChannel; - public static Block metalBlock; - public static Block tankAir; - public static Block smelteryNether; - public static Block lavaTankNether; - public static Block searedBlockNether; - - public static Block dryingRack; - - // Decoration - public static Block stoneTorch; - public static Block stoneLadder; - public static Block multiBrick; - public static Block multiBrickFancy; - - public static Block searedSlab; - public static Block speedSlab; - - public static Block meatBlock; - public static Block woolSlab1; - public static Block woolSlab2; - public static Block glueBlock; - - // Traps - public static Block landmine; - public static Block punji; - public static Block barricadeOak; - public static Block barricadeSpruce; - public static Block barricadeBirch; - public static Block barricadeJungle; - public static Block slimeExplosive; - - // InfiBlocks - public static Block speedBlock; - public static Block clearGlass; - // public static Block stainedGlass; - public static Block stainedGlassClear; - public static Block glassPane; - // public static Block stainedGlassPane; - public static Block stainedGlassClearPane; - public static Block glassMagicSlab; - public static Block stainedGlassMagicSlab; - public static Block stainedGlassClearMagicSlab; - - // Liquids - public static Material liquidMetal; - - public static Fluid moltenIronFluid; - public static Fluid moltenGoldFluid; - public static Fluid moltenCopperFluid; - public static Fluid moltenTinFluid; - public static Fluid moltenAluminumFluid; - public static Fluid moltenCobaltFluid; - public static Fluid moltenArditeFluid; - public static Fluid moltenBronzeFluid; - public static Fluid moltenAlubrassFluid; - public static Fluid moltenManyullynFluid; - public static Fluid moltenAlumiteFluid; - public static Fluid moltenObsidianFluid; - public static Fluid moltenSteelFluid; - public static Fluid moltenGlassFluid; - public static Fluid moltenStoneFluid; - public static Fluid moltenEmeraldFluid; - public static Fluid bloodFluid; - public static Fluid moltenNickelFluid; - public static Fluid moltenLeadFluid; - public static Fluid moltenSilverFluid; - public static Fluid moltenShinyFluid; - public static Fluid moltenInvarFluid; - public static Fluid moltenElectrumFluid; - public static Fluid moltenEnderFluid; - public static Fluid blueSlimeFluid; - public static Fluid pigIronFluid; - - public static Block moltenIron; - public static Block moltenGold; - public static Block moltenCopper; - public static Block moltenTin; - public static Block moltenAluminum; - public static Block moltenCobalt; - public static Block moltenArdite; - public static Block moltenBronze; - public static Block moltenAlubrass; - public static Block moltenManyullyn; - public static Block moltenAlumite; - public static Block moltenObsidian; - public static Block moltenSteel; - public static Block moltenGlass; - public static Block moltenStone; - public static Block moltenEmerald; - public static Block blood; - public static Block moltenNickel; - public static Block moltenLead; - public static Block moltenSilver; - public static Block moltenShiny; - public static Block moltenInvar; - public static Block moltenElectrum; - public static Block moltenEnder; - - // Slime - public static SoundType slimeStep; - public static Block slimePool; - public static Block slimeGel; - public static Block slimeGrass; - public static Block slimeTallGrass; - public static SlimeLeaves slimeLeaves; - public static SlimeSapling slimeSapling; - - public static Block slimeChannel; - public static Block slimePad; - public static Block bloodChannel; - - // Glue - public static Fluid glueFluid; - public static Block glueFluidBlock; - - // Ores - public static Block oreSlag; - public static Block oreGravel; - public static OreberryBush oreBerry; - public static OreberryBush oreBerrySecond; - public static Item oreBerries; - - // Tool modifiers - public static ModFlux modFlux; - public static ModLapis modLapis; - public static ModAttack modAttack; - - public static Item creativeModifier; - - // Wearables - public static Item heavyHelmet; - public static Item heavyChestplate; - public static Item heavyPants; - public static Item heavyBoots; - public static Item glove; - public static Item knapsack; - - public static Item heartCanister; - public static Item goldHead; - - // Rail-related - public static Block woodenRail; - - // Chest hooks - public static ChestGenHooks tinkerHouseChest; - public static ChestGenHooks tinkerHousePatterns; - - // Armor - basic - public static Item helmetWood; - public static Item chestplateWood; - public static Item leggingsWood; - public static Item bootsWood; - public static ArmorMaterial materialWood; - - // Armor - exosuit - public static Item exoGoggles; - public static Item exoChest; - public static Item exoPants; - public static Item exoShoes; - - public static Fluid[] fluids = new Fluid[27]; - public static Block[] fluidBlocks = new Block[26]; - - // recipe stuff - public static boolean thaumcraftAvailable; - public static boolean initRecipes; - public static Item[] patternOutputs; - public static FluidStack[] liquids; - -} diff --git a/src/main/java/tconstruct/library/crafting/FluidType.java b/src/main/java/tconstruct/library/crafting/FluidType.java index a2f8d112119..99cd3f7408d 100644 --- a/src/main/java/tconstruct/library/crafting/FluidType.java +++ b/src/main/java/tconstruct/library/crafting/FluidType.java @@ -16,43 +16,43 @@ public enum FluidType /** Gold Smelting **/ Gold(Blocks.gold_block, 0, 400, TinkerSmeltery.moltenGoldFluid, false), /** Tin Smelting **/ - Tin(TinkerSmeltery.metalBlock, 5, 400, TinkerSmeltery.moltenTinFluid, false), + Tin(TinkerWorld.metalBlock, 5, 400, TinkerSmeltery.moltenTinFluid, false), /** Copper Smelting **/ - Copper(TinkerSmeltery.metalBlock, 3, 550, TinkerSmeltery.moltenCopperFluid, true), + Copper(TinkerWorld.metalBlock, 3, 550, TinkerSmeltery.moltenCopperFluid, true), /** Aluminum Smelting **/ - Aluminum(TinkerSmeltery.metalBlock, 6, 350, TinkerSmeltery.moltenAluminumFluid, false), + Aluminum(TinkerWorld.metalBlock, 6, 350, TinkerSmeltery.moltenAluminumFluid, false), /** Natural Aluminum Smelting **/ NaturalAluminum(TinkerWorld.oreSlag, 6, 350, TinkerSmeltery.moltenAluminumFluid, false), /** Cobalt Smelting **/ - Cobalt(TinkerSmeltery.metalBlock, 0, 650, TinkerSmeltery.moltenCobaltFluid, true), + Cobalt(TinkerWorld.metalBlock, 0, 650, TinkerSmeltery.moltenCobaltFluid, true), /** Ardite Smelting **/ - Ardite(TinkerSmeltery.metalBlock, 1, 650, TinkerSmeltery.moltenArditeFluid, true), + Ardite(TinkerWorld.metalBlock, 1, 650, TinkerSmeltery.moltenArditeFluid, true), /** AluminumBrass Smelting **/ - AluminumBrass(TinkerSmeltery.metalBlock, 7, 350, TinkerSmeltery.moltenAlubrassFluid, false), + AluminumBrass(TinkerWorld.metalBlock, 7, 350, TinkerSmeltery.moltenAlubrassFluid, false), /** Alumite Smelting **/ - Alumite(TinkerSmeltery.metalBlock, 8, 800, TinkerSmeltery.moltenAlumiteFluid, true), + Alumite(TinkerWorld.metalBlock, 8, 800, TinkerSmeltery.moltenAlumiteFluid, true), /** Manyullyn Smelting **/ - Manyullyn(TinkerSmeltery.metalBlock, 2, 750, TinkerSmeltery.moltenManyullynFluid, true), + Manyullyn(TinkerWorld.metalBlock, 2, 750, TinkerSmeltery.moltenManyullynFluid, true), /** Bronze Smelting **/ - Bronze(TinkerSmeltery.metalBlock, 4, 500, TinkerSmeltery.moltenBronzeFluid, true), + Bronze(TinkerWorld.metalBlock, 4, 500, TinkerSmeltery.moltenBronzeFluid, true), /** Steel Smelting **/ - Steel(TinkerSmeltery.metalBlock, 9, 700, TinkerSmeltery.moltenSteelFluid, true), + Steel(TinkerWorld.metalBlock, 9, 700, TinkerSmeltery.moltenSteelFluid, true), /** Nickel Smelting **/ - Nickel(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenNickelFluid, false), + Nickel(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenNickelFluid, false), /** Lead Smelting **/ - Lead(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenLeadFluid, false), + Lead(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenLeadFluid, false), /** Silver Smelting **/ - Silver(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenSilverFluid, false), + Silver(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenSilverFluid, false), /** Platinum Smelting **/ - Platinum(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenShinyFluid, false), + Platinum(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenShinyFluid, false), /** Invar Smelting **/ - Invar(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenInvarFluid, false), + Invar(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenInvarFluid, false), /** Electrum Smelting **/ - Electrum(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenElectrumFluid, false), + Electrum(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenElectrumFluid, false), /** Obsidian Smelting **/ Obsidian(Blocks.obsidian, 0, 750, TinkerSmeltery.moltenObsidianFluid, true), /** Ender Smelting **/ - Ender(TinkerSmeltery.metalBlock, 10, 500, TinkerSmeltery.moltenEnderFluid, false), + Ender(TinkerWorld.metalBlock, 10, 500, TinkerSmeltery.moltenEnderFluid, false), /** Glass Smelting **/ Glass(Blocks.sand, 0, 625, TinkerSmeltery.moltenGlassFluid, false), /** Stone Smelting **/ diff --git a/src/main/java/tconstruct/mechworks/MechworksProxyClient.java b/src/main/java/tconstruct/mechworks/MechworksProxyClient.java index 6c14f839701..47766e169da 100644 --- a/src/main/java/tconstruct/mechworks/MechworksProxyClient.java +++ b/src/main/java/tconstruct/mechworks/MechworksProxyClient.java @@ -20,6 +20,7 @@ import tconstruct.client.gui.ToolForgeGui; import tconstruct.client.gui.ToolStationGui; import tconstruct.client.tabs.TabRegistry; +import tconstruct.common.TProxyCommon; import tconstruct.mechworks.inventory.ContainerLandmine; import tconstruct.mechworks.logic.TileEntityLandmine; import tconstruct.smeltery.SmelteryProxyCommon; @@ -38,6 +39,17 @@ public class MechworksProxyClient extends MechworksProxyCommon { + public MechworksProxyClient() + { + registerGuiHandler(); + } + + protected void registerGuiHandler() + { + super.registerGuiHandler(); + TProxyCommon.registerClientGuiHandler(landmineID, this); + } + @Override public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) { diff --git a/src/main/java/tconstruct/mechworks/MechworksProxyCommon.java b/src/main/java/tconstruct/mechworks/MechworksProxyCommon.java index 2a7ca28dedd..97f0844988c 100644 --- a/src/main/java/tconstruct/mechworks/MechworksProxyCommon.java +++ b/src/main/java/tconstruct/mechworks/MechworksProxyCommon.java @@ -1,16 +1,25 @@ package tconstruct.mechworks; -import tconstruct.mechworks.inventory.ContainerLandmine; -import tconstruct.mechworks.logic.TileEntityLandmine; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import tconstruct.common.TProxyCommon; +import tconstruct.mechworks.inventory.ContainerLandmine; +import tconstruct.mechworks.logic.TileEntityLandmine; import cpw.mods.fml.common.network.IGuiHandler; public class MechworksProxyCommon implements IGuiHandler { - + public MechworksProxyCommon() + { + registerGuiHandler(); + } // public static int drawbridgeID = 9; // Moved to TMechworks public static final int landmineID = 10; + + protected void registerGuiHandler() + { + TProxyCommon.registerServerGuiHandler(landmineID, this); + } @Override public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) diff --git a/src/main/java/tconstruct/mechworks/TinkerMechworks.java b/src/main/java/tconstruct/mechworks/TinkerMechworks.java index 81f5599fed2..41dfeb225f4 100644 --- a/src/main/java/tconstruct/mechworks/TinkerMechworks.java +++ b/src/main/java/tconstruct/mechworks/TinkerMechworks.java @@ -1,76 +1,41 @@ package tconstruct.mechworks; +import mantle.pulsar.pulse.IPulse; +import mantle.pulsar.pulse.Pulse; +import mantle.pulsar.pulse.PulseProxy; import net.minecraft.block.Block; -import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; -import tconstruct.armor.TinkerArmor; -import tconstruct.blocks.SlabBase; -import tconstruct.blocks.logic.DryingRackLogic; -import tconstruct.blocks.slime.SlimeFluid; -import tconstruct.blocks.slime.SlimeGel; -import tconstruct.blocks.slime.SlimeGrass; -import tconstruct.blocks.slime.SlimeLeaves; -import tconstruct.blocks.slime.SlimeSapling; -import tconstruct.blocks.slime.SlimeTallGrass; -import tconstruct.blocks.traps.BarricadeBlock; -import tconstruct.blocks.traps.Punji; -import tconstruct.client.StepSoundSlime; -import tconstruct.common.itemblocks.MetadataItemBlock; -import tconstruct.library.TConstructRegistry; +import net.minecraftforge.oredict.ShapedOreRecipe; +import tconstruct.TConstruct; +import tconstruct.armor.ArmorProxyCommon; import tconstruct.mechworks.blocks.BlockLandmine; +import tconstruct.mechworks.entity.item.EntityLandmineFirework; +import tconstruct.mechworks.entity.item.ExplosivePrimed; import tconstruct.mechworks.itemblocks.ItemBlockLandmine; import tconstruct.mechworks.logic.TileEntityLandmine; -import tconstruct.smeltery.TinkerSmeltery; -import tconstruct.smeltery.blocks.MetalOre; import tconstruct.tools.TinkerTools; -import tconstruct.tools.blocks.MultiBrick; -import tconstruct.tools.blocks.MultiBrickFancy; -import tconstruct.tools.itemblocks.MultiBrickFancyItem; -import tconstruct.tools.itemblocks.MultiBrickItem; -import tconstruct.world.blocks.ConveyorBase; -import tconstruct.world.blocks.GravelOre; -import tconstruct.world.blocks.MeatBlock; -import tconstruct.world.blocks.OreberryBush; -import tconstruct.world.blocks.OreberryBushEssence; -import tconstruct.world.blocks.SlimeExplosive; -import tconstruct.world.blocks.SlimePad; -import tconstruct.world.blocks.StoneLadder; -import tconstruct.world.blocks.StoneTorch; -import tconstruct.world.blocks.WoodRail; -import tconstruct.world.itemblocks.BarricadeItem; -import tconstruct.world.itemblocks.GravelOreItem; -import tconstruct.world.itemblocks.HamboneItemBlock; -import tconstruct.world.itemblocks.MetalOreItemBlock; -import tconstruct.world.itemblocks.OreberryBushItem; -import tconstruct.world.itemblocks.OreberryBushSecondItem; -import tconstruct.world.itemblocks.SlimeGelItemBlock; -import tconstruct.world.itemblocks.SlimeGrassItemBlock; -import tconstruct.world.itemblocks.SlimeLeavesItemBlock; -import tconstruct.world.itemblocks.SlimeSaplingItemBlock; -import tconstruct.world.itemblocks.SlimeTallGrassItem; -import tconstruct.world.itemblocks.WoolSlab1Item; -import tconstruct.world.itemblocks.WoolSlab2Item; -import tconstruct.world.items.OreBerries; -import tconstruct.world.items.StrangeFood; -import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; -@Mod(modid = "TinkerMechworks", name = "TinkerMechworks", version = "${tinkermechworksversion}") -public class TinkerMechworks +@ObjectHolder(TConstruct.modID) +@Pulse(id = TConstruct.modID) +public class TinkerMechworks implements IPulse //TODO: Remove IPulse implementation, keep annotation { - + @PulseProxy(client = "tconstruct.mechworks.MechworksProxyClient", server = "tconstruct.mechworks.MechworksProxyCommon") + public static MechworksProxyCommon proxy; + public TinkerMechworks() + { + NetworkRegistry.INSTANCE.registerGuiHandler(TConstruct.instance, proxy); + } // Traps public static Block landmine; @@ -81,8 +46,21 @@ public void preInit (FMLPreInitializationEvent event) TinkerMechworks.landmine = new BlockLandmine().setHardness(0.5F).setResistance(0F).setStepSound(Block.soundTypeMetal).setCreativeTab(CreativeTabs.tabRedstone).setBlockName("landmine"); GameRegistry.registerBlock(TinkerMechworks.landmine, ItemBlockLandmine.class, "Redstone.Landmine"); GameRegistry.registerTileEntity(TileEntityLandmine.class, "Landmine"); + + // Landmine Recipes + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 0), "mcm", "rpr", 'm', "plankWood", 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r', + Items.redstone, 'p', Blocks.stone_pressure_plate)); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 1), "mcm", "rpr", 'm', Blocks.stone, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r', + Items.redstone, 'p', Blocks.stone_pressure_plate)); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 2), "mcm", "rpr", 'm', Blocks.obsidian, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r', + Items.redstone, 'p', Blocks.stone_pressure_plate)); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 3), "mcm", "rpr", 'm', Items.repeater, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r', + Items.redstone, 'p', Blocks.stone_pressure_plate)); + + EntityRegistry.registerModEntity(EntityLandmineFirework.class, "LandmineFirework", 5, TConstruct.instance, 32, 5, true); + EntityRegistry.registerModEntity(ExplosivePrimed.class, "SlimeExplosive", 6, TConstruct.instance, 32, 5, true); } - + @EventHandler public void init (FMLInitializationEvent event) { @@ -91,6 +69,6 @@ public void init (FMLInitializationEvent event) @EventHandler public void postInit (FMLPostInitializationEvent evt) { - + } } diff --git a/src/main/java/tconstruct/smeltery/SmelteryProxyClient.java b/src/main/java/tconstruct/smeltery/SmelteryProxyClient.java index 73816fc643e..3f206a0e3b0 100644 --- a/src/main/java/tconstruct/smeltery/SmelteryProxyClient.java +++ b/src/main/java/tconstruct/smeltery/SmelteryProxyClient.java @@ -9,6 +9,7 @@ import net.minecraftforge.common.MinecraftForge; import tconstruct.client.gui.AdaptiveSmelteryGui; import tconstruct.client.gui.SmelteryGui; +import tconstruct.common.TProxyCommon; import tconstruct.smeltery.logic.AdaptiveSmelteryLogic; import tconstruct.smeltery.logic.SmelteryLogic; import tconstruct.util.config.PHConstruct; @@ -18,8 +19,16 @@ public class SmelteryProxyClient extends SmelteryProxyCommon public SmelteryProxyClient() { MinecraftForge.EVENT_BUS.register(this); + registerGuiHandler(); } + @Override + protected void registerGuiHandler() + { + super.registerGuiHandler(); + TProxyCommon.registerClientGuiHandler(smelteryGuiID, this); + } + @Override public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) { @@ -32,11 +41,11 @@ public Object getClientGuiElement (int ID, EntityPlayer player, World world, int } return null; } - + /* Liquids */ - IIcon[] stillIcons = new IIcon[2]; - IIcon[] flowIcons = new IIcon[2]; + IIcon[] stillIcons = new IIcon[1]; + IIcon[] flowIcons = new IIcon[1]; @SubscribeEvent public void preStitch (TextureStitchEvent.Pre event) diff --git a/src/main/java/tconstruct/smeltery/SmelteryProxyCommon.java b/src/main/java/tconstruct/smeltery/SmelteryProxyCommon.java index 52b780ebe95..8615879d783 100644 --- a/src/main/java/tconstruct/smeltery/SmelteryProxyCommon.java +++ b/src/main/java/tconstruct/smeltery/SmelteryProxyCommon.java @@ -1,14 +1,26 @@ package tconstruct.smeltery; +import tconstruct.common.TProxyCommon; import mantle.blocks.abstracts.InventoryLogic; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.network.IGuiHandler; public class SmelteryProxyCommon implements IGuiHandler { public static final int smelteryGuiID = 7; + + public SmelteryProxyCommon() + { + registerGuiHandler(); + } + + protected void registerGuiHandler() + { + TProxyCommon.registerServerGuiHandler(smelteryGuiID, this); + } @Override public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) diff --git a/src/main/java/tconstruct/smeltery/TinkerSmeltery.java b/src/main/java/tconstruct/smeltery/TinkerSmeltery.java index b44830c9af1..1bcaf2e8b1b 100644 --- a/src/main/java/tconstruct/smeltery/TinkerSmeltery.java +++ b/src/main/java/tconstruct/smeltery/TinkerSmeltery.java @@ -6,6 +6,9 @@ import mantle.blocks.BlockUtils; import mantle.blocks.abstracts.MultiServantLogic; +import mantle.pulsar.pulse.IPulse; +import mantle.pulsar.pulse.Pulse; +import mantle.pulsar.pulse.PulseProxy; import net.minecraft.block.Block; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; @@ -31,6 +34,7 @@ import tconstruct.library.crafting.Smeltery; import tconstruct.library.util.IPattern; import tconstruct.smeltery.blocks.BloodBlock; +import tconstruct.smeltery.blocks.CastingChannelBlock; import tconstruct.smeltery.blocks.GlassBlockConnected; import tconstruct.smeltery.blocks.GlassBlockConnectedMeta; import tconstruct.smeltery.blocks.GlassPaneConnected; @@ -49,7 +53,6 @@ import tconstruct.smeltery.itemblocks.GlassBlockItem; import tconstruct.smeltery.itemblocks.GlassPaneItem; import tconstruct.smeltery.itemblocks.LavaTankItemBlock; -import tconstruct.smeltery.itemblocks.MetalItemBlock; import tconstruct.smeltery.itemblocks.SearedSlabItem; import tconstruct.smeltery.itemblocks.SearedTableItemBlock; import tconstruct.smeltery.itemblocks.SmelteryItemBlock; @@ -72,23 +75,23 @@ import tconstruct.tools.TinkerTools; import tconstruct.util.config.PHConstruct; import tconstruct.world.TinkerWorld; -import tconstruct.world.blocks.CastingChannelBlock; -import tconstruct.world.blocks.TMetalBlock; -import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; -@Mod(modid = "TinkerSmeltery", name = "TinkerSmeltery", version = "${tinkersmelteryversion}") -public class TinkerSmeltery +@ObjectHolder(TConstruct.modID) +@Pulse(id = TConstruct.modID) +public class TinkerSmeltery implements IPulse //TODO: Remove IPulse implementation, keep annotation { @Instance("TinkerSmeltery") public static TinkerSmeltery instance; - @SidedProxy(clientSide = "tconstruct.smeltery.SmelteryProxyClient", serverSide = "tconstruct.smeltery.SmelteryProxyCommon") + @PulseProxy(client = "tconstruct.smeltery.SmelteryProxyClient", server = "tconstruct.smeltery.SmelteryProxyCommon") public static SmelteryProxyCommon proxy; public static Item metalPattern; @@ -98,7 +101,6 @@ public class TinkerSmeltery public static Block lavaTank; public static Block searedBlock; public static Block castingChannel; - public static Block metalBlock; public static Block tankAir; public static Block smelteryNether; public static Block lavaTankNether; @@ -166,15 +168,15 @@ public class TinkerSmeltery // Glue public static Fluid glueFluid; public static Block glueFluidBlock; - public static Fluid[] fluids = new Fluid[27]; - public static Block[] fluidBlocks = new Block[26]; + public static Fluid[] fluids = new Fluid[26]; + public static Block[] fluidBlocks = new Block[25]; public static FluidStack[] liquids; public static Block speedSlab; // InfiBlocks public static Block speedBlock; public static Fluid bloodFluid; public static Block blood; - + public TinkerSmeltery() { MinecraftForge.EVENT_BUS.register(new TinkerSmelteryEvents()); @@ -184,6 +186,8 @@ public TinkerSmeltery() public void preInit (FMLPreInitializationEvent event) { + TinkerSmeltery.buckets = new FilledBucket(BlockUtils.getBlockFromItem(TinkerSmeltery.buckets)); + GameRegistry.registerItem(TinkerSmeltery.buckets, "buckets"); TinkerSmeltery.searedSlab = new SearedSlab().setBlockName("SearedSlab"); TinkerSmeltery.searedSlab.stepSound = Block.soundTypeStone; @@ -191,9 +195,6 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.speedSlab = new SpeedSlab().setBlockName("SpeedSlab"); TinkerSmeltery.speedSlab.stepSound = Block.soundTypeStone; - TinkerSmeltery.metalBlock = new TMetalBlock(Material.iron, 10.0F).setBlockName("tconstruct.metalblock"); - TinkerSmeltery.metalBlock.stepSound = Block.soundTypeMetal; - TinkerSmeltery.glueBlock = new GlueBlock().setBlockName("GlueBlock").setCreativeTab(TConstructRegistry.blockTab); // Smeltery @@ -219,7 +220,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenIron = new TConstructFluid(TinkerSmeltery.moltenIronFluid, Material.lava, "liquid_iron").setBlockName("fluid.molten.iron"); GameRegistry.registerBlock(TinkerSmeltery.moltenIron, "fluid.molten.iron"); TinkerSmeltery.moltenIronFluid.setBlock(TinkerSmeltery.moltenIron).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenIronFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 0), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenIronFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 0), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenGoldFluid = new Fluid("gold.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenGoldFluid)) @@ -227,7 +229,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenGold = new TConstructFluid(TinkerSmeltery.moltenGoldFluid, Material.lava, "liquid_gold").setBlockName("fluid.molten.gold"); GameRegistry.registerBlock(TinkerSmeltery.moltenGold, "fluid.molten.gold"); TinkerSmeltery.moltenGoldFluid.setBlock(TinkerSmeltery.moltenGold).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenGoldFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 1), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenGoldFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 1), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenCopperFluid = new Fluid("copper.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenCopperFluid)) @@ -235,7 +238,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenCopper = new TConstructFluid(TinkerSmeltery.moltenCopperFluid, Material.lava, "liquid_copper").setBlockName("fluid.molten.copper"); GameRegistry.registerBlock(TinkerSmeltery.moltenCopper, "fluid.molten.copper"); TinkerSmeltery.moltenCopperFluid.setBlock(TinkerSmeltery.moltenCopper).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenCopperFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 2), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenCopperFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 2), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenTinFluid = new Fluid("tin.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenTinFluid)) @@ -243,7 +247,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenTin = new TConstructFluid(TinkerSmeltery.moltenTinFluid, Material.lava, "liquid_tin").setBlockName("fluid.molten.tin"); GameRegistry.registerBlock(TinkerSmeltery.moltenTin, "fluid.molten.tin"); TinkerSmeltery.moltenTinFluid.setBlock(TinkerSmeltery.moltenTin).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenTinFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 3), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenTinFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 3), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenAluminumFluid = new Fluid("aluminum.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenAluminumFluid)) @@ -251,7 +256,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenAluminum = new TConstructFluid(TinkerSmeltery.moltenAluminumFluid, Material.lava, "liquid_aluminum").setBlockName("fluid.molten.aluminum"); GameRegistry.registerBlock(TinkerSmeltery.moltenAluminum, "fluid.molten.aluminum"); TinkerSmeltery.moltenAluminumFluid.setBlock(TinkerSmeltery.moltenAluminum).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAluminumFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 4), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAluminumFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 4), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenCobaltFluid = new Fluid("cobalt.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenCobaltFluid)) @@ -259,7 +265,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenCobalt = new TConstructFluid(TinkerSmeltery.moltenCobaltFluid, Material.lava, "liquid_cobalt").setBlockName("fluid.molten.cobalt"); GameRegistry.registerBlock(TinkerSmeltery.moltenCobalt, "fluid.molten.cobalt"); TinkerSmeltery.moltenCobaltFluid.setBlock(TinkerSmeltery.moltenCobalt).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenCobaltFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 5), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenCobaltFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 5), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenArditeFluid = new Fluid("ardite.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenArditeFluid)) @@ -267,7 +274,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenArdite = new TConstructFluid(TinkerSmeltery.moltenArditeFluid, Material.lava, "liquid_ardite").setBlockName("fluid.molten.ardite"); GameRegistry.registerBlock(TinkerSmeltery.moltenArdite, "fluid.molten.ardite"); TinkerSmeltery.moltenArditeFluid.setBlock(TinkerSmeltery.moltenArdite).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenArditeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 6), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenArditeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 6), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenBronzeFluid = new Fluid("bronze.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenBronzeFluid)) @@ -275,7 +283,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenBronze = new TConstructFluid(TinkerSmeltery.moltenBronzeFluid, Material.lava, "liquid_bronze").setBlockName("fluid.molten.bronze"); GameRegistry.registerBlock(TinkerSmeltery.moltenBronze, "fluid.molten.bronze"); TinkerSmeltery.moltenBronzeFluid.setBlock(TinkerSmeltery.moltenBronze).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenBronzeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 7), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenBronzeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 7), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenAlubrassFluid = new Fluid("aluminumbrass.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenAlubrassFluid)) @@ -283,7 +292,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenAlubrass = new TConstructFluid(TinkerSmeltery.moltenAlubrassFluid, Material.lava, "liquid_alubrass").setBlockName("fluid.molten.alubrass"); GameRegistry.registerBlock(TinkerSmeltery.moltenAlubrass, "fluid.molten.alubrass"); TinkerSmeltery.moltenAlubrassFluid.setBlock(TinkerSmeltery.moltenAlubrass).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAlubrassFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 8), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAlubrassFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 8), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenManyullynFluid = new Fluid("manyullyn.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenManyullynFluid)) @@ -291,7 +301,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenManyullyn = new TConstructFluid(TinkerSmeltery.moltenManyullynFluid, Material.lava, "liquid_manyullyn").setBlockName("fluid.molten.manyullyn"); GameRegistry.registerBlock(TinkerSmeltery.moltenManyullyn, "fluid.molten.manyullyn"); TinkerSmeltery.moltenManyullynFluid.setBlock(TinkerSmeltery.moltenManyullyn).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenManyullynFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 9), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenManyullynFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 9), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenAlumiteFluid = new Fluid("alumite.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenAlumiteFluid)) @@ -299,7 +310,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenAlumite = new TConstructFluid(TinkerSmeltery.moltenAlumiteFluid, Material.lava, "liquid_alumite").setBlockName("fluid.molten.alumite"); GameRegistry.registerBlock(TinkerSmeltery.moltenAlumite, "fluid.molten.alumite"); TinkerSmeltery.moltenAlumiteFluid.setBlock(TinkerSmeltery.moltenAlumite).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAlumiteFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 10), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAlumiteFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 10), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenObsidianFluid = new Fluid("obsidian.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenObsidianFluid)) @@ -307,7 +319,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenObsidian = new TConstructFluid(TinkerSmeltery.moltenObsidianFluid, Material.lava, "liquid_obsidian").setBlockName("fluid.molten.obsidian"); GameRegistry.registerBlock(TinkerSmeltery.moltenObsidian, "fluid.molten.obsidian"); TinkerSmeltery.moltenObsidianFluid.setBlock(TinkerSmeltery.moltenObsidian).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenObsidianFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 11), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenObsidianFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 11), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenSteelFluid = new Fluid("steel.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenSteelFluid)) @@ -315,7 +328,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenSteel = new TConstructFluid(TinkerSmeltery.moltenSteelFluid, Material.lava, "liquid_steel").setBlockName("fluid.molten.steel"); GameRegistry.registerBlock(TinkerSmeltery.moltenSteel, "fluid.molten.steel"); TinkerSmeltery.moltenSteelFluid.setBlock(TinkerSmeltery.moltenSteel).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenSteelFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 12), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenSteelFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 12), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenGlassFluid = new Fluid("glass.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenGlassFluid)) @@ -323,7 +337,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenGlass = new TConstructFluid(TinkerSmeltery.moltenGlassFluid, Material.lava, "liquid_glass", true).setBlockName("fluid.molten.glass"); GameRegistry.registerBlock(TinkerSmeltery.moltenGlass, "fluid.molten.glass"); TinkerSmeltery.moltenGlassFluid.setBlock(TinkerSmeltery.moltenGlass).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenGlassFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 13), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenGlassFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 13), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenStoneFluid = new Fluid("stone.seared"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenStoneFluid)) @@ -331,7 +346,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenStone = new TConstructFluid(TinkerSmeltery.moltenStoneFluid, Material.lava, "liquid_stone").setBlockName("molten.stone"); GameRegistry.registerBlock(TinkerSmeltery.moltenStone, "molten.stone"); TinkerSmeltery.moltenStoneFluid.setBlock(TinkerSmeltery.moltenStone).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenStoneFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 14), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenStoneFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 14), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenEmeraldFluid = new Fluid("emerald.liquid"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenEmeraldFluid)) @@ -339,7 +355,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenEmerald = new TConstructFluid(TinkerSmeltery.moltenEmeraldFluid, Material.water, "liquid_villager").setBlockName("molten.emerald"); GameRegistry.registerBlock(TinkerSmeltery.moltenEmerald, "molten.emerald"); TinkerSmeltery.moltenEmeraldFluid.setBlock(TinkerSmeltery.moltenEmerald).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenEmeraldFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 15), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenEmeraldFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 15), new ItemStack( + Items.bucket))); TinkerSmeltery.bloodFluid = new Fluid("blood"); if (!FluidRegistry.registerFluid(TinkerSmeltery.bloodFluid)) @@ -347,7 +364,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.blood = new BloodBlock(TinkerSmeltery.bloodFluid, Material.water, "liquid_cow").setBlockName("liquid.blood"); GameRegistry.registerBlock(TinkerSmeltery.blood, "liquid.blood"); TinkerSmeltery.bloodFluid.setBlock(TinkerSmeltery.blood).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.bloodFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 16), new ItemStack(Items.bucket))); + FluidContainerRegistry + .registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.bloodFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 16), new ItemStack(Items.bucket))); TinkerSmeltery.moltenNickelFluid = new Fluid("nickel.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenNickelFluid)) @@ -355,7 +373,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenNickel = new TConstructFluid(TinkerSmeltery.moltenNickelFluid, Material.lava, "liquid_ferrous").setBlockName("fluid.molten.nickel"); GameRegistry.registerBlock(TinkerSmeltery.moltenNickel, "fluid.molten.nickel"); TinkerSmeltery.moltenNickelFluid.setBlock(TinkerSmeltery.moltenNickel).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenNickelFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 17), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenNickelFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 17), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenLeadFluid = new Fluid("lead.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenLeadFluid)) @@ -363,7 +382,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenLead = new TConstructFluid(TinkerSmeltery.moltenLeadFluid, Material.lava, "liquid_lead").setBlockName("fluid.molten.lead"); GameRegistry.registerBlock(TinkerSmeltery.moltenLead, "fluid.molten.lead"); TinkerSmeltery.moltenLeadFluid.setBlock(TinkerSmeltery.moltenLead).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenLeadFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 18), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenLeadFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 18), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenSilverFluid = new Fluid("silver.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenSilverFluid)) @@ -371,7 +391,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenSilver = new TConstructFluid(TinkerSmeltery.moltenSilverFluid, Material.lava, "liquid_silver").setBlockName("fluid.molten.silver"); GameRegistry.registerBlock(TinkerSmeltery.moltenSilver, "fluid.molten.silver"); TinkerSmeltery.moltenSilverFluid.setBlock(TinkerSmeltery.moltenSilver).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenSilverFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 19), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenSilverFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 19), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenShinyFluid = new Fluid("platinum.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenShinyFluid)) @@ -379,7 +400,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenShiny = new TConstructFluid(TinkerSmeltery.moltenShinyFluid, Material.lava, "liquid_shiny").setBlockName("fluid.molten.shiny"); GameRegistry.registerBlock(TinkerSmeltery.moltenShiny, "fluid.molten.shiny"); TinkerSmeltery.moltenShinyFluid.setBlock(TinkerSmeltery.moltenShiny).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenShinyFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 20), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenShinyFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 20), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenInvarFluid = new Fluid("invar.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenInvarFluid)) @@ -387,7 +409,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenInvar = new TConstructFluid(TinkerSmeltery.moltenInvarFluid, Material.lava, "liquid_invar").setBlockName("fluid.molten.invar"); GameRegistry.registerBlock(TinkerSmeltery.moltenInvar, "fluid.molten.invar"); TinkerSmeltery.moltenInvarFluid.setBlock(TinkerSmeltery.moltenInvar).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenInvarFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 21), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenInvarFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 21), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenElectrumFluid = new Fluid("electrum.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenElectrumFluid)) @@ -395,7 +418,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenElectrum = new TConstructFluid(TinkerSmeltery.moltenElectrumFluid, Material.lava, "liquid_electrum").setBlockName("fluid.molten.electrum"); GameRegistry.registerBlock(TinkerSmeltery.moltenElectrum, "fluid.molten.electrum"); TinkerSmeltery.moltenElectrumFluid.setBlock(TinkerSmeltery.moltenElectrum).setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenElectrumFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 22), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenElectrumFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 22), new ItemStack( + Items.bucket))); TinkerSmeltery.moltenEnderFluid = new Fluid("ender"); if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenEnderFluid)) @@ -410,33 +434,39 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.moltenEnder = new TConstructFluid(TinkerSmeltery.moltenEnderFluid, Material.water, "liquid_ender").setBlockName("fluid.ender"); GameRegistry.registerBlock(TinkerSmeltery.moltenEnder, "fluid.ender"); TinkerSmeltery.moltenEnderFluid.setBlock(TinkerSmeltery.moltenEnder).setDensity(3000).setViscosity(6000); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 23), new ItemStack(Items.bucket))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 23), new ItemStack( + Items.bucket))); } - // Glue TinkerSmeltery.glueFluid = new Fluid("glue").setDensity(6000).setViscosity(6000).setTemperature(200); if (!FluidRegistry.registerFluid(TinkerSmeltery.glueFluid)) TinkerSmeltery.glueFluid = FluidRegistry.getFluid("glue"); - TinkerSmeltery.glueFluidBlock = new GlueFluid(TinkerSmeltery.glueFluid, Material.water).setCreativeTab(TConstructRegistry.blockTab).setStepSound(TinkerWorld.slimeStep).setBlockName("liquid.glue"); + TinkerSmeltery.glueFluidBlock = new GlueFluid(TinkerSmeltery.glueFluid, Material.water).setCreativeTab(TConstructRegistry.blockTab).setStepSound(TinkerWorld.slimeStep) + .setBlockName("liquid.glue"); GameRegistry.registerBlock(TinkerSmeltery.glueFluidBlock, "liquid.glue"); TinkerSmeltery.glueFluid.setBlock(TinkerSmeltery.glueFluidBlock); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.glueFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 25), new ItemStack(Items.bucket))); + FluidContainerRegistry + .registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.glueFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 25), new ItemStack(Items.bucket))); TinkerSmeltery.pigIronFluid = new Fluid("pigiron.molten"); if (!FluidRegistry.registerFluid(TinkerSmeltery.pigIronFluid)) TinkerSmeltery.pigIronFluid = FluidRegistry.getFluid("pigiron.molten"); else TinkerSmeltery.pigIronFluid.setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.pigIronFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 26), new ItemStack(Items.bucket))); - TinkerSmeltery.fluids = new Fluid[] { TinkerSmeltery.moltenIronFluid, TinkerSmeltery.moltenGoldFluid, TinkerSmeltery.moltenCopperFluid, TinkerSmeltery.moltenTinFluid, TinkerSmeltery.moltenAluminumFluid, TinkerSmeltery.moltenCobaltFluid, - TinkerSmeltery.moltenArditeFluid, TinkerSmeltery.moltenBronzeFluid, TinkerSmeltery.moltenAlubrassFluid, TinkerSmeltery.moltenManyullynFluid, TinkerSmeltery.moltenAlumiteFluid, TinkerSmeltery.moltenObsidianFluid, TinkerSmeltery.moltenSteelFluid, - TinkerSmeltery.moltenGlassFluid, TinkerSmeltery.moltenStoneFluid, TinkerSmeltery.moltenEmeraldFluid, TinkerSmeltery.bloodFluid, TinkerSmeltery.moltenNickelFluid, TinkerSmeltery.moltenLeadFluid, TinkerSmeltery.moltenSilverFluid, - TinkerSmeltery.moltenShinyFluid, TinkerSmeltery.moltenInvarFluid, TinkerSmeltery.moltenElectrumFluid, TinkerSmeltery.moltenEnderFluid, TinkerWorld.blueSlimeFluid, TinkerSmeltery.glueFluid, TinkerSmeltery.pigIronFluid }; - TinkerSmeltery.fluidBlocks = new Block[] { TinkerSmeltery.moltenIron, TinkerSmeltery.moltenGold, TinkerSmeltery.moltenCopper, TinkerSmeltery.moltenTin, TinkerSmeltery.moltenAluminum, TinkerSmeltery.moltenCobalt, TinkerSmeltery.moltenArdite, TinkerSmeltery.moltenBronze, - TinkerSmeltery.moltenAlubrass, TinkerSmeltery.moltenManyullyn, TinkerSmeltery.moltenAlumite, TinkerSmeltery.moltenObsidian, TinkerSmeltery.moltenSteel, TinkerSmeltery.moltenGlass, TinkerSmeltery.moltenStone, TinkerSmeltery.moltenEmerald, TinkerSmeltery.blood, - TinkerSmeltery.moltenNickel, TinkerSmeltery.moltenLead, TinkerSmeltery.moltenSilver, TinkerSmeltery.moltenShiny, TinkerSmeltery.moltenInvar, TinkerSmeltery.moltenElectrum, TinkerSmeltery.moltenEnder, TinkerWorld.slimePool, TinkerSmeltery.glueFluidBlock }; - + FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.pigIronFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 26), new ItemStack( + Items.bucket))); + TinkerSmeltery.fluids = new Fluid[] { TinkerSmeltery.moltenIronFluid, TinkerSmeltery.moltenGoldFluid, TinkerSmeltery.moltenCopperFluid, TinkerSmeltery.moltenTinFluid, + TinkerSmeltery.moltenAluminumFluid, TinkerSmeltery.moltenCobaltFluid, TinkerSmeltery.moltenArditeFluid, TinkerSmeltery.moltenBronzeFluid, TinkerSmeltery.moltenAlubrassFluid, + TinkerSmeltery.moltenManyullynFluid, TinkerSmeltery.moltenAlumiteFluid, TinkerSmeltery.moltenObsidianFluid, TinkerSmeltery.moltenSteelFluid, TinkerSmeltery.moltenGlassFluid, + TinkerSmeltery.moltenStoneFluid, TinkerSmeltery.moltenEmeraldFluid, TinkerSmeltery.bloodFluid, TinkerSmeltery.moltenNickelFluid, TinkerSmeltery.moltenLeadFluid, + TinkerSmeltery.moltenSilverFluid, TinkerSmeltery.moltenShinyFluid, TinkerSmeltery.moltenInvarFluid, TinkerSmeltery.moltenElectrumFluid, TinkerSmeltery.moltenEnderFluid, + TinkerSmeltery.glueFluid, TinkerSmeltery.pigIronFluid }; + TinkerSmeltery.fluidBlocks = new Block[] { TinkerSmeltery.moltenIron, TinkerSmeltery.moltenGold, TinkerSmeltery.moltenCopper, TinkerSmeltery.moltenTin, TinkerSmeltery.moltenAluminum, + TinkerSmeltery.moltenCobalt, TinkerSmeltery.moltenArdite, TinkerSmeltery.moltenBronze, TinkerSmeltery.moltenAlubrass, TinkerSmeltery.moltenManyullyn, TinkerSmeltery.moltenAlumite, + TinkerSmeltery.moltenObsidian, TinkerSmeltery.moltenSteel, TinkerSmeltery.moltenGlass, TinkerSmeltery.moltenStone, TinkerSmeltery.moltenEmerald, TinkerSmeltery.blood, + TinkerSmeltery.moltenNickel, TinkerSmeltery.moltenLead, TinkerSmeltery.moltenSilver, TinkerSmeltery.moltenShiny, TinkerSmeltery.moltenInvar, TinkerSmeltery.moltenElectrum, + TinkerSmeltery.moltenEnder, TinkerSmeltery.glueFluidBlock }; TinkerSmeltery.speedBlock = new SpeedBlock().setBlockName("SpeedBlock"); @@ -444,19 +474,14 @@ public void preInit (FMLPreInitializationEvent event) TinkerSmeltery.clearGlass = new GlassBlockConnected("clear", false).setBlockName("GlassBlock"); TinkerSmeltery.clearGlass.stepSound = Block.soundTypeGlass; TinkerSmeltery.glassPane = new GlassPaneConnected("clear", false); - TinkerSmeltery.stainedGlassClear = new GlassBlockConnectedMeta("stained", true, "white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray", "light_gray", "cyan", "purple", "blue", - "brown", "green", "red", "black").setBlockName("GlassBlock.StainedClear"); + TinkerSmeltery.stainedGlassClear = new GlassBlockConnectedMeta("stained", true, "white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray", "light_gray", "cyan", "purple", + "blue", "brown", "green", "red", "black").setBlockName("GlassBlock.StainedClear"); TinkerSmeltery.stainedGlassClear.stepSound = Block.soundTypeGlass; TinkerSmeltery.stainedGlassClearPane = new GlassPaneStained(); GameRegistry.registerBlock(TinkerSmeltery.searedSlab, SearedSlabItem.class, "SearedSlab"); GameRegistry.registerBlock(TinkerSmeltery.speedSlab, SpeedSlabItem.class, "SpeedSlab"); - GameRegistry.registerBlock(TinkerSmeltery.metalBlock, MetalItemBlock.class, "MetalBlock"); - - OreDictionary.registerOre("hambone", new ItemStack(TinkerWorld.meatBlock)); - GameRegistry.addRecipe(new ItemStack(TinkerWorld.meatBlock), "mmm", "mbm", "mmm", 'b', new ItemStack(Items.bone), 'm', new ItemStack(Items.porkchop)); - GameRegistry.registerBlock(TinkerSmeltery.glueBlock, "GlueBlock"); OreDictionary.registerOre("blockRubber", new ItemStack(TinkerSmeltery.glueBlock)); @@ -497,7 +522,7 @@ public void preInit (FMLPreInitializationEvent event) GameRegistry.registerBlock(TinkerSmeltery.glassPane, GlassPaneItem.class, "GlassPane"); GameRegistry.registerBlock(TinkerSmeltery.stainedGlassClear, StainedGlassClearItem.class, "GlassBlock.StainedClear"); GameRegistry.registerBlock(TinkerSmeltery.stainedGlassClearPane, StainedGlassClearPaneItem.class, "GlassPaneClearStained"); - + //Items TinkerSmeltery.metalPattern = new MetalPattern("cast_", "materials/").setUnlocalizedName("tconstruct.MetalPattern"); GameRegistry.registerItem(TinkerSmeltery.metalPattern, "metalPattern"); @@ -508,14 +533,12 @@ public void preInit (FMLPreInitializationEvent event) { TConstructRegistry.addItemStackToDirectory(patternTypes[i] + "Cast", new ItemStack(TinkerSmeltery.metalPattern, 1, i)); } - TinkerSmeltery.buckets = new FilledBucket(BlockUtils.getBlockFromItem(TinkerSmeltery.buckets)); - GameRegistry.registerItem(TinkerSmeltery.buckets, "buckets"); } - + @EventHandler public void init (FMLInitializationEvent event) { - + } @EventHandler @@ -525,13 +548,12 @@ public void postInit (FMLPostInitializationEvent evt) addOreDictionarySmelteryRecipes(); addRecipesForTableCasting(); } - - private void craftingTableRecipes() + + private void craftingTableRecipes () { String[] patSurround = { "###", "#m#", "###" }; - // stained Glass Recipes String[] dyeTypes = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime", "dyeYellow", "dyeLightBlue", "dyeMagenta", "dyeOrange", "dyeWhite" }; @@ -550,8 +572,6 @@ private void craftingTableRecipes() Short.MAX_VALUE))); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkerSmeltery.stainedGlassClearPane, 1, i), color, new ItemStack(TinkerSmeltery.stainedGlassClearPane, 1, Short.MAX_VALUE))); } - - // Glass Recipes GameRegistry.addRecipe(new ItemStack(Items.glass_bottle, 3), new Object[] { "# #", " # ", '#', TinkerSmeltery.clearGlass }); @@ -583,7 +603,6 @@ private void craftingTableRecipes() GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.searedBlockNether, 1, 1), "b b", " b ", 'b', searedBrick); // Faucet GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.searedBlockNether, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); // Basin GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); // Channel - // Slab Smeltery Components Recipes for (int i = 0; i < 7; i++) @@ -670,7 +689,7 @@ public void addOreDictionarySmelteryRecipes () } Smeltery.addDictionaryMelting("compressedSand1x", FluidType.Glass, 175, FluidContainerRegistry.BUCKET_VOLUME * 9); } - + private void addRecipesForTableCasting () { /* Smeltery */ @@ -694,19 +713,20 @@ private void addRecipesForTableCasting () // Buckets ItemStack bucket = new ItemStack(Items.bucket); - for (int sc = 0; sc < 24; sc++) + for (int sc = 0; sc < 23; sc++) { tableCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.buckets, 1, sc), new FluidStack(TinkerSmeltery.fluids[sc], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10); } - tableCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.buckets, 1, 26), new FluidStack(TinkerSmeltery.fluids[26], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10); + tableCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.buckets, 1, 25), new FluidStack(TinkerSmeltery.fluids[25], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10); // Clear glass pane casting tableCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.glassPane), new FluidStack(TinkerSmeltery.moltenGlassFluid, 250), null, 80); // Metal toolpart casting - TinkerSmeltery.liquids = new FluidStack[] { new FluidStack(TinkerSmeltery.moltenIronFluid, 1), new FluidStack(TinkerSmeltery.moltenCopperFluid, 1), new FluidStack(TinkerSmeltery.moltenCobaltFluid, 1), - new FluidStack(TinkerSmeltery.moltenArditeFluid, 1), new FluidStack(TinkerSmeltery.moltenManyullynFluid, 1), new FluidStack(TinkerSmeltery.moltenBronzeFluid, 1), new FluidStack(TinkerSmeltery.moltenAlumiteFluid, 1), - new FluidStack(TinkerSmeltery.moltenObsidianFluid, 1), new FluidStack(TinkerSmeltery.moltenSteelFluid, 1), new FluidStack(TinkerSmeltery.pigIronFluid, 1) }; + TinkerSmeltery.liquids = new FluidStack[] { new FluidStack(TinkerSmeltery.moltenIronFluid, 1), new FluidStack(TinkerSmeltery.moltenCopperFluid, 1), + new FluidStack(TinkerSmeltery.moltenCobaltFluid, 1), new FluidStack(TinkerSmeltery.moltenArditeFluid, 1), new FluidStack(TinkerSmeltery.moltenManyullynFluid, 1), + new FluidStack(TinkerSmeltery.moltenBronzeFluid, 1), new FluidStack(TinkerSmeltery.moltenAlumiteFluid, 1), new FluidStack(TinkerSmeltery.moltenObsidianFluid, 1), + new FluidStack(TinkerSmeltery.moltenSteelFluid, 1), new FluidStack(TinkerSmeltery.pigIronFluid, 1) }; int[] liquidDamage = new int[] { 2, 13, 10, 11, 12, 14, 15, 6, 16, 18 }; // ItemStack // damage // value @@ -719,8 +739,10 @@ private void addRecipesForTableCasting () { ItemStack cast = new ItemStack(TinkerSmeltery.metalPattern, 1, iter + 1); - tableCasting.addCastingRecipe(cast, new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(TinkerTools.patternOutputs[iter], 1, Short.MAX_VALUE), false, 50); - tableCasting.addCastingRecipe(cast, new FluidStack(TinkerSmeltery.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(TinkerTools.patternOutputs[iter], 1, Short.MAX_VALUE), false, 50); + tableCasting.addCastingRecipe(cast, new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.ingotLiquidValue), + new ItemStack(TinkerTools.patternOutputs[iter], 1, Short.MAX_VALUE), false, 50); + tableCasting.addCastingRecipe(cast, new FluidStack(TinkerSmeltery.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), + new ItemStack(TinkerTools.patternOutputs[iter], 1, Short.MAX_VALUE), false, 50); for (int iterTwo = 0; iterTwo < TinkerSmeltery.liquids.length; iterTwo++) { @@ -741,8 +763,10 @@ private void addRecipesForTableCasting () } ItemStack fullguardCast = new ItemStack(TinkerSmeltery.metalPattern, 1, 22); - tableCasting.addCastingRecipe(fullguardCast, new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(TinkerTools.fullGuard, 1, Short.MAX_VALUE), false, 50); - tableCasting.addCastingRecipe(fullguardCast, new FluidStack(TinkerSmeltery.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(TinkerTools.fullGuard, 1, Short.MAX_VALUE), false, 50); + tableCasting.addCastingRecipe(fullguardCast, new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(TinkerTools.fullGuard, 1, Short.MAX_VALUE), false, + 50); + tableCasting.addCastingRecipe(fullguardCast, new FluidStack(TinkerSmeltery.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(TinkerTools.fullGuard, 1, Short.MAX_VALUE), false, + 50); // Golden Food Stuff FluidStack goldAmount = null; @@ -759,7 +783,6 @@ private void addRecipesForTableCasting () tableCasting.addCastingRecipe(new ItemStack(Items.speckled_melon, 1), goldAmount, new ItemStack(Items.melon), true, 50); tableCasting.addCastingRecipe(new ItemStack(TinkerTools.goldHead), goldAmount, new ItemStack(Items.skull, 1, 3), true, 50); } - protected static void addRecipesForBasinCasting () { @@ -767,29 +790,31 @@ protected static void addRecipesForBasinCasting () // Block Casting basinCasting.addCastingRecipe(new ItemStack(Blocks.iron_block), new FluidStack(TinkerSmeltery.moltenIronFluid, TConstruct.blockLiquidValue), null, true, 100); // Iron basinCasting.addCastingRecipe(new ItemStack(Blocks.gold_block), new FluidStack(TinkerSmeltery.moltenGoldFluid, TConstruct.blockLiquidValue), null, true, 100); // gold - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 3), new FluidStack(TinkerSmeltery.moltenCopperFluid, TConstruct.blockLiquidValue), null, true, 100); // copper - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 5), new FluidStack(TinkerSmeltery.moltenTinFluid, TConstruct.blockLiquidValue), null, true, 100); // tin - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 6), new FluidStack(TinkerSmeltery.moltenAluminumFluid, TConstruct.blockLiquidValue), null, true, 100); // aluminum - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 0), new FluidStack(TinkerSmeltery.moltenCobaltFluid, TConstruct.blockLiquidValue), null, true, 100); // cobalt - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 1), new FluidStack(TinkerSmeltery.moltenArditeFluid, TConstruct.blockLiquidValue), null, true, 100); // ardite - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 4), new FluidStack(TinkerSmeltery.moltenBronzeFluid, TConstruct.blockLiquidValue), null, true, 100); // bronze - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 7), new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.blockLiquidValue), null, true, 100); // albrass - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 2), new FluidStack(TinkerSmeltery.moltenManyullynFluid, TConstruct.blockLiquidValue), null, true, 100); // manyullyn - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 8), new FluidStack(TinkerSmeltery.moltenAlumiteFluid, TConstruct.blockLiquidValue), null, true, 100); // alumite + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 3), new FluidStack(TinkerSmeltery.moltenCopperFluid, TConstruct.blockLiquidValue), null, true, 100); // copper + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 5), new FluidStack(TinkerSmeltery.moltenTinFluid, TConstruct.blockLiquidValue), null, true, 100); // tin + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 6), new FluidStack(TinkerSmeltery.moltenAluminumFluid, TConstruct.blockLiquidValue), null, true, 100); // aluminum + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 0), new FluidStack(TinkerSmeltery.moltenCobaltFluid, TConstruct.blockLiquidValue), null, true, 100); // cobalt + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 1), new FluidStack(TinkerSmeltery.moltenArditeFluid, TConstruct.blockLiquidValue), null, true, 100); // ardite + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 4), new FluidStack(TinkerSmeltery.moltenBronzeFluid, TConstruct.blockLiquidValue), null, true, 100); // bronze + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 7), new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.blockLiquidValue), null, true, 100); // albrass + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 2), new FluidStack(TinkerSmeltery.moltenManyullynFluid, TConstruct.blockLiquidValue), null, true, 100); // manyullyn + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 8), new FluidStack(TinkerSmeltery.moltenAlumiteFluid, TConstruct.blockLiquidValue), null, true, 100); // alumite basinCasting.addCastingRecipe(new ItemStack(Blocks.obsidian), new FluidStack(TinkerSmeltery.moltenObsidianFluid, TConstruct.oreLiquidValue), null, true, 100);// obsidian - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 9), new FluidStack(TinkerSmeltery.moltenSteelFluid, TConstruct.blockLiquidValue), null, true, 100); // steel + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 9), new FluidStack(TinkerSmeltery.moltenSteelFluid, TConstruct.blockLiquidValue), null, true, 100); // steel basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.clearGlass, 1, 0), new FluidStack(TinkerSmeltery.moltenGlassFluid, FluidContainerRegistry.BUCKET_VOLUME), null, true, 100); // glass basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.smeltery, 1, 4), new FluidStack(TinkerSmeltery.moltenStoneFluid, TConstruct.ingotLiquidValue), null, true, 100); // seared - // stone - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.smeltery, 1, 5), new FluidStack(TinkerSmeltery.moltenStoneFluid, TConstruct.chunkLiquidValue), new ItemStack(Blocks.cobblestone), true, 100); + // stone + basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.smeltery, 1, 5), new FluidStack(TinkerSmeltery.moltenStoneFluid, TConstruct.chunkLiquidValue), new ItemStack(Blocks.cobblestone), + true, 100); basinCasting.addCastingRecipe(new ItemStack(Blocks.emerald_block), new FluidStack(TinkerSmeltery.moltenEmeraldFluid, 640 * 9), null, true, 100); // emerald - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.speedBlock, 1, 0), new FluidStack(TinkerSmeltery.moltenTinFluid, TConstruct.nuggetLiquidValue), new ItemStack(Blocks.gravel), true, 100); // brownstone + basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.speedBlock, 1, 0), new FluidStack(TinkerSmeltery.moltenTinFluid, TConstruct.nuggetLiquidValue), new ItemStack(Blocks.gravel), true, + 100); // brownstone if (PHConstruct.craftEndstone) { basinCasting.addCastingRecipe(new ItemStack(Blocks.end_stone), new FluidStack(TinkerSmeltery.moltenEnderFluid, 50), new ItemStack(Blocks.obsidian), true, 100); basinCasting.addCastingRecipe(new ItemStack(Blocks.end_stone), new FluidStack(TinkerSmeltery.moltenEnderFluid, 250), new ItemStack(Blocks.sandstone), true, 100); } - basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 10), new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000), null, true, 100); // ender + basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 10), new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000), null, true, 100); // ender basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.glueBlock), new FluidStack(TinkerSmeltery.glueFluid, TConstruct.blockLiquidValue), null, true, 100); // glue // basinCasting.addCastingRecipe(new ItemStack(slimeGel, 1, 0), new @@ -818,12 +843,13 @@ protected static void addRecipesForSmeltery () // Alloy Smelting Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenBronzeFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsBronzeAlloy)), new FluidStack(TinkerSmeltery.moltenCopperFluid, TConstruct.ingotLiquidValue * 3), new FluidStack(TinkerSmeltery.moltenTinFluid, TConstruct.ingotLiquidValue)); // Bronze - Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenAlubrassFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAluminumBrassAlloy)), new FluidStack(TinkerSmeltery.moltenAluminumFluid, - TConstruct.ingotLiquidValue * 3), new FluidStack(TinkerSmeltery.moltenCopperFluid, TConstruct.ingotLiquidValue * 1)); // Aluminum Brass - Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenAlumiteFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAlumiteAlloy)), new FluidStack(TinkerSmeltery.moltenAluminumFluid, - TConstruct.ingotLiquidValue * 5), new FluidStack(TinkerSmeltery.moltenIronFluid, TConstruct.ingotLiquidValue * 2), new FluidStack(TinkerSmeltery.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); // Alumite - Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenManyullynFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsManyullynAlloy)), new FluidStack(TinkerSmeltery.moltenCobaltFluid, - TConstruct.ingotLiquidValue), new FluidStack(TinkerSmeltery.moltenArditeFluid, TConstruct.ingotLiquidValue)); // Manyullyn + Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenAlubrassFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAluminumBrassAlloy)), new FluidStack( + TinkerSmeltery.moltenAluminumFluid, TConstruct.ingotLiquidValue * 3), new FluidStack(TinkerSmeltery.moltenCopperFluid, TConstruct.ingotLiquidValue * 1)); // Aluminum Brass + Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenAlumiteFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAlumiteAlloy)), new FluidStack( + TinkerSmeltery.moltenAluminumFluid, TConstruct.ingotLiquidValue * 5), new FluidStack(TinkerSmeltery.moltenIronFluid, TConstruct.ingotLiquidValue * 2), new FluidStack( + TinkerSmeltery.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); // Alumite + Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenManyullynFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsManyullynAlloy)), new FluidStack( + TinkerSmeltery.moltenCobaltFluid, TConstruct.ingotLiquidValue), new FluidStack(TinkerSmeltery.moltenArditeFluid, TConstruct.ingotLiquidValue)); // Manyullyn Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.pigIronFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsPigironAlloy)), new FluidStack(TinkerSmeltery.moltenIronFluid, TConstruct.ingotLiquidValue), new FluidStack(TinkerSmeltery.moltenEmeraldFluid, 640), new FluidStack(TinkerSmeltery.bloodFluid, 80)); // Pigiron Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenObsidianFluid, TConstruct.oreLiquidValue), new FluidStack(FluidRegistry.LAVA, 1000), new FluidStack(FluidRegistry.WATER, 1000)); //Obsidian @@ -856,7 +882,7 @@ protected static void addRecipesForSmeltery () Smeltery.addMelting(FluidType.Glue, new ItemStack(TinkerTools.materials, 1, 36), 0, TConstruct.ingotLiquidValue); Smeltery.addMelting(FluidType.Ender, new ItemStack(Items.ender_pearl, 4), 0, 250); - Smeltery.addMelting(TinkerSmeltery.metalBlock, 10, 50, new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000)); + Smeltery.addMelting(TinkerWorld.metalBlock, 10, 50, new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000)); Smeltery.addMelting(FluidType.Water, new ItemStack(Items.snowball, 1, 0), 0, 125); Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.flint_and_steel, 1, 0), 0, TConstruct.ingotLiquidValue); Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.compass, 1, 0), 0, TConstruct.ingotLiquidValue * 4); @@ -963,7 +989,7 @@ protected static void addRecipesForSmeltery () Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_pickaxe, 1, 0), 0, TConstruct.ingotLiquidValue * 3); Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_axe, 1, 0), 0, TConstruct.ingotLiquidValue * 3); } - + private void registerIngotCasting (FluidType ft) { ItemStack pattern = new ItemStack(TinkerSmeltery.metalPattern, 1, 0); diff --git a/src/main/java/tconstruct/world/blocks/CastingChannelBlock.java b/src/main/java/tconstruct/smeltery/blocks/CastingChannelBlock.java similarity index 98% rename from src/main/java/tconstruct/world/blocks/CastingChannelBlock.java rename to src/main/java/tconstruct/smeltery/blocks/CastingChannelBlock.java index 9933837bb3c..aacf5f39d62 100644 --- a/src/main/java/tconstruct/world/blocks/CastingChannelBlock.java +++ b/src/main/java/tconstruct/smeltery/blocks/CastingChannelBlock.java @@ -1,4 +1,4 @@ -package tconstruct.world.blocks; +package tconstruct.smeltery.blocks; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; diff --git a/src/main/java/tconstruct/tools/TinkerTools.java b/src/main/java/tconstruct/tools/TinkerTools.java index 38a306cc8cb..8637a9f4e95 100644 --- a/src/main/java/tconstruct/tools/TinkerTools.java +++ b/src/main/java/tconstruct/tools/TinkerTools.java @@ -3,6 +3,9 @@ import java.util.EnumSet; import mantle.items.abstracts.CraftingItem; +import mantle.pulsar.pulse.IPulse; +import mantle.pulsar.pulse.Pulse; +import mantle.pulsar.pulse.PulseProxy; import mantle.utils.RecipeRemover; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -11,6 +14,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; import net.minecraft.util.StatCollector; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.oredict.OreDictionary; @@ -103,21 +107,24 @@ import tconstruct.world.TinkerWorld; import tconstruct.world.blocks.SoilBlock; import tconstruct.world.itemblocks.CraftedSoilItemBlock; +import tconstruct.world.items.GoldenHead; import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; -@Mod(modid = "TinkerTools", name = "TinkerTools", version = "${tinkertoolversion}") -public class TinkerTools +@ObjectHolder(TConstruct.modID) +@Pulse(id = TConstruct.modID) +public class TinkerTools implements IPulse //TODO: Remove IPulse implementation, keep annotation { /* Proxies for sides, used for graphics processing */ - @SidedProxy(clientSide = "tconstruct.tools.ToolProxyClient", serverSide = "tconstruct.tools.ToolProxyCommon") + @PulseProxy(client = "tconstruct.tools.ToolProxyClient", server = "tconstruct.tools.ToolProxyCommon") public static ToolProxyCommon proxy; @Instance("TinkerTools") @@ -356,6 +363,7 @@ public void preInit (FMLPreInitializationEvent event) // compat TConstructRegistry.addItemToDirectory(toolPartStrings[i], toolParts[i]); } + goldHead = new GoldenHead(4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead"); GameRegistry.registerItem(TinkerTools.goldHead, "goldHead"); TinkerTools.creativeModifier = new CreativeModifier().setUnlocalizedName("tconstruct.modifier.creative"); diff --git a/src/main/java/tconstruct/tools/ToolProxyClient.java b/src/main/java/tconstruct/tools/ToolProxyClient.java index 303084eb452..b3ccceeebc6 100644 --- a/src/main/java/tconstruct/tools/ToolProxyClient.java +++ b/src/main/java/tconstruct/tools/ToolProxyClient.java @@ -23,6 +23,7 @@ import tconstruct.client.gui.ToolForgeGui; import tconstruct.client.gui.ToolStationGui; import tconstruct.client.tabs.TabRegistry; +import tconstruct.common.TProxyCommon; import tconstruct.mechworks.MechworksProxyCommon; import tconstruct.mechworks.inventory.ContainerLandmine; import tconstruct.mechworks.logic.TileEntityLandmine; @@ -49,6 +50,21 @@ public class ToolProxyClient extends ToolProxyCommon public ToolProxyClient() { MinecraftForge.EVENT_BUS.register(this); + registerGuiHandler(); + } + + @Override + protected void registerGuiHandler() + { + super.registerGuiHandler(); + TProxyCommon.registerClientGuiHandler(toolStationID, this); + TProxyCommon.registerClientGuiHandler(partBuilderID, this); + TProxyCommon.registerClientGuiHandler(patternChestID, this); + TProxyCommon.registerClientGuiHandler(stencilTableID, this); + TProxyCommon.registerClientGuiHandler(frypanGuiID, this); + TProxyCommon.registerClientGuiHandler(toolForgeID, this); + TProxyCommon.registerClientGuiHandler(furnaceID, this); + TProxyCommon.registerClientGuiHandler(craftingStationID, this); } @Override diff --git a/src/main/java/tconstruct/tools/ToolProxyCommon.java b/src/main/java/tconstruct/tools/ToolProxyCommon.java index 41da755bbb1..ca5de193182 100644 --- a/src/main/java/tconstruct/tools/ToolProxyCommon.java +++ b/src/main/java/tconstruct/tools/ToolProxyCommon.java @@ -1,9 +1,11 @@ package tconstruct.tools; +import tconstruct.common.TProxyCommon; import mantle.blocks.abstracts.InventoryLogic; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.network.IGuiHandler; public class ToolProxyCommon implements IGuiHandler @@ -16,14 +18,24 @@ public class ToolProxyCommon implements IGuiHandler public static final int toolForgeID = 5; public static final int furnaceID = 8; public static final int craftingStationID = 11; - public void preInit() + + public ToolProxyCommon() { - + registerGuiHandler(); } - public void postInit() + + protected void registerGuiHandler() { - + TProxyCommon.registerServerGuiHandler(toolStationID, this); + TProxyCommon.registerServerGuiHandler(partBuilderID, this); + TProxyCommon.registerServerGuiHandler(patternChestID, this); + TProxyCommon.registerServerGuiHandler(stencilTableID, this); + TProxyCommon.registerServerGuiHandler(frypanGuiID, this); + TProxyCommon.registerServerGuiHandler(toolForgeID, this); + TProxyCommon.registerServerGuiHandler(furnaceID, this); + TProxyCommon.registerServerGuiHandler(craftingStationID, this); } + @Override public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) { diff --git a/src/main/java/tconstruct/tools/blocks/ToolForgeBlock.java b/src/main/java/tconstruct/tools/blocks/ToolForgeBlock.java index 6b523d38add..6859d7a114c 100644 --- a/src/main/java/tconstruct/tools/blocks/ToolForgeBlock.java +++ b/src/main/java/tconstruct/tools/blocks/ToolForgeBlock.java @@ -18,10 +18,10 @@ import net.minecraftforge.common.util.ForgeDirection; import tconstruct.TConstruct; import tconstruct.library.TConstructRegistry; -import tconstruct.smeltery.TinkerSmeltery; import tconstruct.tools.ToolProxyCommon; import tconstruct.tools.logic.ToolForgeLogic; import tconstruct.tools.model.TableRender; +import tconstruct.world.TinkerWorld; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -82,7 +82,7 @@ public IIcon getIcon (int side, int meta) case 3: return Blocks.emerald_block.getIcon(side, 0); default: - return TinkerSmeltery.metalBlock.getIcon(side, meta - 4); + return TinkerWorld.metalBlock.getIcon(side, meta - 4); } } diff --git a/src/main/java/tconstruct/util/TEventHandler.java b/src/main/java/tconstruct/util/TEventHandler.java deleted file mode 100644 index 80e468dfdf2..00000000000 --- a/src/main/java/tconstruct/util/TEventHandler.java +++ /dev/null @@ -1,785 +0,0 @@ -package tconstruct.util; - -import java.util.Random; - -import mantle.blocks.BlockUtils; -import mantle.world.WorldHelper; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IEntityLivingData; -import net.minecraft.entity.boss.EntityDragon; -import net.minecraft.entity.boss.IBossDisplayData; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.item.EntityXPOrb; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.EntitySpider; -import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.passive.EntityChicken; -import net.minecraft.entity.passive.EntityCow; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EntityDamageSourceIndirect; -import net.minecraft.util.MovingObjectPosition.MovingObjectType; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraftforge.event.entity.living.LivingAttackEvent; -import net.minecraftforge.event.entity.living.LivingDeathEvent; -import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; -import net.minecraftforge.event.entity.living.LivingHurtEvent; -import net.minecraftforge.event.entity.living.LivingSpawnEvent; -import net.minecraftforge.event.entity.player.BonemealEvent; -import net.minecraftforge.event.entity.player.FillBucketEvent; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; -import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; -import net.minecraftforge.event.world.BlockEvent.BreakEvent; -import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent; -import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent; -import tconstruct.common.TRepo; -import tconstruct.items.tools.FryingPan; -import tconstruct.library.ActiveToolMod; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.event.PartBuilderEvent; -import tconstruct.library.event.ToolCraftEvent; -import tconstruct.library.tools.ArrowMaterial; -import tconstruct.library.tools.BowMaterial; -import tconstruct.library.tools.BowstringMaterial; -import tconstruct.library.tools.FletchingMaterial; -import tconstruct.library.tools.ToolCore; -import tconstruct.library.tools.Weapon; -import tconstruct.smeltery.blocks.LiquidMetalFinite; -import tconstruct.smeltery.blocks.TankAirBlock; -import tconstruct.util.config.PHConstruct; -import tconstruct.util.player.ArmorExtended; -import tconstruct.util.player.TPlayerStats; -import tconstruct.world.entity.BlueSlime; -import cpw.mods.fml.common.eventhandler.Event; -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; - -public class TEventHandler -{ - Random random = new Random(); - - /* Crafting */ - @SubscribeEvent - public void craftTool (ToolCraftEvent.NormalTool event) - { - NBTTagCompound toolTag = event.toolTag.getCompoundTag("InfiTool"); - if (PHConstruct.denyMattock && event.tool == TRepo.mattock) - { - int head = toolTag.getInteger("Head"); - int handle = toolTag.getInteger("Handle"); - int accessory = toolTag.getInteger("Accessory"); - - if (!allowCrafting(head, handle, accessory)) - { - event.setResult(Result.DENY); - return; - } - } - - int thaum = 0; - if (toolTag.getInteger("Head") == 31) - thaum++; - if (toolTag.getInteger("Handle") == 31) - thaum++; - if (toolTag.getInteger("Accessory") == 31) - thaum++; - if (toolTag.getInteger("Extra") == 31) - thaum++; - - if ((thaum >= 3) || (!toolTag.hasKey("Accessory") && thaum >= 2)) - { - int modifiers = toolTag.getInteger("Modifiers"); - modifiers += 2; - toolTag.setInteger("Modifiers", modifiers); - } - else if (thaum >= 1) - { - int modifiers = toolTag.getInteger("Modifiers"); - modifiers += 1; - toolTag.setInteger("Modifiers", modifiers); - } - - if (event.tool == TRepo.shortbow) - { - BowMaterial top = TConstructRegistry.getBowMaterial(toolTag.getInteger("Head")); - BowMaterial bottom = TConstructRegistry.getBowMaterial(toolTag.getInteger("Accessory")); - BowstringMaterial string = (BowstringMaterial) TConstructRegistry.getCustomMaterial(toolTag.getInteger("Handle"), BowstringMaterial.class); - - if (top != null && bottom != null && string != null) - { - if (toolTag.getInteger("Handle") == 1) - { - int modifiers = toolTag.getInteger("Modifiers"); - modifiers += 1; - toolTag.setInteger("Modifiers", modifiers); - } - - int durability = (int) ((top.durability + bottom.durability) / 2 * string.durabilityModifier); - toolTag.setInteger("TotalDurability", durability); - toolTag.setInteger("BaseDurability", durability); - - int drawSpeed = (int) ((top.drawspeed + bottom.drawspeed) / 2 * string.drawspeedModifier); - toolTag.setInteger("DrawSpeed", drawSpeed); - toolTag.setInteger("BaseDrawSpeed", drawSpeed); - - float flightSpeed = (top.flightSpeedMax + bottom.flightSpeedMax) / 2f * string.flightSpeedModifier; - toolTag.setFloat("FlightSpeed", flightSpeed); - } - } - - if (event.tool == TRepo.arrow) - { - ArrowMaterial head = TConstructRegistry.getArrowMaterial(toolTag.getInteger("Head")); - ArrowMaterial shaft = TConstructRegistry.getArrowMaterial(toolTag.getInteger("Handle")); - FletchingMaterial fletching = (FletchingMaterial) TConstructRegistry.getCustomMaterial(toolTag.getInteger("Accessory"), FletchingMaterial.class); - - if (head != null && shaft != null && fletching != null) - { - float mass = head.mass / 5f + shaft.mass + fletching.mass; - float shatter = (head.breakChance + shaft.breakChance + fletching.breakChance) / 4f; - float accuracy = (head.accuracy + shaft.accuracy + fletching.accuracy) / 3; - - ItemStack arrow = new ItemStack(event.tool, 4); - toolTag.setInteger("TotalDurability", 0); - toolTag.setFloat("Mass", mass); - toolTag.setFloat("BreakChance", shatter); - toolTag.setFloat("Accuracy", accuracy); - toolTag.setInteger("Unbreaking", 10); - arrow.setTagCompound(event.toolTag); - event.overrideResult(arrow); - } - } - - if (event.tool == TRepo.battlesign) - { - int modifiers = toolTag.getInteger("Modifiers"); - modifiers += 1; - toolTag.setInteger("Modifiers", modifiers); - } - } - - private boolean allowCrafting (int head, int handle, int accessory) - { - int[] nonMetals = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 17 }; - for (int i = 0; i < nonMetals.length; i++) - { - if (head == nonMetals[i] || handle == nonMetals[i] || accessory == nonMetals[i]) - return false; - } - return true; - } - - @SubscribeEvent - public void craftPart (PartBuilderEvent.NormalPart event) - { - if (event.pattern.getItem() == TRepo.woodPattern && event.pattern.getItemDamage() == 23) - { - ItemStack result = craftBowString(event.material); - if (result != null) - { - event.overrideResult(new ItemStack[] { result, null }); - } - } - - if (event.pattern.getItem() == TRepo.woodPattern && event.pattern.getItemDamage() == 24) - { - ItemStack result = craftFletching(event.material); - if (result != null) - { - event.overrideResult(new ItemStack[] { result, null }); - } - } - } - - public static ItemStack craftBowString (ItemStack stack) - { - if (stack.stackSize < 3) - return null; - - BowstringMaterial mat = (BowstringMaterial) TConstructRegistry.getCustomMaterial(stack, BowstringMaterial.class); - if (mat != null) - return mat.craftingItem.copy(); - return null; - } - - public static ItemStack craftFletching (ItemStack stack) - { - if (matchesLeaves(stack)) - { - FletchingMaterial leaves = (FletchingMaterial) TConstructRegistry.getCustomMaterial(new ItemStack(Blocks.leaves), FletchingMaterial.class); - return leaves.craftingItem.copy(); - } - - FletchingMaterial mat = (FletchingMaterial) TConstructRegistry.getCustomMaterial(stack, FletchingMaterial.class); - if (mat != null) - return mat.craftingItem.copy(); - return null; - } - - public static boolean matchesLeaves (ItemStack stack) - { - if (stack != null) - { - Block block = BlockUtils.getBlockFromItemStack(stack); - if (block != null) - { - if (block.isLeaves(null, 0, 0, 0)) - return true; - } - } - return false; - } - - /* Damage */ - @SubscribeEvent - public void onHurt (LivingHurtEvent event) - { - EntityLivingBase reciever = event.entityLiving; - if (reciever instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.entityLiving; - // Cutlass - ItemStack stack = player.getCurrentEquippedItem(); - if (stack != null && player.isUsingItem()) - { - Item item = stack.getItem(); - if (item == TRepo.cutlass) - { - player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 3 * 20, 1)); - } - else if (item == TRepo.battlesign) - { - event.ammount *= 1.5; //Puts battlesign blocking at 3/4 instead of 1/2 - } - } - } - else if (reciever instanceof EntityCreeper) - { - Entity attacker = event.source.getEntity(); - if (attacker instanceof EntityLivingBase) - { - Entity target = ((EntityCreeper) reciever).getAttackTarget(); - if (target != null) - { - float d1 = reciever.getDistanceToEntity(((EntityCreeper) reciever).getAttackTarget()); - float d2 = reciever.getDistanceToEntity(attacker); - if (d2 < d1) - { - ((EntityCreeper) event.entityLiving).setAttackTarget((EntityLivingBase) event.source.getEntity()); - } - } - } - } - } - - @SubscribeEvent - public void onAttack (LivingAttackEvent event) - { - //System.out.println("Damage: "+event.ammount); - if (event.entityLiving instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.entityLiving; - //Cutlass - ItemStack stack = player.getCurrentEquippedItem(); - if (stack != null && stack.getItem() == TRepo.battlesign && player.isUsingItem()) - { - DamageSource source = event.source; - if (!source.isUnblockable() && !source.isMagicDamage() && !source.isExplosion()) - { - if (source instanceof EntityDamageSourceIndirect) - { - if (random.nextInt(3) == 0) - { - Entity attacker = source.getEntity(); - Entity projectile = ((EntityDamageSourceIndirect) source).getSourceOfDamage(); - projectile.motionX *= -1; - projectile.motionZ *= -1; - projectile.setDead(); - event.setCanceled(true); - - if (projectile.getClass() == EntityArrow.class && !player.worldObj.isRemote) - { - EntityArrow reflection = null; - if (attacker instanceof EntityLivingBase) - reflection = new EntityArrow(player.worldObj, (EntityLivingBase) attacker, 0); - else - reflection = new EntityArrow(player.worldObj, player, 0); - - Vec3 look = player.getLookVec(); - reflection.posX = projectile.posX; - reflection.posY = projectile.posY; - reflection.posZ = projectile.posZ; - reflection.motionX = (projectile.motionX + (look.xCoord * 8)) / 6; - reflection.motionY = (projectile.motionY + (look.yCoord * 8)) / 6; - reflection.motionZ = (projectile.motionZ + (look.zCoord * 8)) / 6; - reflection.damage = ((EntityArrow) projectile).damage; - player.worldObj.spawnEntityInWorld(reflection); - } - } - } - else - { - Entity attacker = source.getEntity(); - if(attacker != null) - { - attacker.attackEntityFrom(DamageSource.causeThornsDamage(player), event.ammount); - } - } - } - } - } - } - - /* Drops */ - @SubscribeEvent - public void onLivingDrop (LivingDropsEvent event) - { - if (event.entityLiving == null) - return; - - if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.source.getEntity(); - if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof FryingPan) - { - for (int i = 0; i < event.drops.size(); i++) - { - ItemStack is = event.drops.get(i).getEntityItem(); - if (FurnaceRecipes.smelting().getSmeltingResult(is) != null && FurnaceRecipes.smelting().getSmeltingResult(is).getItem() instanceof ItemFood) - { - NBTTagCompound stackCompound = is.getTagCompound(); - if (stackCompound == null) - { - stackCompound = new NBTTagCompound(); - } - stackCompound.setBoolean("frypanKill", true); - is.setTagCompound(stackCompound); - } - } - } - } - - if (random.nextInt(200) == 0 && event.entityLiving instanceof IMob && event.source.damageType.equals("player")) - { - if (event.entityLiving instanceof BlueSlime) - { - BlueSlime slime = (BlueSlime) event.entityLiving; - if (slime.getSlimeSize() < 8) - return; - } - int count = event.entityLiving instanceof EntityDragon ? 5 : 1; - for (int i = 0; i < count; i++) - { - ItemStack dropStack = new ItemStack(TRepo.heartCanister, 1, 1); - EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); - entityitem.delayBeforeCanPickup = 10; - event.drops.add(entityitem); - } - } - - if (event.entityLiving instanceof IBossDisplayData) - { - ItemStack dropStack = new ItemStack(TRepo.heartCanister, 1, 3); - EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); - entityitem.delayBeforeCanPickup = 10; - event.drops.add(entityitem); - } - - if (!event.entityLiving.isChild() && event.entityLiving.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot")) - { - - if (event.entityLiving.getClass() == EntityCow.class) - { - int amount = random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + 1; - - for (int iter = 0; iter < amount; ++iter) - { - addDrops(event, new ItemStack(Items.leather, 1)); - } - } - - if (event.entityLiving.getClass() == EntityChicken.class) - { - int amount = random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + 1; - - for (int iter = 0; iter < amount; ++iter) - { - addDrops(event, new ItemStack(Items.feather, 1)); - } - } - } - - if (event.recentlyHit) - { - if (event.entityLiving.getClass() == EntitySkeleton.class) - { - EntitySkeleton enemy = (EntitySkeleton) event.entityLiving; - - if (event.source.damageType.equals("player")) - { - EntityPlayer player = (EntityPlayer) event.source.getEntity(); - ItemStack stack = player.getCurrentEquippedItem(); - if (stack != null && stack.hasTagCompound() && stack.getItem() instanceof ToolCore) - { - int beheading = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Beheading"); - if (stack.getItem() == TRepo.cleaver) - beheading += 2; - if (beheading > 0 && random.nextInt(100) < beheading * 10) - { - addDrops(event, new ItemStack(Items.skull, 1, enemy.getSkeletonType())); - } - } - } - if (enemy.getSkeletonType() == 1 && random.nextInt(Math.max(1, 5 - event.lootingLevel)) == 0) - { - addDrops(event, new ItemStack(TRepo.materials, 1, 8)); - } - } - - if (event.entityLiving.getClass() == EntityZombie.class) - { - EntityZombie enemy = (EntityZombie) event.entityLiving; - - if (event.source.damageType.equals("player")) - { - EntityPlayer player = (EntityPlayer) event.source.getEntity(); - ItemStack stack = player.getCurrentEquippedItem(); - - if (stack != null && stack.hasTagCompound() && stack.getItem() instanceof ToolCore) - { - int beheading = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Beheading"); - if (stack != null && stack.hasTagCompound() && stack.getItem() == TRepo.cleaver) - beheading += 2; - if (beheading > 0 && random.nextInt(100) < beheading * 10) - { - addDrops(event, new ItemStack(Items.skull, 1, 2)); - } - } - - if (stack != null && stack.hasTagCompound() && stack.getItem() == TRepo.cleaver && random.nextInt(100) < 10) //Swap out for real beheading - { - addDrops(event, new ItemStack(Items.skull, 1, 2)); - } - - } - } - - if (event.entityLiving.getClass() == EntityCreeper.class) - { - EntityCreeper enemy = (EntityCreeper) event.entityLiving; - - if (event.source.damageType.equals("player")) - { - EntityPlayer player = (EntityPlayer) event.source.getEntity(); - ItemStack stack = player.getCurrentEquippedItem(); - if (stack != null && stack.hasTagCompound() && stack.getItem() instanceof ToolCore) - { - int beheading = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Beheading"); - if (stack.getItem() == TRepo.cleaver) - beheading += 2; - if (beheading > 0 && random.nextInt(100) < beheading * 5) - { - addDrops(event, new ItemStack(Items.skull, 1, 4)); - } - } - } - } - } - - if (event.entityLiving.getClass() == EntityGhast.class) - { - if (PHConstruct.uhcGhastDrops) - { - for (EntityItem o : event.drops) - { - if (o.getEntityItem().getItem() == Items.ghast_tear) - { - o.setEntityItemStack(new ItemStack(Items.gold_ingot, 1)); - } - } - } - else - { - addDrops(event, new ItemStack(Items.ghast_tear, 1)); - } - } - // } - - if (event.entityLiving instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.entityLiving; - - if (PHConstruct.dropPlayerHeads) - { - ItemStack dropStack = new ItemStack(Items.skull, 1, 3); - NBTTagCompound nametag = new NBTTagCompound(); - nametag.setString("SkullOwner", player.getDisplayName()); - dropStack.setTagCompound(nametag); - addDrops(event, dropStack); - } - - else if (event.source.damageType.equals("player")) - { - EntityPlayer source = (EntityPlayer) event.source.getEntity(); - ItemStack stack = source.getCurrentEquippedItem(); - if (stack != null && stack.hasTagCompound() && stack.getItem() instanceof ToolCore) - { - int beheading = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Beheading"); - if (stack.getItem() == TRepo.cleaver) - beheading += 2; - if (beheading > 0 && random.nextInt(100) < beheading * 50) - { - ItemStack dropStack = new ItemStack(Items.skull, 1, 3); - NBTTagCompound nametag = new NBTTagCompound(); - nametag.setString("SkullOwner", player.getDisplayName()); - dropStack.setTagCompound(nametag); - addDrops(event, dropStack); - } - } - } - } - } - - /*@SubscribeEvent - public void onLivingDeath (LivingDeathEvent event) - { - Entity cause = event.source.getSourceOfDamage(); - if (cause != null && cause instanceof EntityPlayer) - { - EntityPlayer murderer = (EntityPlayer) cause; - ItemStack stack = murderer.getHeldItem(); - if (stack != null && stack.getItem() instanceof Weapon) - { - murderer.addStat(TAchievements.achievements.get("tconstruct:enemySlayer"), 1); - } - } - }*/ - - void addDrops (LivingDropsEvent event, ItemStack dropStack) - { - EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); - entityitem.delayBeforeCanPickup = 10; - event.drops.add(entityitem); - } - - /* - * @ForgeSubscribe public void onLivingSpawn (EntityJoinWorldEvent event) { - * if (event.entity instanceof EntityXPOrb) { - * TConstruct.logger.info("Entity: " + event.entity); } } - */ - - @SubscribeEvent - public void onLivingSpawn (LivingSpawnEvent.SpecialSpawn event) - { - EntityLivingBase living = event.entityLiving; - if (living.getClass() == EntitySpider.class && random.nextInt(100) == 0) - { - EntityCreeper creeper = new EntityCreeper(living.worldObj); - spawnEntityLiving(living.posX, living.posY + 1, living.posZ, creeper, living.worldObj); - if (living.riddenByEntity != null) - creeper.mountEntity(living.riddenByEntity); - else - creeper.mountEntity(living); - - EntityXPOrb orb = new EntityXPOrb(living.worldObj, living.posX, living.posY, living.posZ, random.nextInt(20) + 20); - orb.mountEntity(creeper); - } - } - - public static void spawnEntityLiving (double x, double y, double z, EntityLiving entity, World world) - { - if (!world.isRemote) - { - entity.setPosition(x, y, z); - entity.onSpawnWithEgg((IEntityLivingData) null); - world.spawnEntityInWorld(entity); - } - } - - /* Bonemeal */ - - @SubscribeEvent - public void bonemealEvent (BonemealEvent event) - { - if (!event.world.isRemote) - { - if (event.block == TRepo.slimeSapling) - { - if (TRepo.slimeSapling.boneFertilize(event.world, event.x, event.y, event.z, event.world.rand, event.entityPlayer)) - event.setResult(Event.Result.ALLOW); - } - } - } - - /* Ore Dictionary */ - @SubscribeEvent - public void registerOre (OreRegisterEvent evt) - { - - if (evt.Name == "crystalQuartz") - { - TRepo.modAttack.addStackToMatchList(evt.Ore, 2); - } - - else if (evt.Name == "crystalCerusQuartz") - { - TRepo.modAttack.addStackToMatchList(evt.Ore, 24); - } - } - - @SubscribeEvent - public void bucketFill (FillBucketEvent evt) - { - if (evt.current.getItem() == Items.bucket && evt.target.typeOfHit == MovingObjectType.ENTITY) - { - int hitX = evt.target.blockX; - int hitY = evt.target.blockY; - int hitZ = evt.target.blockZ; - - if (evt.entityPlayer != null && !evt.entityPlayer.canPlayerEdit(hitX, hitY, hitZ, evt.target.sideHit, evt.current)) - { - return; - } - - Block bID = evt.world.getBlock(hitX, hitY, hitZ); - for (int id = 0; id < TRepo.fluidBlocks.length; id++) - { - if (bID == TRepo.fluidBlocks[id]) - { - if (evt.entityPlayer.capabilities.isCreativeMode) - { - WorldHelper.setBlockToAir(evt.world, hitX, hitY, hitZ); - } - else - { - if (TRepo.fluidBlocks[id] instanceof LiquidMetalFinite) - { - WorldHelper.setBlockToAir(evt.world, hitX, hitY, hitZ); - /* - * int quanta = 0; for (int posX = -1; posX <= 1; - * posX++) { for (int posZ = -1; posZ <= 1; posZ++) - * { int localID = evt.world.getBlockId(hitX + posX, - * hitY, hitZ + posZ); if (localID == bID) { quanta - * += evt.world.getBlockMetadata(hitX + posX, hitY, - * hitZ + posZ) + 1; } } } - * - * if (quanta >= 8) { while (quanta > 0) { for (int - * posX = -1; posX <= 1; posX++) { for (int posZ = - * -1; posZ <= 1; posZ++) { int localID = - * evt.world.getBlockId(hitX + posX, hitY, hitZ + - * posZ); if (localID == bID) { quanta -= 1; int - * meta = evt.world.getBlockMetadata(hitX + posX, - * hitY, hitZ + posZ); if (meta > 0) - * evt.world.setBlockMetadataWithNotify(hitX + posX, - * hitY, hitZ + posZ, meta - 1, 3); else - * evt.world.setBlockToAir(hitX + posX, hitY, hitZ + - * posZ); } } } } } - */ - } - else - { - WorldHelper.setBlockToAir(evt.world, hitX, hitY, hitZ); - } - - evt.setResult(Result.ALLOW); - evt.result = new ItemStack(TRepo.buckets, 1, id); - } - } - } - } - } - - // TODO 1.7 Fix this -- for ticking stuffs in extra armor slots - - @SubscribeEvent - public void livingUpdate (LivingUpdateEvent event) - { - if (event.entityLiving instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.entityLiving; - TPlayerStats stats = TPlayerStats.get(player); - - if (stats != null && stats.armor != null) - { - ArmorExtended armor = stats.armor; - for (int i = 0; i < armor.getSizeInventory(); i++) - { - if (armor.getStackInSlot(i) != null) - { - armor.getStackInSlot(i).getItem().onUpdate(armor.getStackInSlot(i), player.worldObj, player, i, false); - armor.getStackInSlot(i).getItem().onArmorTick(player.worldObj, player, armor.getStackInSlot(i)); - } - } - } - } - } - - // Player interact event - prevent breaking of tank air blocks in creative - @SubscribeEvent - public void playerInteract (PlayerInteractEvent event) - { - if (event.action == Action.LEFT_CLICK_BLOCK) - { - Block block = event.entity.worldObj.getBlock(event.x, event.y, event.z); - if (block instanceof TankAirBlock) - { - event.setCanceled(true); - } - } - } - - @SubscribeEvent - public void harvestBlock (HarvestDropsEvent event) - { - if (event.harvester == null) - return; - ItemStack stack = event.harvester.getCurrentEquippedItem(); - if (stack == null || stack.getItem() == null || !(stack.getItem() instanceof ToolCore)) - return; - if (stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Lava")) - { - for (int i = 0; i < event.drops.size(); i++) - { - ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(event.drops.get(i)); - if (result != null) - event.drops.set(i, result.copy()); - } - } - } - - @SubscribeEvent - public void breakBlock (BreakEvent event) - { - ItemStack stack = event.getPlayer().getCurrentEquippedItem(); - if (stack == null || stack.getItem() == null || !(stack.getItem() instanceof ToolCore)) - return; - if (stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Broken")) - { - event.setCanceled(true); - } - else - { - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - if (mod.beforeBlockBreak((ToolCore)stack.getItem(), stack, event.x, event.y, event.z, event.getPlayer())) - event.setCanceled(true); - } - } -} diff --git a/src/main/java/tconstruct/util/config/PHConstruct.java b/src/main/java/tconstruct/util/config/PHConstruct.java index c99eea181f7..568b9ab2748 100644 --- a/src/main/java/tconstruct/util/config/PHConstruct.java +++ b/src/main/java/tconstruct/util/config/PHConstruct.java @@ -1,9 +1,11 @@ package tconstruct.util.config; import java.io.File; +import java.io.IOException; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; +import tconstruct.TConstruct; import tconstruct.library.tools.AbilityHelper; import tconstruct.tools.TinkerTools; import cpw.mods.fml.common.Loader; @@ -11,11 +13,51 @@ public class PHConstruct { - public static void initProps (File confFile) + public static void initProps (File location) { - + /* Before we do anything, let's set up which modules can and cannot load. */ + File modules = new File(location + "/TinkersModules.txt"); + + /* Some basic debugging will go a long way */ + try + { + modules.createNewFile(); + } + catch (IOException e) + { + TConstruct.logger.warn("Could not create module configuration file for TConstruct. Reason:"); + TConstruct.logger.warn(e.getLocalizedMessage()); + } /* [Forge] Configuration class, used as config method */ - Configuration config = new Configuration(confFile); + Configuration config = new Configuration(modules); + config.load(); + worldModule = config.get("Modules: Disabling these will disable a chunk of the mod", "World", true, "Ores, slime islands, essence berries, and the like.").getBoolean(true); + toolModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Tools", true, "The main core of the mod! All of the tools, the tables, and the patterns are here.").getBoolean(true); + smelteryModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Smeltery", true, "Liquid metals, casting, and the multiblock structure.").getBoolean(true); + mechworksModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Smeltery", true, "Mechanical machinations and steampunk inspired shenanigans.").getBoolean(true); + armorModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Armor", true, "Modifyable armors, such as the traveller's gear.").getBoolean(true); + prayerModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Prayers", true, "Area of effect and time delayed status changes. Scrolltastic!").getBoolean(true); + cropifyModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Cropify", true, "Tinkering with the world never felt this bushy.").getBoolean(true); + config.save(); + + /* Here we will set up the config file for the mod + * First: Create a folder inside the config folder + * Second: Create the actual config file + * Note: Configs are a pain, but absolutely necessary for every mod. + */ + File newFile = new File(location + "/TinkersWorkshop.txt"); + try + { + newFile.createNewFile(); + } + catch (IOException e) + { + TConstruct.logger.warn("Could not create configuration file for TConstruct. Reason:"); + TConstruct.logger.warn(e.getLocalizedMessage()); + } + + config = new Configuration(newFile); + cfglocation = location; /* Load the configuration file */ config.load(); @@ -51,7 +93,7 @@ public static void initProps (File confFile) ingotsAlumiteAlloy = config.get("Smeltery Output Modification", "Alumite ingot return", 3, "Number of ingots returned from smelting Alumite in the smeltery").getDouble(3); ingotsManyullynAlloy = config.get("Smeltery Output Modification", "Manyullyn ingot return", 1, "Number of ingots returned from smelting Manyullyn in the smeltery").getDouble(1); ingotsPigironAlloy = config.get("Smeltery Output Modification", "Pig Iron ingot return", 1, "Number of ingots returned from smelting Pig Iron in the smeltery").getDouble(1); - + exoCraftingEnabled = config.get("Equipables", "Exo-Armor-Craftable", true).getBoolean(true); capesEnabled = config.get("Superfun", "Enable-TCon-Capes", true).getBoolean(true); @@ -171,7 +213,6 @@ public static void initProps (File confFile) /* Save the configuration file */ config.save(); - String location = Loader.instance().getConfigDir().toString(); File gt = new File(location + "/GregTech"); if (gt.exists()) { @@ -182,6 +223,15 @@ public static void initProps (File confFile) } } + //Modules + public static boolean worldModule; + public static boolean toolModule; + public static boolean smelteryModule; + public static boolean mechworksModule; + public static boolean armorModule; + public static boolean prayerModule; + public static boolean cropifyModule; + public static boolean exoCraftingEnabled; public static boolean capesEnabled; diff --git a/src/main/java/tconstruct/world/TinkerWorld.java b/src/main/java/tconstruct/world/TinkerWorld.java index 893de87f0e8..bbf277912ad 100644 --- a/src/main/java/tconstruct/world/TinkerWorld.java +++ b/src/main/java/tconstruct/world/TinkerWorld.java @@ -1,5 +1,8 @@ package tconstruct.world; +import mantle.pulsar.pulse.IPulse; +import mantle.pulsar.pulse.Pulse; +import mantle.pulsar.pulse.PulseProxy; import mantle.utils.RecipeRemover; import net.minecraft.block.Block; import net.minecraft.block.Block.SoundType; @@ -15,17 +18,13 @@ import net.minecraftforge.common.ChestGenHooks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; import tconstruct.TConstruct; import tconstruct.armor.TinkerArmor; import tconstruct.blocks.SlabBase; -import tconstruct.blocks.logic.DryingRackLogic; import tconstruct.blocks.slime.SlimeFluid; import tconstruct.blocks.slime.SlimeGel; import tconstruct.blocks.slime.SlimeGrass; @@ -37,13 +36,9 @@ import tconstruct.client.StepSoundSlime; import tconstruct.common.itemblocks.MetadataItemBlock; import tconstruct.library.TConstructRegistry; -import tconstruct.mechworks.TinkerMechworks; -import tconstruct.mechworks.entity.item.EntityLandmineFirework; -import tconstruct.mechworks.entity.item.ExplosivePrimed; -import tconstruct.mechworks.itemblocks.ItemBlockLandmine; -import tconstruct.mechworks.logic.TileEntityLandmine; import tconstruct.smeltery.TinkerSmeltery; import tconstruct.smeltery.blocks.MetalOre; +import tconstruct.smeltery.itemblocks.MetalItemBlock; import tconstruct.tools.TDispenserBehaviorArrow; import tconstruct.tools.TinkerTools; import tconstruct.tools.blocks.MultiBrick; @@ -63,9 +58,12 @@ import tconstruct.world.blocks.SlimePad; import tconstruct.world.blocks.StoneLadder; import tconstruct.world.blocks.StoneTorch; +import tconstruct.world.blocks.TMetalBlock; import tconstruct.world.blocks.WoodRail; import tconstruct.world.entity.BlueSlime; import tconstruct.world.entity.Crystal; +import tconstruct.world.gen.TBaseWorldGenerator; +import tconstruct.world.gen.TerrainGenEventHandler; import tconstruct.world.itemblocks.BarricadeItem; import tconstruct.world.itemblocks.GravelOreItem; import tconstruct.world.itemblocks.HamboneItemBlock; @@ -81,22 +79,22 @@ import tconstruct.world.itemblocks.WoolSlab2Item; import tconstruct.world.items.OreBerries; import tconstruct.world.items.StrangeFood; -import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; -import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; -@Mod(modid = "TinkerWorld", name = "TinkerWorld", version = "${tinkerworldversion}") -public class TinkerWorld +@ObjectHolder(TConstruct.modID) +@Pulse(id = TConstruct.modID) +public class TinkerWorld implements IPulse //TODO: Remove IPulse implementation, keep annotation { @Instance("TinkerWorld") public static TinkerWorld instance; - @SidedProxy(clientSide = "tconstruct.world.TinkerWorldProxyClient", serverSide = "tconstruct.world.TinkerWorldProxyCommon") + @PulseProxy(client = "tconstruct.world.TinkerWorldProxyClient", server = "tconstruct.world.TinkerWorldProxyCommon") public static TinkerWorldProxyCommon proxy; public static Item strangeFood; @@ -135,6 +133,7 @@ public class TinkerWorld public static ChestGenHooks tinkerHouseChest; public static ChestGenHooks tinkerHousePatterns; public static Block punji; + public static Block metalBlock; public TinkerWorld() { @@ -167,7 +166,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerWorld.slimePool = new SlimeFluid(TinkerWorld.blueSlimeFluid, Material.water).setCreativeTab(TConstructRegistry.blockTab).setStepSound(TinkerWorld.slimeStep).setBlockName("liquid.slime"); GameRegistry.registerBlock(TinkerWorld.slimePool, "liquid.slime"); TinkerWorld.blueSlimeFluid.setBlock(TinkerWorld.slimePool); - FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerWorld.blueSlimeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 24), new ItemStack(Items.bucket))); + //TODO: Add a new bucket for blue slime + //FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerWorld.blueSlimeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 24), new ItemStack(Items.bucket))); // Slime Islands TinkerWorld.slimeGel = new SlimeGel().setStepSound(TinkerWorld.slimeStep).setLightOpacity(0).setBlockName("slime.gel"); @@ -214,8 +214,6 @@ public void preInit (FMLPreInitializationEvent event) GameRegistry.registerBlock(TinkerWorld.woolSlab2, WoolSlab2Item.class, "WoolSlab2"); // Traps - GameRegistry.registerBlock(TinkerMechworks.landmine, ItemBlockLandmine.class, "Redstone.Landmine"); - GameRegistry.registerTileEntity(TileEntityLandmine.class, "Landmine"); GameRegistry.registerBlock(TinkerWorld.punji, "trap.punji"); GameRegistry.registerBlock(TinkerWorld.barricadeOak, BarricadeItem.class, "trap.barricade.oak"); GameRegistry.registerBlock(TinkerWorld.barricadeSpruce, BarricadeItem.class, "trap.barricade.spruce"); @@ -223,8 +221,6 @@ public void preInit (FMLPreInitializationEvent event) GameRegistry.registerBlock(TinkerWorld.barricadeJungle, BarricadeItem.class, "trap.barricade.jungle"); GameRegistry.registerBlock(TinkerWorld.slimeExplosive, MetadataItemBlock.class, "explosive.slime"); - GameRegistry.registerBlock(TinkerArmor.dryingRack, "Armor.DryingRack"); - GameRegistry.registerTileEntity(DryingRackLogic.class, "Armor.DryingRack"); // fluids // Slime Islands @@ -281,6 +277,10 @@ public void preInit (FMLPreInitializationEvent event) // Items.minecartPowered.setMaxStackSize(3); Items.cake.setMaxStackSize(16); // Block.torchWood.setTickRandomly(false); + + TinkerWorld.metalBlock = new TMetalBlock(Material.iron, 10.0F).setBlockName("tconstruct.metalblock"); + TinkerWorld.metalBlock.stepSound = Block.soundTypeMetal; + GameRegistry.registerBlock(TinkerWorld.metalBlock, MetalItemBlock.class, "MetalBlock"); } @EventHandler @@ -291,6 +291,9 @@ public void init (FMLInitializationEvent event) oreRegistry(); addLoot(); createEntities(); + + GameRegistry.registerWorldGenerator(new TBaseWorldGenerator(), 0); + MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenEventHandler()); } @EventHandler @@ -306,8 +309,6 @@ public void createEntities () EntityRegistry.registerModEntity(Crystal.class, "Crystal", 2, TConstruct.instance, 32, 3, true); EntityRegistry.registerModEntity(LaunchedPotion.class, "Launched Potion", 3, TConstruct.instance, 32, 3, true); EntityRegistry.registerModEntity(ArrowEntity.class, "Arrow", 4, TConstruct.instance, 32, 5, true); - EntityRegistry.registerModEntity(EntityLandmineFirework.class, "LandmineFirework", 5, TConstruct.instance, 32, 5, true); - EntityRegistry.registerModEntity(ExplosivePrimed.class, "SlimeExplosive", 6, TConstruct.instance, 32, 5, true); // EntityRegistry.registerModEntity(CartEntity.class, "Small Wagon", 1, // TConstruct.instance, 32, 5, true); @@ -322,31 +323,31 @@ private void craftingTableRecipes() String[] patSurround = { "###", "#m#", "###" }; // Metal conversion Recipes - GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 3), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 9)); // Copper - GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 5), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 10)); // Tin - GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 6), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 11)); // Aluminum + GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 3), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 9)); // Copper + GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 5), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 10)); // Tin + GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 6), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 11)); // Aluminum // GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 6), // patBlock, '#', new ItemStack(TRepo.materials, 1, 12)); // Aluminum - GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 4), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 13)); // Bronze - GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 7), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 14)); // AluBrass - GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 0), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 3)); // Cobalt - GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 1), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 4)); // Ardite - GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 2), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 5)); // Manyullyn - GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 8), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 15)); // Alumite - GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 9), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 16)); // Steel + GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 4), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 13)); // Bronze + GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 7), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 14)); // AluBrass + GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 0), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 3)); // Cobalt + GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 1), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 4)); // Ardite + GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 2), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 5)); // Manyullyn + GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 8), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 15)); // Alumite + GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 9), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 16)); // Steel GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 1, 11), "#", '#', new ItemStack(TinkerTools.materials, 1, 12)); // Aluminum raw -> // ingot - GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 9), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 3)); // Copper - GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 10), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 5)); // Tin - GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 11), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 6)); // Aluminum - GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 13), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 4)); // Bronze - GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 14), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 7)); // AluBrass - GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 3), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 0)); // Cobalt - GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 4), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 1)); // Ardite - GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 5), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 2)); // Manyullyn - GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 15), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 8)); // Alumite - GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 16), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 9)); // Steel + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 9), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 3)); // Copper + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 10), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 5)); // Tin + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 11), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 6)); // Aluminum + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 13), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 4)); // Bronze + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 14), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 7)); // AluBrass + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 3), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 0)); // Cobalt + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 4), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 1)); // Ardite + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 5), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 2)); // Manyullyn + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 15), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 8)); // Alumite + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 16), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 9)); // Steel GameRegistry.addRecipe(new ItemStack(Items.iron_ingot), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 19)); // Iron GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 1, 9), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 20)); // Copper @@ -404,17 +405,6 @@ private void craftingTableRecipes() GameRegistry.addRecipe(new ItemStack(Items.clock), " i ", "iri", " i ", 'i', aluBrass, 'r', new ItemStack(Items.redstone)); // Gold Pressure Plate - Vanilla alternativ GameRegistry.addRecipe(new ItemStack(Blocks.light_weighted_pressure_plate), "ii", 'i', aluBrass); - - - // Landmine Recipes - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 0), "mcm", "rpr", 'm', "plankWood", 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r', Items.redstone, - 'p', Blocks.stone_pressure_plate)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 1), "mcm", "rpr", 'm', Blocks.stone, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r', Items.redstone, - 'p', Blocks.stone_pressure_plate)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 2), "mcm", "rpr", 'm', Blocks.obsidian, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r', - Items.redstone, 'p', Blocks.stone_pressure_plate)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 3), "mcm", "rpr", 'm', Items.repeater, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r', - Items.redstone, 'p', Blocks.stone_pressure_plate)); // Ultra hardcore recipes GameRegistry.addRecipe(new ItemStack(TinkerTools.goldHead), patSurround, '#', new ItemStack(Items.gold_ingot), 'm', new ItemStack(Items.skull, 1, 3)); @@ -437,9 +427,6 @@ private void craftingTableRecipes() GameRegistry.addRecipe(new ItemStack(TinkerWorld.barricadeJungle, 1, 0), "b", "b", 'b', new ItemStack(Blocks.log, 1, 3)); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerWorld.barricadeOak, 1, 0), "b", "b", 'b', "logWood")); - - - // EssenceExtractor Recipe // Slime Recipes GameRegistry.addRecipe(new ItemStack(TinkerWorld.slimeGel, 1, 0), "##", "##", '#', TinkerWorld.strangeFood); GameRegistry.addRecipe(new ItemStack(TinkerWorld.strangeFood, 4, 0), "#", '#', new ItemStack(TinkerWorld.slimeGel, 1, 0)); @@ -455,6 +442,9 @@ private void craftingTableRecipes() TinkerWorld.strangeFood, 1, 1), new ItemStack(TinkerWorld.strangeFood, 1, 1), new ItemStack(Items.redstone)); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkerWorld.slimeChannel, 1, 0), "slimeball", "slimeball", "slimeball", "slimeball", new ItemStack(Items.redstone))); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkerWorld.slimePad, 1, 0), TinkerWorld.slimeChannel, "slimeball")); + + OreDictionary.registerOre("hambone", new ItemStack(TinkerWorld.meatBlock)); + GameRegistry.addRecipe(new ItemStack(TinkerWorld.meatBlock), "mmm", "mbm", "mmm", 'b', new ItemStack(Items.bone), 'm', new ItemStack(Items.porkchop)); } private void addRecipesForFurnace () @@ -535,19 +525,19 @@ public void oreRegistry () OreDictionary.registerOre("ingotPigIron", new ItemStack(TinkerTools.materials, 1, 34)); OreDictionary.registerOre("itemRawRubber", new ItemStack(TinkerTools.materials, 1, 36)); - OreDictionary.registerOre("blockCobalt", new ItemStack(TinkerSmeltery.metalBlock, 1, 0)); - OreDictionary.registerOre("blockArdite", new ItemStack(TinkerSmeltery.metalBlock, 1, 1)); - OreDictionary.registerOre("blockManyullyn", new ItemStack(TinkerSmeltery.metalBlock, 1, 2)); - OreDictionary.registerOre("blockCopper", new ItemStack(TinkerSmeltery.metalBlock, 1, 3)); - OreDictionary.registerOre("blockBronze", new ItemStack(TinkerSmeltery.metalBlock, 1, 4)); - OreDictionary.registerOre("blockTin", new ItemStack(TinkerSmeltery.metalBlock, 1, 5)); - OreDictionary.registerOre("blockAluminum", new ItemStack(TinkerSmeltery.metalBlock, 1, 6)); - OreDictionary.registerOre("blockAluminium", new ItemStack(TinkerSmeltery.metalBlock, 1, 6)); - OreDictionary.registerOre("blockAluminumBrass", new ItemStack(TinkerSmeltery.metalBlock, 1, 7)); - OreDictionary.registerOre("blockAluminiumBrass", new ItemStack(TinkerSmeltery.metalBlock, 1, 7)); - OreDictionary.registerOre("blockAlumite", new ItemStack(TinkerSmeltery.metalBlock, 1, 8)); - OreDictionary.registerOre("blockSteel", new ItemStack(TinkerSmeltery.metalBlock, 1, 9)); - OreDictionary.registerOre("blockEnder", new ItemStack(TinkerSmeltery.metalBlock, 1, 10)); + OreDictionary.registerOre("blockCobalt", new ItemStack(TinkerWorld.metalBlock, 1, 0)); + OreDictionary.registerOre("blockArdite", new ItemStack(TinkerWorld.metalBlock, 1, 1)); + OreDictionary.registerOre("blockManyullyn", new ItemStack(TinkerWorld.metalBlock, 1, 2)); + OreDictionary.registerOre("blockCopper", new ItemStack(TinkerWorld.metalBlock, 1, 3)); + OreDictionary.registerOre("blockBronze", new ItemStack(TinkerWorld.metalBlock, 1, 4)); + OreDictionary.registerOre("blockTin", new ItemStack(TinkerWorld.metalBlock, 1, 5)); + OreDictionary.registerOre("blockAluminum", new ItemStack(TinkerWorld.metalBlock, 1, 6)); + OreDictionary.registerOre("blockAluminium", new ItemStack(TinkerWorld.metalBlock, 1, 6)); + OreDictionary.registerOre("blockAluminumBrass", new ItemStack(TinkerWorld.metalBlock, 1, 7)); + OreDictionary.registerOre("blockAluminiumBrass", new ItemStack(TinkerWorld.metalBlock, 1, 7)); + OreDictionary.registerOre("blockAlumite", new ItemStack(TinkerWorld.metalBlock, 1, 8)); + OreDictionary.registerOre("blockSteel", new ItemStack(TinkerWorld.metalBlock, 1, 9)); + OreDictionary.registerOre("blockEnder", new ItemStack(TinkerWorld.metalBlock, 1, 10)); ensureOreIsRegistered("blockIron", new ItemStack(Blocks.iron_block)); ensureOreIsRegistered("blockGold", new ItemStack(Blocks.gold_block));