From d67ec64707414df6f78f45ec1710b4ec3fc1ef66 Mon Sep 17 00:00:00 2001 From: Lance5057 Date: Mon, 5 Oct 2015 00:02:32 -0500 Subject: Refactor and Compartmentalize all the codes! --- src/main/java/gmail/Lance5057/Reference.java | 10 - src/main/java/gmail/Lance5057/TD_Config.java | 45 -- src/main/java/gmail/Lance5057/TinkersDefense.java | 758 --------------------- .../gmail/Lance5057/armor/items/ChainArmor.java | 78 --- .../gmail/Lance5057/armor/items/ClothArmor.java | 78 --- .../java/gmail/Lance5057/armor/items/Sheath.java | 110 --- .../gmail/Lance5057/armor/items/TinkerArmor.java | 78 --- .../gmail/Lance5057/armor/parts/Item_Cloth.java | 52 -- .../Lance5057/armor/parts/Item_Glowthread.java | 52 -- .../gmail/Lance5057/armor/parts/Item_Thread.java | 52 -- .../Lance5057/armor/renderers/ModelChainArmor.java | 170 ----- .../Lance5057/armor/renderers/ModelClothArmor.java | 286 -------- .../Lance5057/armor/renderers/ModelSheath.java | 105 --- .../armor/renderers/ModelTinkerArmor.java | 109 --- .../gmail/Lance5057/blocks/AeonSteelBlock.java | 15 - .../java/gmail/Lance5057/blocks/CrestMount.java | 150 ---- .../gmail/Lance5057/blocks/DogbeariumBlock.java | 15 - .../gmail/Lance5057/blocks/FinishingAnvil.java | 150 ---- .../java/gmail/Lance5057/blocks/JewelersBench.java | 50 -- .../gmail/Lance5057/blocks/QueensGoldBlock.java | 15 - .../Lance5057/containers/Container_CrestMount.java | 46 -- .../containers/Container_FinishingAnvil.java | 41 -- .../gmail/Lance5057/events/TDEventHandler.java | 84 --- .../java/gmail/Lance5057/gui/Gui_CrestMount.java | 89 --- .../gmail/Lance5057/gui/Gui_FinishingAnvil.java | 235 ------- .../Lance5057/gui/RenderItem_FinishingAnvil.java | 43 -- .../java/gmail/Lance5057/items/AeonSteelIngot.java | 12 - .../java/gmail/Lance5057/items/Crest_Feathers.java | 5 - .../gmail/Lance5057/items/DogbeariumIngot.java | 11 - src/main/java/gmail/Lance5057/items/Injector.java | 172 ----- .../gmail/Lance5057/items/QueensGoldIngot.java | 11 - .../java/gmail/Lance5057/items/RoyalGuard.java | 42 -- .../java/gmail/Lance5057/items/TD_Patterns.java | 50 -- .../gmail/Lance5057/items/tools/ArmorCore.java | 26 - .../gmail/Lance5057/items/tools/HeaterShield.java | 163 ----- .../gmail/Lance5057/items/tools/RoundShield.java | 156 ----- .../java/gmail/Lance5057/items/tools/Shield.java | 263 ------- .../gmail/Lance5057/items/tools/TinkerWrench.java | 122 ---- .../Lance5057/items/tools/TinkerZweihander.java | 97 --- .../Lance5057/liquids/moltenAeonsteelFluid.java | 59 -- .../Lance5057/liquids/moltenDogbeariumFluid.java | 59 -- .../Lance5057/liquids/moltenQueensGoldFluid.java | 59 -- .../gmail/Lance5057/models/ModelArmorAnvil.java | 61 -- .../gmail/Lance5057/models/ModelCrestMount.java | 87 --- .../gmail/Lance5057/models/ModelJewelersBench.java | 100 --- .../Lance5057/models/Renderer_ArmorAnvil.java | 43 -- .../Lance5057/models/Renderer_CrestMount.java | 210 ------ .../Lance5057/models/Renderer_JewelersBench.java | 41 -- .../Lance5057/modifiers/TDefenseActiveToolMod.java | 86 --- .../gmail/Lance5057/modifiers/modifierDaze.java | 97 --- .../modifiers/shields/modifierCrestofBlades.java | 92 --- .../modifiers/shields/modifierCrestofFeathers.java | 119 ---- .../modifiers/shields/modifierCrestofLegends.java | 60 -- .../modifiers/shields/modifierCrestofMirrors.java | 64 -- .../Lance5057/network/Handler_CrestMount.java | 24 - .../Lance5057/network/Handler_FinishingAnvil.java | 26 - .../Lance5057/network/Message_CrestMount.java | 56 -- .../Lance5057/network/Message_FinishingAnvil.java | 56 -- .../gmail/Lance5057/network/PacketHandler.java | 15 - .../java/gmail/Lance5057/proxy/ClientProxy.java | 57 -- .../java/gmail/Lance5057/proxy/CommonProxy.java | 72 -- .../tileentities/TileEntity_CrestMount.java | 199 ------ .../tileentities/TileEntity_FinishingAnvil.java | 176 ----- .../tileentities/TileEntity_JewelersBench.java | 8 - 64 files changed, 5972 deletions(-) delete mode 100644 src/main/java/gmail/Lance5057/Reference.java delete mode 100644 src/main/java/gmail/Lance5057/TD_Config.java delete mode 100644 src/main/java/gmail/Lance5057/TinkersDefense.java delete mode 100644 src/main/java/gmail/Lance5057/armor/items/ChainArmor.java delete mode 100644 src/main/java/gmail/Lance5057/armor/items/ClothArmor.java delete mode 100644 src/main/java/gmail/Lance5057/armor/items/Sheath.java delete mode 100644 src/main/java/gmail/Lance5057/armor/items/TinkerArmor.java delete mode 100644 src/main/java/gmail/Lance5057/armor/parts/Item_Cloth.java delete mode 100644 src/main/java/gmail/Lance5057/armor/parts/Item_Glowthread.java delete mode 100644 src/main/java/gmail/Lance5057/armor/parts/Item_Thread.java delete mode 100644 src/main/java/gmail/Lance5057/armor/renderers/ModelChainArmor.java delete mode 100644 src/main/java/gmail/Lance5057/armor/renderers/ModelClothArmor.java delete mode 100644 src/main/java/gmail/Lance5057/armor/renderers/ModelSheath.java delete mode 100644 src/main/java/gmail/Lance5057/armor/renderers/ModelTinkerArmor.java delete mode 100644 src/main/java/gmail/Lance5057/blocks/AeonSteelBlock.java delete mode 100644 src/main/java/gmail/Lance5057/blocks/CrestMount.java delete mode 100644 src/main/java/gmail/Lance5057/blocks/DogbeariumBlock.java delete mode 100644 src/main/java/gmail/Lance5057/blocks/FinishingAnvil.java delete mode 100644 src/main/java/gmail/Lance5057/blocks/JewelersBench.java delete mode 100644 src/main/java/gmail/Lance5057/blocks/QueensGoldBlock.java delete mode 100644 src/main/java/gmail/Lance5057/containers/Container_CrestMount.java delete mode 100644 src/main/java/gmail/Lance5057/containers/Container_FinishingAnvil.java delete mode 100644 src/main/java/gmail/Lance5057/events/TDEventHandler.java delete mode 100644 src/main/java/gmail/Lance5057/gui/Gui_CrestMount.java delete mode 100644 src/main/java/gmail/Lance5057/gui/Gui_FinishingAnvil.java delete mode 100644 src/main/java/gmail/Lance5057/gui/RenderItem_FinishingAnvil.java delete mode 100644 src/main/java/gmail/Lance5057/items/AeonSteelIngot.java delete mode 100644 src/main/java/gmail/Lance5057/items/Crest_Feathers.java delete mode 100644 src/main/java/gmail/Lance5057/items/DogbeariumIngot.java delete mode 100644 src/main/java/gmail/Lance5057/items/Injector.java delete mode 100644 src/main/java/gmail/Lance5057/items/QueensGoldIngot.java delete mode 100644 src/main/java/gmail/Lance5057/items/RoyalGuard.java delete mode 100644 src/main/java/gmail/Lance5057/items/TD_Patterns.java delete mode 100644 src/main/java/gmail/Lance5057/items/tools/ArmorCore.java delete mode 100644 src/main/java/gmail/Lance5057/items/tools/HeaterShield.java delete mode 100644 src/main/java/gmail/Lance5057/items/tools/RoundShield.java delete mode 100644 src/main/java/gmail/Lance5057/items/tools/Shield.java delete mode 100644 src/main/java/gmail/Lance5057/items/tools/TinkerWrench.java delete mode 100644 src/main/java/gmail/Lance5057/items/tools/TinkerZweihander.java delete mode 100644 src/main/java/gmail/Lance5057/liquids/moltenAeonsteelFluid.java delete mode 100644 src/main/java/gmail/Lance5057/liquids/moltenDogbeariumFluid.java delete mode 100644 src/main/java/gmail/Lance5057/liquids/moltenQueensGoldFluid.java delete mode 100644 src/main/java/gmail/Lance5057/models/ModelArmorAnvil.java delete mode 100644 src/main/java/gmail/Lance5057/models/ModelCrestMount.java delete mode 100644 src/main/java/gmail/Lance5057/models/ModelJewelersBench.java delete mode 100644 src/main/java/gmail/Lance5057/models/Renderer_ArmorAnvil.java delete mode 100644 src/main/java/gmail/Lance5057/models/Renderer_CrestMount.java delete mode 100644 src/main/java/gmail/Lance5057/models/Renderer_JewelersBench.java delete mode 100644 src/main/java/gmail/Lance5057/modifiers/TDefenseActiveToolMod.java delete mode 100644 src/main/java/gmail/Lance5057/modifiers/modifierDaze.java delete mode 100644 src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofBlades.java delete mode 100644 src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofFeathers.java delete mode 100644 src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofLegends.java delete mode 100644 src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofMirrors.java delete mode 100644 src/main/java/gmail/Lance5057/network/Handler_CrestMount.java delete mode 100644 src/main/java/gmail/Lance5057/network/Handler_FinishingAnvil.java delete mode 100644 src/main/java/gmail/Lance5057/network/Message_CrestMount.java delete mode 100644 src/main/java/gmail/Lance5057/network/Message_FinishingAnvil.java delete mode 100644 src/main/java/gmail/Lance5057/network/PacketHandler.java delete mode 100644 src/main/java/gmail/Lance5057/proxy/ClientProxy.java delete mode 100644 src/main/java/gmail/Lance5057/proxy/CommonProxy.java delete mode 100644 src/main/java/gmail/Lance5057/tileentities/TileEntity_CrestMount.java delete mode 100644 src/main/java/gmail/Lance5057/tileentities/TileEntity_FinishingAnvil.java delete mode 100644 src/main/java/gmail/Lance5057/tileentities/TileEntity_JewelersBench.java (limited to 'src/main/java/gmail') diff --git a/src/main/java/gmail/Lance5057/Reference.java b/src/main/java/gmail/Lance5057/Reference.java deleted file mode 100644 index d7e6158..0000000 --- a/src/main/java/gmail/Lance5057/Reference.java +++ /dev/null @@ -1,10 +0,0 @@ -package gmail.Lance5057; - -public class Reference -{ - - public static final String MOD_ID = "tinkersdefense"; - public static final String VERSION = "1.2"; - public static final String MOD_NAME = "Tinkers' Defense"; - -} diff --git a/src/main/java/gmail/Lance5057/TD_Config.java b/src/main/java/gmail/Lance5057/TD_Config.java deleted file mode 100644 index 73c617b..0000000 --- a/src/main/java/gmail/Lance5057/TD_Config.java +++ /dev/null @@ -1,45 +0,0 @@ -package gmail.Lance5057; - -import java.util.Vector; - -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.common.config.Property; - -public class TD_Config -{ - public int AeonsteelMatID; - public int QueensGoldMatID; - public int DogbeariumMatID; - - public int DazeID; - public int CrestFeathersID; - public int CrestMirrorsID; - public int CrestLegendsID; - public int CrestBladesID; - - public int MaterialIndex; - - public TD_Config(FMLPreInitializationEvent e) - { - Configuration config = new Configuration(e.getSuggestedConfigurationFile()); - - config.load(); - - AeonsteelMatID = config.get("Material Configs", "Aeonsteel Material ID", 201).getInt(); - QueensGoldMatID = config.get("Material Configs", "QueensGold Material ID", 202).getInt(); - DogbeariumMatID = config.get("Material Configs", "Dogbearium Material ID", 203).getInt(); - - DazeID = config.get("Modifier Configs", "Daze ID", 18).getInt(); - CrestFeathersID = config.get("Modifier Configs", "Crest of Feathers ID", 19).getInt(); - CrestMirrorsID = config.get("Modifier Configs", "Crest of Mirrors ID", 20).getInt(); - CrestLegendsID = config.get("Modifier Configs", "Crest of Legends ID", 21).getInt(); - CrestLegendsID = config.get("Modifier Configs", "Crest of Legends ID", 22).getInt(); - - MaterialIndex = config.get("Material Index", "Highest material ID -\n TDefense - 204\n MFR - 1001\n ExtraTIC - 1024", 204).getInt(); - - - - config.save(); - } -} diff --git a/src/main/java/gmail/Lance5057/TinkersDefense.java b/src/main/java/gmail/Lance5057/TinkersDefense.java deleted file mode 100644 index 55dcb82..0000000 --- a/src/main/java/gmail/Lance5057/TinkersDefense.java +++ /dev/null @@ -1,758 +0,0 @@ -package gmail.Lance5057; - -import static net.minecraft.util.EnumChatFormatting.DARK_RED; -import static net.minecraft.util.EnumChatFormatting.GOLD; -import static net.minecraft.util.EnumChatFormatting.LIGHT_PURPLE; -import gmail.Lance5057.armor.items.ChainArmor; -import gmail.Lance5057.armor.items.ClothArmor; -import gmail.Lance5057.armor.items.Sheath; -import gmail.Lance5057.armor.items.TinkerArmor; -import gmail.Lance5057.armor.parts.Item_Cloth; -import gmail.Lance5057.armor.parts.Item_Glowthread; -import gmail.Lance5057.armor.parts.Item_Thread; -import gmail.Lance5057.blocks.AeonSteelBlock; -import gmail.Lance5057.blocks.CrestMount; -import gmail.Lance5057.blocks.DogbeariumBlock; -import gmail.Lance5057.blocks.FinishingAnvil; -import gmail.Lance5057.blocks.JewelersBench; -import gmail.Lance5057.blocks.QueensGoldBlock; -import gmail.Lance5057.events.TDEventHandler; -import gmail.Lance5057.items.AeonSteelIngot; -import gmail.Lance5057.items.DogbeariumIngot; -import gmail.Lance5057.items.Injector; -import gmail.Lance5057.items.QueensGoldIngot; -import gmail.Lance5057.items.TD_Patterns; -import gmail.Lance5057.items.tools.HeaterShield; -import gmail.Lance5057.items.tools.RoundShield; -import gmail.Lance5057.items.tools.TinkerWrench; -import gmail.Lance5057.items.tools.TinkerZweihander; -import gmail.Lance5057.liquids.moltenAeonsteelFluid; -import gmail.Lance5057.liquids.moltenDogbeariumFluid; -import gmail.Lance5057.liquids.moltenQueensGoldFluid; -import gmail.Lance5057.modifiers.TDefenseActiveToolMod; -import gmail.Lance5057.modifiers.modifierDaze; -import gmail.Lance5057.modifiers.shields.modifierCrestofBlades; -import gmail.Lance5057.modifiers.shields.modifierCrestofFeathers; -import gmail.Lance5057.modifiers.shields.modifierCrestofLegends; -import gmail.Lance5057.modifiers.shields.modifierCrestofMirrors; -import gmail.Lance5057.network.PacketHandler; -import gmail.Lance5057.proxy.CommonProxy; -import gmail.Lance5057.tileentities.TileEntity_CrestMount; -import gmail.Lance5057.tileentities.TileEntity_FinishingAnvil; -import gmail.Lance5057.tileentities.TileEntity_JewelersBench; -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.Item; -import net.minecraft.item.ItemArmor.ArmorMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import tconstruct.TConstruct; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.client.TConstructClientRegistry; -import tconstruct.library.client.ToolGuiElement; -import tconstruct.library.crafting.FluidType; -import tconstruct.library.crafting.LiquidCasting; -import tconstruct.library.crafting.ModifyBuilder; -import tconstruct.library.crafting.PatternBuilder; -import tconstruct.library.crafting.Smeltery; -import tconstruct.library.crafting.StencilBuilder; -import tconstruct.library.tools.DynamicToolPart; -import tconstruct.library.tools.ToolCore; -import tconstruct.smeltery.TinkerSmeltery; -import tconstruct.tools.TinkerTools; -import tconstruct.tools.items.Pattern; -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.network.simpleimpl.SimpleNetworkWrapper; -import cpw.mods.fml.common.registry.GameRegistry; - -@Mod(modid = Reference.MOD_ID, version = Reference.VERSION, name = Reference.MOD_NAME) -public class TinkersDefense { - - private static int modGuiIndex = 0; - public static final int GUI_CREST_INV = modGuiIndex++; - public static final int GUI_ANVIL_INV = modGuiIndex++; - - @Instance(Reference.MOD_ID) - public static TinkersDefense instance = new TinkersDefense(); - - public static CreativeTabs tabName = new CreativeTabs("tabName") { - - public Item getTabIconItem() { - return TinkersDefense.tabIcon; - } - - }; - - public static TDEventHandler TDevents; - - public static TD_Config config; - - public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE - .newSimpleChannel(Reference.MOD_ID); - - public static Item tabIcon; - - public static Item item_AeonSteelIngot; - public static Block block_AeonSteelBlock; - - public static Fluid moltenAeonsteel; - public static Block moltenAeonsteelBlock; - - public static Item item_QueensGoldIngot; - public static Block block_QueensGoldBlock; - - public static Fluid moltenQueensGold; - public static Block moltenQueensGoldBlock; - - public static Item item_DogbeariumIngot; - public static Block block_DogbeariumBlock; - - public static Fluid moltenDogbearium; - public static Block moltenDogbeariumBlock; - - public static ToolCore tool_roundShield; - public static ToolCore tool_heaterShield; - public static ToolCore tool_wrench; - public static ToolCore tool_sheath; - public static ToolCore tool_zweihander; - - public static Block block_CrestMount; - public static Block block_ArmorAnvil; - public static Block block_JewelersBench; - - public static Item item_TinkerArmor; - public static Item item_ChainArmor; - public static Item item_ClothArmor; - - - public static Item item_thread; - public static Item item_glowthread; - public static Item item_cloth; - - public static Item item_relic; - - public static Pattern woodPattern; - public static Pattern metalPattern; - - public static Item partRivet; - public static Item partArmorplate; - public static Item partClasp; - public static Item partCloth; - public static Item partChainmaille; - - public static Injector tcInject; - - @SidedProxy(clientSide = "gmail.Lance5057.proxy.ClientProxy", serverSide = "gmail.Lance5057.proxy.CommonProxy") - public static CommonProxy proxy; - - @EventHandler - public void preInit(FMLPreInitializationEvent e) { - PacketHandler.init(); - //TDevents = new TDEventHandler(); - config = new TD_Config(e); - - - block_CrestMount = new CrestMount().setHardness(4.0F) - .setStepSound(Block.soundTypeStone).setBlockName("CrestMount") - .setCreativeTab(tabName); - - GameRegistry.registerBlock(block_CrestMount, "Block_CrestMount"); - GameRegistry.registerTileEntity(TileEntity_CrestMount.class, - "Tile_CrestMount"); - - GameRegistry.addShapedRecipe(new ItemStack(block_CrestMount), - new Object[] { "xxx", "-i-", "---", 'x', - new ItemStack(TinkerTools.toughRod, 1, 1), 'i', - new ItemStack(TinkerTools.toolRod, 1, 1) }); - - block_ArmorAnvil = new FinishingAnvil().setHardness(4.0F) - .setStepSound(Block.soundTypeAnvil).setBlockName("ArmorAnvil") - .setCreativeTab(tabName); - - GameRegistry.registerBlock(block_ArmorAnvil, "Block_ArmorAnvil"); - GameRegistry.registerTileEntity(TileEntity_FinishingAnvil.class, - "Tile_ArmorAnvil"); - - block_JewelersBench = new JewelersBench().setHardness(4.0F) - .setStepSound(Block.soundTypeWood) - .setBlockName("JewelersBench").setCreativeTab(tabName); - - GameRegistry.registerBlock(block_JewelersBench, "Block_JewelersBench"); - GameRegistry.registerTileEntity(TileEntity_JewelersBench.class, - "Tile_JewelersBench"); - - NetworkRegistry.INSTANCE.registerGuiHandler(TinkersDefense.instance, - new CommonProxy()); - MinecraftForge.EVENT_BUS.register(this); - - tabIcon = new Item().setMaxStackSize(1).setCreativeTab(tabName).setUnlocalizedName("tabIcon").setTextureName(Reference.MOD_ID + ":Icon"); - GameRegistry.registerItem(tabIcon, "tabIcon"); - - item_relic = new Item().setCreativeTab(tabName).setMaxStackSize(1) - .setUnlocalizedName("AncientRelic") - .setTextureName(Reference.MOD_ID + ":AncientRelic"); - - GameRegistry.registerItem(item_relic, "Ancient Relic"); - - // AeonSteel - item_AeonSteelIngot = new AeonSteelIngot().setCreativeTab(tabName) - .setMaxStackSize(64).setUnlocalizedName("AeonSteelIngot") - .setTextureName(Reference.MOD_ID + ":AeonSteelIngot"); - - GameRegistry.registerItem(item_AeonSteelIngot, "AeonSteel Ingot"); - - block_AeonSteelBlock = new AeonSteelBlock(Material.iron) - .setHardness(4.0F).setStepSound(Block.soundTypeMetal) - .setBlockName("AeonSteelBlock").setCreativeTab(tabName) - .setBlockTextureName(Reference.MOD_ID + ":AeonSteelBlock"); - - GameRegistry.registerBlock(block_AeonSteelBlock, "aeonsteelblock"); - - GameRegistry.addShapedRecipe(new ItemStack(block_AeonSteelBlock), - new Object[] { "xxx", "xxx", "xxx", 'x', item_AeonSteelIngot }); - GameRegistry.addShapelessRecipe(new ItemStack(item_AeonSteelIngot, 9), - new Object[] { new ItemStack(block_AeonSteelBlock) }); - - moltenAeonsteel = new Fluid("moltenAeonsteel").setLuminosity(15) - .setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidRegistry.registerFluid(moltenAeonsteel); - - moltenAeonsteelFluid moltenAeonsteelBlock = new moltenAeonsteelFluid( - moltenAeonsteel); - - GameRegistry.registerBlock(moltenAeonsteelBlock, "moltenaeonsteel"); - - // Queen's Gold - item_QueensGoldIngot = new QueensGoldIngot().setCreativeTab(tabName) - .setMaxStackSize(64).setUnlocalizedName("QueensGoldIngot") - .setTextureName(Reference.MOD_ID + ":QueensGoldIngot"); - - GameRegistry.registerItem(item_QueensGoldIngot, "Queen's Gold Ingot"); - - block_QueensGoldBlock = new QueensGoldBlock(Material.iron) - .setHardness(4.0F).setStepSound(Block.soundTypeMetal) - .setBlockName("QueensGoldBlock").setCreativeTab(tabName) - .setBlockTextureName(Reference.MOD_ID + ":QueensGoldBlock"); - - GameRegistry.registerBlock(block_QueensGoldBlock, "QueensGoldblock"); - - GameRegistry - .addShapedRecipe(new ItemStack(block_QueensGoldBlock), - new Object[] { "xxx", "xxx", "xxx", 'x', - item_QueensGoldIngot }); - GameRegistry.addShapelessRecipe(new ItemStack(item_QueensGoldIngot, 9), - new Object[] { new ItemStack(block_QueensGoldBlock) }); - - moltenQueensGold = new Fluid("moltenQueensGold").setLuminosity(15) - .setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidRegistry.registerFluid(moltenQueensGold); - - moltenQueensGoldFluid moltenQueensGoldBlock = new moltenQueensGoldFluid( - moltenQueensGold); - - GameRegistry.registerBlock(moltenQueensGoldBlock, "moltenQueensGold"); - - // Dogbearium - item_DogbeariumIngot = new DogbeariumIngot().setCreativeTab(tabName) - .setMaxStackSize(64).setUnlocalizedName("DogbeariumIngot") - .setTextureName(Reference.MOD_ID + ":DogbeariumIngot"); - - GameRegistry.registerItem(item_DogbeariumIngot, "DogbeariumIngot"); - - block_DogbeariumBlock = new DogbeariumBlock(Material.iron) - .setHardness(4.0F).setStepSound(Block.soundTypeMetal) - .setBlockName("DogbeariumBlock").setCreativeTab(tabName) - .setBlockTextureName(Reference.MOD_ID + ":DogbeariumBlock"); - - GameRegistry.registerBlock(block_DogbeariumBlock, "Dogbeariumblock"); - - GameRegistry - .addShapedRecipe(new ItemStack(block_DogbeariumBlock), - new Object[] { "xxx", "xxx", "xxx", 'x', - item_DogbeariumIngot }); - GameRegistry.addShapelessRecipe(new ItemStack(item_DogbeariumIngot, 9), - new Object[] { new ItemStack(block_DogbeariumBlock) }); - - moltenDogbearium = new Fluid("moltenDogbearium").setLuminosity(15) - .setDensity(3000).setViscosity(6000).setTemperature(1300); - FluidRegistry.registerFluid(moltenDogbearium); - - moltenDogbeariumFluid moltenDogbeariumBlock = new moltenDogbeariumFluid( - moltenDogbearium); - - GameRegistry.registerBlock(moltenDogbeariumBlock, "moltenDogbearium"); - - tool_roundShield = new RoundShield(); - tool_heaterShield = new HeaterShield(); - - tool_wrench = new TinkerWrench(); - tool_sheath = new Sheath(); - - tool_zweihander = new TinkerZweihander(0); - - //Register Tools - GameRegistry.registerItem(tool_roundShield, "Round Shield"); - GameRegistry.registerItem(tool_heaterShield, "Heater Shield"); - GameRegistry.registerItem(tool_wrench, "Tinker Wrench"); - GameRegistry.registerItem(tool_sheath, "Sheath"); - GameRegistry.registerItem(tool_zweihander, "Zweihander"); - - //Add Tools to TiCo directory - TConstructRegistry.addItemToDirectory("Round Shield", tool_roundShield); - TConstructRegistry.addItemToDirectory("Heater Shield", tool_heaterShield); - TConstructRegistry.addItemToDirectory("Tinker Wrench", tool_wrench); - TConstructRegistry.addItemToDirectory("Sheath", tool_sheath); - TConstructRegistry.addItemToDirectory("Zweihander", tool_zweihander); - - //Register Items - GameRegistry.registerItem(item_thread = new Item_Thread(), "thread"); - GameRegistry.registerItem(item_glowthread = new Item_Glowthread(), - "glowthread"); - GameRegistry.registerItem(item_cloth = new Item_Cloth(), "cloth"); - - woodPattern = new TD_Patterns("pattern_", "Pattern"); - metalPattern = new TD_Patterns("cast_", "MetalPattern"); - - GameRegistry.registerItem(woodPattern, "Pattern"); - // TConstructRegistry.addItemToDirectory("woodPattern", woodPattern); - - GameRegistry.registerItem(metalPattern, "Cast"); - - TConstructRegistry.addItemStackToDirectory("rivets Pattern", - new ItemStack(woodPattern, 1, 0)); - TConstructRegistry.addItemStackToDirectory("clasp Pattern", - new ItemStack(woodPattern, 1, 1)); - TConstructRegistry.addItemStackToDirectory("armorplate Pattern", - new ItemStack(woodPattern, 1, 2)); - - // Renderers - proxy.registerRenderers(); - - item_TinkerArmor = new TinkerArmor(ArmorMaterial.IRON, 4, - 1).setUnlocalizedName("Tinker_Armor"); - GameRegistry.registerItem(item_TinkerArmor,"Tinker Armor"); - - item_ChainArmor = new ChainArmor(ArmorMaterial.IRON, 4, - 1).setUnlocalizedName("Chain_Armor"); - GameRegistry.registerItem(item_ChainArmor,"Chain Armor"); - - item_ClothArmor = new ClothArmor(ArmorMaterial.IRON, 4, - 1).setUnlocalizedName("Cloth_Armor"); - GameRegistry.registerItem(item_ClothArmor,"Cloth Armor"); - - //tool_Sheath = new Sheath().setUnlocalizedName("Sheath"); - - - // network.registerMessage(messageHandler, requestMessageType, - // discriminator, side); - - - } - - @EventHandler - public void init(FMLInitializationEvent e) { - System.out.print(Reference.MOD_ID); - - StencilBuilder.registerStencil(50, woodPattern, 0); // rivets - StencilBuilder.registerStencil(51, woodPattern, 1); // clasp - StencilBuilder.registerStencil(52, woodPattern, 2); // armorplate - StencilBuilder.registerStencil(53, woodPattern, 3); // cloth - StencilBuilder.registerStencil(54, woodPattern, 4); // chainmaille - - PatternBuilder.instance.addToolPattern(woodPattern); - - partRivet = new DynamicToolPart("_rivets", "Rivets"); - GameRegistry.registerItem(partRivet, "RivetPart"); - - partClasp = new DynamicToolPart("_clasp", "Clasp"); - GameRegistry.registerItem(partClasp, "ClaspPart"); - - partArmorplate = new DynamicToolPart("_armorplate", "Armor Plate"); - GameRegistry.registerItem(partArmorplate, "ArmorPlatePart"); - - partCloth = new DynamicToolPart("_cloth", "Cloth"); - GameRegistry.registerItem(partCloth, "clothPart"); - - partChainmaille = new DynamicToolPart("_chainmaille", "Chainmaille"); - GameRegistry.registerItem(partChainmaille, "chainmaillePart"); - - buildParts(partRivet, 0); - buildParts(partClasp, 1); - buildParts(partArmorplate, 2); - buildParts(partCloth, 3); - buildParts(partChainmaille, 4); - - PatternBuilder pb = PatternBuilder.instance; - - ModifyBuilder.registerModifier(new modifierDaze("Daze", config.DazeID, new ItemStack[] { new ItemStack(Blocks.light_weighted_pressure_plate), new ItemStack(Items.potionitem,1,8202)}, - new int[] {1,0})); - - ModifyBuilder.registerModifier(new modifierCrestofFeathers("Crest of Feathers", config.CrestFeathersID, new ItemStack[] { new ItemStack(Items.feather)}, - new int[] {1})); - - ModifyBuilder.registerModifier(new modifierCrestofMirrors("Crest of Mirrors", config.CrestMirrorsID, new ItemStack[] { new ItemStack(Blocks.glass_pane)}, - new int[] {1})); - - ModifyBuilder.registerModifier(new modifierCrestofLegends("Crest of Legends", config.CrestLegendsID, new ItemStack[] { new ItemStack(item_relic)}, - new int[] {1})); - - ModifyBuilder.registerModifier(new modifierCrestofBlades("Crest of Blades", config.CrestBladesID, new ItemStack[] { new ItemStack(Items.iron_sword)},new int[] {1})); - - TConstructRegistry.registerActiveToolMod(new TDefenseActiveToolMod()); - - for (ToolCore tool : TConstructRegistry.getToolMapping()) - { - TConstructClientRegistry.addEffectRenderMapping(tool, config.DazeID, "tinker", "daze", true); - TConstructClientRegistry.addEffectRenderMapping(tool, config.CrestFeathersID, "tinker", "feathers", true); - TConstructClientRegistry.addEffectRenderMapping(tool, config.CrestMirrorsID, "tinker", "mirrors", true); - TConstructClientRegistry.addEffectRenderMapping(tool, config.CrestLegendsID, "tinker", "legends", true); - TConstructClientRegistry.addEffectRenderMapping(tool, config.CrestBladesID, "tinker", "blades", true); - } - - - TConstructClientRegistry.toolButtons - .add(TConstructClientRegistry.toolButtons.size(), - new ToolGuiElement( - 1, - 0, - 0, - new int[] { 9, 0, 4, 0 }, - new int[] { 2, 3, 2, 0 }, - StatCollector - .translateToLocal("gui.toolstation.roundshield.name"), - StatCollector - .translateToLocal("gui.toolstation.roundshield.desc"), - "tinkersdefense", "textures/gui/icons.png")); - TConstructClientRegistry.tierTwoButtons - .add(TConstructClientRegistry.tierTwoButtons.size(), - new ToolGuiElement( - 5, - 0, - 0, - new int[] { 9, 8, 9, 9 }, - new int[] { 2, 3, 2, 3 }, - StatCollector - .translateToLocal("gui.toolstation.heatershield.name"), - StatCollector - .translateToLocal("gui.toolstation.heatershield.desc"), - "tinkersdefense", "textures/gui/icons.png")); - - - - // Aeonsteel - pb.registerMaterialSet("aeonsteel", new ItemStack( - TinkerTools.toolShard, 1, 10), new ItemStack( - TinkerTools.toolRod, 1, 10), config.AeonsteelMatID); - - TConstructClientRegistry.addMaterialRenderMapping(config.AeonsteelMatID, "tinker", - "aeonsteel", true); - - // Tool Materials: id, name, harvestlevel, durability, speed, damage, - // handlemodifier, reinforced, shoddy, style color, primary color for - // block use - TConstructRegistry.addToolMaterial(config.AeonsteelMatID, "AeonSteel", 4, 822, 1100, 3, - 1.6F, 2, 0f, LIGHT_PURPLE.toString(), 0xb565e6); - TinkerTools.registerPatternMaterial("AeonSteelIngot", 2, "AeonSteel"); - TConstructRegistry.addDefaultToolPartMaterial(config.AeonsteelMatID); - - Smeltery.addMelting(new ItemStack(item_AeonSteelIngot, 1, 0), - block_AeonSteelBlock, 0, 500, new FluidStack(moltenAeonsteel, - TConstruct.ingotLiquidValue)); - Smeltery.addMelting(block_AeonSteelBlock, 0, 500, new FluidStack( - moltenAeonsteel, TConstruct.ingotLiquidValue * 9)); - - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(item_AeonSteelIngot, 1, 0), - new FluidStack(moltenAeonsteel, TConstruct.ingotLiquidValue), - TConstructRegistry.getItemStack("ingotCast"), false, 50); - - TConstructRegistry.instance.getBasinCasting() - .addCastingRecipe( - new ItemStack(block_AeonSteelBlock, 1, 0), - new FluidStack(moltenAeonsteel, - TConstruct.ingotLiquidValue * 9), 100); - - castMolten(moltenAeonsteel, config.AeonsteelMatID); - - PatternBuilder.instance.registerFullMaterial(new ItemStack( - item_AeonSteelIngot, 1, 0), 2, "Aeonsteel", new ItemStack( - TinkerTools.toolShard, 1, config.AeonsteelMatID), new ItemStack( - TinkerTools.toolRod, 1, config.AeonsteelMatID), config.AeonsteelMatID); - - Smeltery.addAlloyMixing(new FluidStack(moltenAeonsteel, 144), - new FluidStack[] { - new FluidStack(TinkerSmeltery.moltenAlumiteFluid, 144), - new FluidStack(TinkerSmeltery.moltenCobaltFluid, 144) }); - - - // Queen's Gold - pb.registerMaterialSet("queensgold", new ItemStack( - TinkerTools.toolShard, 1, 10), new ItemStack( - TinkerTools.toolRod, 1, 10), config.QueensGoldMatID); - - TConstructClientRegistry.addMaterialRenderMapping(config.QueensGoldMatID, "tinker", - "queensgold", true); - TConstructRegistry.addToolMaterial(config.QueensGoldMatID, "QueensGold", 3, 100, 500, 2, - 1.0F, 0, 0f, GOLD.toString(), 0xeaee57); - TinkerTools.registerPatternMaterial("QueensGoldIngot", 2, "QueensGold"); - TConstructRegistry.addDefaultToolPartMaterial(config.QueensGoldMatID); - - Smeltery.addMelting(new ItemStack(item_QueensGoldIngot, 1, 0), - block_QueensGoldBlock, 0, 500, new FluidStack(moltenQueensGold, - TConstruct.ingotLiquidValue)); - Smeltery.addMelting(block_QueensGoldBlock, 0, 500, new FluidStack( - moltenQueensGold, TConstruct.ingotLiquidValue * 9)); - - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(item_QueensGoldIngot, 1, 0), - new FluidStack(moltenQueensGold, TConstruct.ingotLiquidValue), - TConstructRegistry.getItemStack("ingotCast"), false, 50); - - TConstructRegistry.instance.getBasinCasting().addCastingRecipe( - new ItemStack(block_QueensGoldBlock, 1, 0), - new FluidStack(moltenQueensGold, - TConstruct.ingotLiquidValue * 9), 100); - - castMolten(moltenQueensGold, config.QueensGoldMatID); - - PatternBuilder.instance.registerFullMaterial(new ItemStack( - item_QueensGoldIngot, 1, 0), 2, "QueensGold", new ItemStack( - TinkerTools.toolShard, 1, config.QueensGoldMatID), new ItemStack( - TinkerTools.toolRod, 1, config.QueensGoldMatID), config.QueensGoldMatID); - - Smeltery.addAlloyMixing( - new FluidStack(moltenQueensGold, 144 * 8), - new FluidStack[] { - new FluidStack(TinkerSmeltery.moltenGoldFluid, 144 * 8), - new FluidStack(TinkerSmeltery.moltenEmeraldFluid, 80) }); - - // Dogbearium - pb.registerMaterialSet("dogbearium", new ItemStack( - TinkerTools.toolShard, 1, 10), new ItemStack( - TinkerTools.toolRod, 1, 10), config.DogbeariumMatID); - - TConstructClientRegistry.addMaterialRenderMapping(config.DogbeariumMatID, "tinker", - "dogbearium", true); - TConstructRegistry.addToolMaterial(config.DogbeariumMatID, "Dogbearium", 4, 600, 800, 2, - 1.6F, 0, -2f, DARK_RED.toString(), 0x754200); - TinkerTools.registerPatternMaterial("DogbeariumIngot", 2, "Dogbearium"); - TConstructRegistry.addDefaultToolPartMaterial(config.DogbeariumMatID); - - Smeltery.addMelting(new ItemStack(item_DogbeariumIngot, 1, 0), - block_DogbeariumBlock, 0, 500, new FluidStack(moltenDogbearium, - TConstruct.ingotLiquidValue)); - Smeltery.addMelting(block_DogbeariumBlock, 0, 500, new FluidStack( - moltenDogbearium, TConstruct.ingotLiquidValue * 9)); - - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(item_DogbeariumIngot, 1, 0), - new FluidStack(moltenDogbearium, TConstruct.ingotLiquidValue), - TConstructRegistry.getItemStack("ingotCast"), false, 50); - - TConstructRegistry.instance.getBasinCasting().addCastingRecipe( - new ItemStack(block_DogbeariumBlock, 1, 0), - new FluidStack(moltenDogbearium, - TConstruct.ingotLiquidValue * 9), 100); - - castMolten(moltenDogbearium, config.DogbeariumMatID); - - PatternBuilder.instance.registerFullMaterial(new ItemStack( - item_DogbeariumIngot, 1, 0), 2, "Dogbearium", new ItemStack( - TinkerTools.toolShard, 1, config.DogbeariumMatID), new ItemStack( - TinkerTools.toolRod, 1, config.DogbeariumMatID), config.DogbeariumMatID); - - Smeltery.addAlloyMixing(new FluidStack(moltenDogbearium, 144 * 2), - new FluidStack[] { - new FluidStack(TinkerSmeltery.moltenArditeFluid, 144), - new FluidStack(TinkerSmeltery.bloodFluid, 160), - new FluidStack(TinkerSmeltery.moltenEnderFluid, 250) }); - - // Shields - TConstructRegistry.addToolRecipe(tool_roundShield, - partArmorplate, TinkerTools.toolRod, - TinkerTools.frypanHead); - - TConstructRegistry.addToolRecipe(tool_heaterShield, - partArmorplate, TinkerTools.toughRod, - partArmorplate, partRivet); - - // Wrench - TConstructRegistry.addToolRecipe(tool_wrench, TinkerTools.handGuard, - TinkerTools.toolRod, TinkerTools.binding); - - //Zweihander - TConstructRegistry.addToolRecipe(tool_zweihander, TinkerTools.largeSwordBlade, - TinkerTools.toughRod, TinkerTools.wideGuard, TinkerTools.swordBlade); - - //Armor - TConstructRegistry.addToolRecipe(tool_sheath, partArmorplate,TinkerTools.toolRod, partCloth, partClasp); - - tcInject = new Injector(0,TinkerTools.broadsword); - GameRegistry.registerItem(tcInject, "debugger"); - } - - @EventHandler - public void postInit(FMLPostInitializationEvent e) { - - } - - public void castMolten(Fluid fluid, int ID) { - // .addCastingRecipe(output, fluid, cast, hardeningDelay) - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.toolRod, 1, ID), - new FluidStack(fluid, (int) (144 * 0.5D)), - TConstructRegistry.getItemStack("toolRodCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.pickaxeHead, 1, ID), - new FluidStack(fluid, (int) (144 * 1.0D)), - TConstructRegistry.getItemStack("pickaxeHeadCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.shovelHead, 1, ID), - new FluidStack(fluid, (int) (144 * 1.0D)), - TConstructRegistry.getItemStack("shovelHeadCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.hatchetHead, 1, ID), - new FluidStack(fluid, (int) (144 * 1.0D)), - TConstructRegistry.getItemStack("hatchetHeadCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.swordBlade, 1, ID), - new FluidStack(fluid, (int) (144 * 1.0D)), - TConstructRegistry.getItemStack("swordBladeCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.fullGuard, 1, ID), - new FluidStack(fluid, (int) (144 * 3.0D)), - TConstructRegistry.getItemStack("fullGuardCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.wideGuard, 1, ID), - new FluidStack(fluid, (int) (144 * 0.5D)), - TConstructRegistry.getItemStack("wideGuardCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.crossbar, 1, ID), - new FluidStack(fluid, (int) (144 * 0.5D)), - TConstructRegistry.getItemStack("crossbarCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.binding, 1, ID), - new FluidStack(fluid, (int) (144 * 0.5D)), - TConstructRegistry.getItemStack("bindingCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.handGuard, 1, ID), - new FluidStack(fluid, (int) (144 * 0.5D)), - TConstructRegistry.getItemStack("handGuardCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.frypanHead, 1, ID), - new FluidStack(fluid, (int) (144 * 1.0D)), - TConstructRegistry.getItemStack("frypanHeadCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.signHead, 1, ID), - new FluidStack(fluid, (int) (144 * 1.0D)), - TConstructRegistry.getItemStack("signHeadCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.knifeBlade, 1, ID), - new FluidStack(fluid, (int) (144 * 0.5D)), - TConstructRegistry.getItemStack("knifeBladeCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.chiselHead, 1, ID), - new FluidStack(fluid, (int) (144 * 0.5D)), - TConstructRegistry.getItemStack("chiselHeadCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.toughRod, 1, ID), - new FluidStack(fluid, (int) (144 * 3.0D)), - TConstructRegistry.getItemStack("toughRodCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.toughBinding, 1, ID), - new FluidStack(fluid, (int) (144 * 3.0D)), - TConstructRegistry.getItemStack("toughBindingCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.largePlate, 1, ID), - new FluidStack(fluid, (int) (144 * 8.0D)), - TConstructRegistry.getItemStack("largePlateCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.broadAxeHead, 1, ID), - new FluidStack(fluid, (int) (144 * 8.0D)), - TConstructRegistry.getItemStack("broadAxeHeadCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.scytheBlade, 1, ID), - new FluidStack(fluid, (int) (144 * 8.0D)), - TConstructRegistry.getItemStack("scytheHeadCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.excavatorHead, 1, ID), - new FluidStack(fluid, (int) (144 * 8.0D)), - TConstructRegistry.getItemStack("excavatorHeadCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.largeSwordBlade, 1, ID), - new FluidStack(fluid, (int) (144 * 8.0D)), - TConstructRegistry.getItemStack("largeBladeCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.hammerHead, 1, ID), - new FluidStack(fluid, (int) (144 * 8.0D)), - TConstructRegistry.getItemStack("hammerHeadCast"), 50); - TConstructRegistry.instance.getTableCasting().addCastingRecipe( - new ItemStack(TinkerTools.arrowhead, 1, ID), - new FluidStack(fluid, (int) (144 * 1.0D)), - TConstructRegistry.getItemStack("arrowheadCast"), 50); - - } - - public void buildParts(Item item, int meta) { - int[] nonMetals = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 17 }; - int[] liquidDamage = new int[] { 2, 13, 10, 11, 12, 14, 15, 6, 16, 18 }; - - for (int mat = 0; mat < nonMetals.length; mat++) { - TConstructRegistry.addPartMapping(woodPattern, meta, mat, - new ItemStack(item, 1, mat)); - } - - LiquidCasting tableCasting = TConstructRegistry.getTableCasting(); - // patternOutputs = new Item[] { partShuriken, partCrossbowLimb, - // partCrossbowBody, partBowLimb }; - - ItemStack cast = new ItemStack(metalPattern, 1, meta); - - tableCasting.addCastingRecipe(cast, - new FluidStack(TinkerSmeltery.moltenAlubrassFluid, - TConstruct.ingotLiquidValue), new ItemStack(item, 1, - Short.MAX_VALUE), false, 50); - tableCasting.addCastingRecipe(cast, - new FluidStack(TinkerSmeltery.moltenGoldFluid, - TConstruct.ingotLiquidValue * 2), new ItemStack(item, - 1, Short.MAX_VALUE), false, 50); - - for (int iterTwo = 0; iterTwo < TinkerSmeltery.liquids.length; iterTwo++) { - Fluid fs = TinkerSmeltery.liquids[iterTwo].getFluid(); - int fluidAmount = metalPattern.getPatternCost(cast) - * TConstruct.ingotLiquidValue / 2; - ItemStack metalCast = new ItemStack(item, 1, liquidDamage[iterTwo]); - tableCasting.addCastingRecipe(metalCast, new FluidStack(fs, - fluidAmount), cast, 50); - Smeltery.addMelting(FluidType.getFluidType(fs), metalCast, 0, - fluidAmount); - } - } - - public static int[] hexToRGB(String hex) - { - int color[] = new int[3]; - - color[0] = Integer.parseUnsignedInt(hex.substring(0, 2), 16); - color[1] = Integer.parseUnsignedInt(hex.substring(2, 4), 16); - color[2] = Integer.parseUnsignedInt(hex.substring(4, 6), 16); - - return color; - } - -} - diff --git a/src/main/java/gmail/Lance5057/armor/items/ChainArmor.java b/src/main/java/gmail/Lance5057/armor/items/ChainArmor.java deleted file mode 100644 index 6a5dea9..0000000 --- a/src/main/java/gmail/Lance5057/armor/items/ChainArmor.java +++ /dev/null @@ -1,78 +0,0 @@ -package gmail.Lance5057.armor.items; - -import gmail.Lance5057.TinkersDefense; -import gmail.Lance5057.proxy.ClientProxy; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class ChainArmor extends ItemArmor { - public ChainArmor(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) { - super(par2EnumArmorMaterial, par3, par4); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { - String itemName = "tinkersdefense:textures/armor/ChainArmor"; - this.itemIcon = par1IconRegister.registerIcon(itemName); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, - String type) { - return "tinkersdefense:textures/armor/ChainArmor.png"; - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, - ItemStack itemStack, int armorSlot) - { - -// return ClientProxy.chain; - ModelBiped armorModel = ClientProxy.chain; - if (itemStack != null) { -// if (itemStack.getItem() instanceof TinkerArmor) { -// int type = ((ItemArmor) itemStack.getItem()).armorType; -// if (type == 1 || type == 3) { -// armorModel = TinkersDefense.proxy.getArmorModel(0); -// } else { -// armorModel = TinkersDefense.proxy.getArmorModel(1); -// } -// -// } - if (armorModel != null) { -// armorModel.bipedHead.showModel = armorSlot == 0; -// armorModel.bipedHeadwear.showModel = armorSlot == 0; -// armorModel.bipedBody.showModel = armorSlot == 1 -// || armorSlot == 2; -// armorModel.bipedRightArm.showModel = armorSlot == 1; -// armorModel.bipedLeftArm.showModel = armorSlot == 1; -// armorModel.bipedRightLeg.showModel = armorSlot == 2 -// || armorSlot == 3; -// armorModel.bipedLeftLeg.showModel = armorSlot == 2 -// || armorSlot == 3; - armorModel.isSneak = entityLiving.isSneaking(); - armorModel.isRiding = entityLiving.isRiding(); - armorModel.isChild = entityLiving.isChild(); - armorModel.heldItemRight = entityLiving.getHeldItem() != null ? 1 - : 0; - - if (entityLiving instanceof EntityPlayer) { - armorModel.aimedBow = ((EntityPlayer) entityLiving) - .getItemInUseDuration() > 2; - } - return armorModel; - } - } - return armorModel; - } - -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/armor/items/ClothArmor.java b/src/main/java/gmail/Lance5057/armor/items/ClothArmor.java deleted file mode 100644 index 1317a3e..0000000 --- a/src/main/java/gmail/Lance5057/armor/items/ClothArmor.java +++ /dev/null @@ -1,78 +0,0 @@ -package gmail.Lance5057.armor.items; - -import gmail.Lance5057.TinkersDefense; -import gmail.Lance5057.proxy.ClientProxy; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class ClothArmor extends ItemArmor { - public ClothArmor(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) { - super(par2EnumArmorMaterial, par3, par4); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { - String itemName = "tinkersdefense:textures/armor/ClothArmor"; - this.itemIcon = par1IconRegister.registerIcon(itemName); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, - String type) { - return "tinkersdefense:textures/armor/ChainArmor.png"; - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, - ItemStack itemStack, int armorSlot) - { - -// return ClientProxy.chain; - ModelBiped armorModel = ClientProxy.chain; - if (itemStack != null) { -// if (itemStack.getItem() instanceof TinkerArmor) { -// int type = ((ItemArmor) itemStack.getItem()).armorType; -// if (type == 1 || type == 3) { -// armorModel = TinkersDefense.proxy.getArmorModel(0); -// } else { -// armorModel = TinkersDefense.proxy.getArmorModel(1); -// } -// -// } - if (armorModel != null) { -// armorModel.bipedHead.showModel = armorSlot == 0; -// armorModel.bipedHeadwear.showModel = armorSlot == 0; -// armorModel.bipedBody.showModel = armorSlot == 1 -// || armorSlot == 2; -// armorModel.bipedRightArm.showModel = armorSlot == 1; -// armorModel.bipedLeftArm.showModel = armorSlot == 1; -// armorModel.bipedRightLeg.showModel = armorSlot == 2 -// || armorSlot == 3; -// armorModel.bipedLeftLeg.showModel = armorSlot == 2 -// || armorSlot == 3; - armorModel.isSneak = entityLiving.isSneaking(); - armorModel.isRiding = entityLiving.isRiding(); - armorModel.isChild = entityLiving.isChild(); - armorModel.heldItemRight = entityLiving.getHeldItem() != null ? 1 - : 0; - - if (entityLiving instanceof EntityPlayer) { - armorModel.aimedBow = ((EntityPlayer) entityLiving) - .getItemInUseDuration() > 2; - } - return armorModel; - } - } - return armorModel; - } - -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/armor/items/Sheath.java b/src/main/java/gmail/Lance5057/armor/items/Sheath.java deleted file mode 100644 index 9806905..0000000 --- a/src/main/java/gmail/Lance5057/armor/items/Sheath.java +++ /dev/null @@ -1,110 +0,0 @@ -package gmail.Lance5057.armor.items; - -import gmail.Lance5057.armor.renderers.ModelSheath; -import gmail.Lance5057.proxy.ClientProxy; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import tconstruct.library.accessory.IAccessory; -import tconstruct.library.accessory.IAccessoryModel; -import tconstruct.library.tools.ToolCore; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class Sheath extends ToolCore implements IAccessoryModel,IAccessory -{ - - public Sheath() - { - super(0); - } - - @Override - public boolean canEquipAccessory(ItemStack item, int slot) - { - return slot == 3; - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel (EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) - { - String color[] = new String[10]; - - for(int i = 0; i<10; i++) - color[i] = Integer.toHexString(this.getColorFromItemStack(itemStack, i)); - - return new ModelSheath(color); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, - String type) { - return "tinkersdefense:textures/armor/Sheath/_sheath_base.png"; - } - - ResourceLocation texture = new ResourceLocation("tinkersdefense", "textures/armor/Sheath/_sheath_base.png"); - - @Override - @SideOnly(Side.CLIENT) - public ResourceLocation getWearbleTexture (Entity entity, ItemStack stack, int slot) - { - return texture; - } - - @Override - public Item getAccessoryItem() { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getDefaultFolder() { - // TODO Auto-generated method stub - return "Armor/Sheath"; - } - - @Override - public String getEffectSuffix() { - return "_sheath_effect"; - } - - @Override - public Item getHeadItem() { - // TODO Auto-generated method stub - return null; - } - - @SideOnly(Side.CLIENT) - @Override - public int getPartAmount() { - return 4; - } - - @Override - public String getIconSuffix(int partType) { - switch (partType) { - case 0: - return "_sheath_base"; - case 1: - return "_shield_base_broken"; //useless - case 2: - return "_sheath_filigree"; - case 3: - return "_sheath_belt"; - case 4: - return "_sheath_clasp"; - default: - return ""; - } - } - - @Override - public String[] getTraits() { - return new String[] { "sheath", "cosmetic" }; - } - -} diff --git a/src/main/java/gmail/Lance5057/armor/items/TinkerArmor.java b/src/main/java/gmail/Lance5057/armor/items/TinkerArmor.java deleted file mode 100644 index 3899023..0000000 --- a/src/main/java/gmail/Lance5057/armor/items/TinkerArmor.java +++ /dev/null @@ -1,78 +0,0 @@ -package gmail.Lance5057.armor.items; - -import gmail.Lance5057.TinkersDefense; -import gmail.Lance5057.proxy.ClientProxy; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class TinkerArmor extends ItemArmor { - public TinkerArmor(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) { - super(par2EnumArmorMaterial, par3, par4); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { - String itemName = "tinkersdefense:textures/armor/TinkerArmor"; - this.itemIcon = par1IconRegister.registerIcon(itemName); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, - String type) { - return "tinkersdefense:textures/armor/TinkerArmor.png"; - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, - ItemStack itemStack, int armorSlot) - { - -// return ClientProxy.chain; - ModelBiped armorModel = ClientProxy.tutChest; - if (itemStack != null) { -// if (itemStack.getItem() instanceof TinkerArmor) { -// int type = ((ItemArmor) itemStack.getItem()).armorType; -// if (type == 1 || type == 3) { -// armorModel = TinkersDefense.proxy.getArmorModel(0); -// } else { -// armorModel = TinkersDefense.proxy.getArmorModel(1); -// } -// -// } - if (armorModel != null) { -// armorModel.bipedHead.showModel = armorSlot == 0; -// armorModel.bipedHeadwear.showModel = armorSlot == 0; -// armorModel.bipedBody.showModel = armorSlot == 1 -// || armorSlot == 2; -// armorModel.bipedRightArm.showModel = armorSlot == 1; -// armorModel.bipedLeftArm.showModel = armorSlot == 1; -// armorModel.bipedRightLeg.showModel = armorSlot == 2 -// || armorSlot == 3; -// armorModel.bipedLeftLeg.showModel = armorSlot == 2 -// || armorSlot == 3; - armorModel.isSneak = entityLiving.isSneaking(); - armorModel.isRiding = entityLiving.isRiding(); - armorModel.isChild = entityLiving.isChild(); - armorModel.heldItemRight = entityLiving.getHeldItem() != null ? 1 - : 0; - - if (entityLiving instanceof EntityPlayer) { - armorModel.aimedBow = ((EntityPlayer) entityLiving) - .getItemInUseDuration() > 2; - } - return armorModel; - } - } - return armorModel; - } - -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/armor/parts/Item_Cloth.java b/src/main/java/gmail/Lance5057/armor/parts/Item_Cloth.java deleted file mode 100644 index 4090ad8..0000000 --- a/src/main/java/gmail/Lance5057/armor/parts/Item_Cloth.java +++ /dev/null @@ -1,52 +0,0 @@ -package gmail.Lance5057.armor.parts; - -import gmail.Lance5057.TinkersDefense; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -public class Item_Cloth extends Item -{ - public IIcon[] icons = new IIcon[16]; - public static final String[] colors = new String[] {"black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "grey", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"}; - - public Item_Cloth() - { - super(); - this.setHasSubtypes(true); - this.setUnlocalizedName("Cloth"); - this.setCreativeTab(TinkersDefense.tabName); - } - - @Override - public void registerIcons(IIconRegister reg) { - for (int i = 0; i < 16; i ++) { - this.icons[i] = reg.registerIcon("tinkersdefense:" + colors[i] + "_cloth" ); - } - } - - @Override - public IIcon getIconFromDamage(int meta) { - if (meta > 15) - meta = 0; - - return this.icons[meta]; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 16; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return colors[stack.getItemDamage()] + "_" + this.getUnlocalizedName(); - } -} diff --git a/src/main/java/gmail/Lance5057/armor/parts/Item_Glowthread.java b/src/main/java/gmail/Lance5057/armor/parts/Item_Glowthread.java deleted file mode 100644 index 91be026..0000000 --- a/src/main/java/gmail/Lance5057/armor/parts/Item_Glowthread.java +++ /dev/null @@ -1,52 +0,0 @@ -package gmail.Lance5057.armor.parts; - -import gmail.Lance5057.TinkersDefense; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -public class Item_Glowthread extends Item -{ - public IIcon[] icons = new IIcon[16]; - public static final String[] colors = new String[] {"black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "grey", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"}; - - public Item_Glowthread() - { - super(); - this.setHasSubtypes(true); - this.setUnlocalizedName("GlowThread"); - this.setCreativeTab(TinkersDefense.tabName); - } - - @Override - public void registerIcons(IIconRegister reg) { - for (int i = 0; i < 16; i ++) { - this.icons[i] = reg.registerIcon("tinkersdefense:" + colors[i] + "_glowthread" ); - } - } - - @Override - public IIcon getIconFromDamage(int meta) { - if (meta > 15) - meta = 0; - - return this.icons[meta]; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 16; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return colors[stack.getItemDamage()] + "_" + this.getUnlocalizedName(); - } -} diff --git a/src/main/java/gmail/Lance5057/armor/parts/Item_Thread.java b/src/main/java/gmail/Lance5057/armor/parts/Item_Thread.java deleted file mode 100644 index 434d827..0000000 --- a/src/main/java/gmail/Lance5057/armor/parts/Item_Thread.java +++ /dev/null @@ -1,52 +0,0 @@ -package gmail.Lance5057.armor.parts; - -import gmail.Lance5057.TinkersDefense; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -public class Item_Thread extends Item -{ - public IIcon[] icons = new IIcon[16]; - public static final String[] colors = new String[] {"black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "grey", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"}; - - public Item_Thread() - { - super(); - this.setHasSubtypes(true); - this.setUnlocalizedName("Thread"); - this.setCreativeTab(TinkersDefense.tabName); - } - - @Override - public void registerIcons(IIconRegister reg) { - for (int i = 0; i < 16; i ++) { - this.icons[i] = reg.registerIcon("tinkersdefense:" + colors[i] + "_thread" ); - } - } - - @Override - public IIcon getIconFromDamage(int meta) { - if (meta > 15) - meta = 0; - - return this.icons[meta]; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 16; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return colors[stack.getItemDamage()] + "_" + this.getUnlocalizedName(); - } -} diff --git a/src/main/java/gmail/Lance5057/armor/renderers/ModelChainArmor.java b/src/main/java/gmail/Lance5057/armor/renderers/ModelChainArmor.java deleted file mode 100644 index 5b3fc2a..0000000 --- a/src/main/java/gmail/Lance5057/armor/renderers/ModelChainArmor.java +++ /dev/null @@ -1,170 +0,0 @@ -package gmail.Lance5057.armor.renderers; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -import org.lwjgl.opengl.GL11; - -public class ModelChainArmor extends ModelBiped -{ - public ModelRenderer Pauldron1R; - public ModelRenderer Pauldron2R; - public ModelRenderer Pauldron3R; - public ModelRenderer ArmR; - public ModelRenderer Belt; - public ModelRenderer BeltBuckle; - public ModelRenderer Body; - public ModelRenderer Coif; - public ModelRenderer Head; - public ModelRenderer LegR; - public ModelRenderer FootR; - public ModelRenderer HipGuardR; - public ModelRenderer HipGuardBR; - public ModelRenderer Pauldron1L; - public ModelRenderer Pauldron2L; - public ModelRenderer Pauldron3L; - public ModelRenderer ArmL; - public ModelRenderer LegL; - public ModelRenderer FootL; - public ModelRenderer HipGuardL; - public ModelRenderer HipGuardBL; - - public ModelChainArmor(float f) { - super(f, 0, 64,96); - - this.textureWidth = 64; - this.textureHeight = 96; - - this.BeltBuckle = new ModelRenderer(this, 0, 32); - this.BeltBuckle.setRotationPoint(0.0F, 0.0F, 0.0F); - this.BeltBuckle.addBox(-1.0F, 10.0F, -2.4F, 2, 2, 1, 0.2F); - this.bipedBody.addChild(BeltBuckle); - - this.Pauldron3L = new ModelRenderer(this, 16, 64); - this.Pauldron3L.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron3L.addBox(-1.3F, -1.3F, -2.5F, 2, 2, 5, 0.1F); - this.setRotateAngle(Pauldron3L, 0.0F, 3.141592653589793F, 0.2617993877991494F); - this.bipedLeftArm.addChild(Pauldron3L); - - this.LegL = new ModelRenderer(this, 0, 48); - this.LegL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.LegL.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.1F); - this.bipedLeftLeg.addChild(LegL); - - this.LegR = new ModelRenderer(this, 0, 48); - this.LegR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.LegR.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.1F); - this.bipedRightLeg.addChild(LegR); - - this.FootR = new ModelRenderer(this, 0, 75); - this.FootR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.FootR.addBox(-2.0F, 10.0F, -3.0F, 4, 2, 1, 0.0F); - this.bipedRightLeg.addChild(FootR); - - this.Pauldron1R = new ModelRenderer(this, 30, 64); - this.Pauldron1R.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron1R.addBox(-3.5F, -1.6F, -2.5F, 3, 4, 5, 0.0F); - this.setRotateAngle(Pauldron1R, 0.0F, 0.0F, 0.2617993877991494F); - this.bipedRightArm.addChild(Pauldron1R); - - this.ArmR = new ModelRenderer(this, 40, 48); - this.ArmR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ArmR.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.1F); - this.bipedRightArm.addChild(ArmR); - - this.ArmL = new ModelRenderer(this, 40, 48); - this.ArmL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ArmL.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.1F); - this.setRotateAngle(ArmL, 0.0F, 3.141592653589793F, 0.0F); - this.bipedLeftArm.addChild(ArmL); - - this.HipGuardL = new ModelRenderer(this, 24, 32); - this.HipGuardL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.HipGuardL.addBox(-2.1F, 0.0F, 1.5F, 4, 6, 1, -0.1F); - this.setRotateAngle(HipGuardL, 0.17453292519943295F, 1.5707963267948966F, 0.0F); - this.bipedLeftLeg.addChild(HipGuardL); - - this.Pauldron2R = new ModelRenderer(this, 0, 64); - this.Pauldron2R.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron2R.addBox(-2.4F, -2.7F, -2.5F, 3, 3, 5, -0.1F); - this.setRotateAngle(Pauldron2R, 0.0F, 0.0F, -0.2617993877991494F); - this.bipedRightArm.addChild(Pauldron2R); - - this.Body = new ModelRenderer(this, 16, 48); - this.Body.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Body.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.1F); - this.bipedBody.addChild(Body); - - this.Pauldron2L = new ModelRenderer(this, 0, 64); - this.Pauldron2L.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron2L.addBox(-2.4F, -2.7F, -2.5F, 3, 3, 5, -0.1F); - this.setRotateAngle(Pauldron2L, 0.0F, 3.141592653589793F, 0.2617993877991494F); - this.bipedLeftArm.addChild(Pauldron2L); - - this.Coif = new ModelRenderer(this, 0, 78); - this.Coif.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Coif.addBox(-4.0F, -8.0F, -4.0F, 8, 10, 8, 0.5F); - this.bipedHead.addChild(Coif); - - this.HipGuardBR = new ModelRenderer(this, 24, 32); - this.HipGuardBR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.HipGuardBR.addBox(-2.0F, 0.0F, 1.0F, 4, 6, 1, 0.0F); - this.setRotateAngle(HipGuardBR, 0.17453292519943295F, 0.0F, 0.0F); - this.bipedRightLeg.addChild(HipGuardBR); - - this.Pauldron3R = new ModelRenderer(this, 16, 64); - this.Pauldron3R.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron3R.addBox(-1.3F, -1.3F, -2.5F, 2, 2, 5, 0.1F); - this.setRotateAngle(Pauldron3R, 0.0F, 0.0F, -0.2617993877991494F); - this.bipedRightArm.addChild(Pauldron3R); - - this.Head = new ModelRenderer(this, 0, 32); - this.Head.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Head.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.1F); - this.bipedHead.addChild(Head); - - this.FootL = new ModelRenderer(this, 0, 75); - this.FootL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.FootL.addBox(-2.0F, 10.0F, -3.0F, 4, 2, 1, 0.0F); - this.bipedLeftLeg.addChild(FootL); - - this.Belt = new ModelRenderer(this, 32, 90); - this.Belt.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Belt.addBox(-4.0F, 10.0F, -2.0F, 8, 2, 4, 0.2F); - this.bipedBody.addChild(Belt); - - this.HipGuardBL = new ModelRenderer(this, 24, 32); - this.HipGuardBL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.HipGuardBL.addBox(-2.0F, 0.0F, 1.0F, 4, 6, 1, 0.0F); - this.setRotateAngle(HipGuardBL, 0.17453292519943295F, 0.0F, 0.0F); - this.bipedLeftLeg.addChild(HipGuardBL); - - this.Pauldron1L = new ModelRenderer(this, 30, 64); - this.Pauldron1L.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron1L.addBox(-3.5F, -1.6F, -2.5F, 3, 4, 5, 0.0F); - this.setRotateAngle(Pauldron1L, 0.0F, 3.141592653589793F, -0.2617993877991494F); - this.bipedLeftArm.addChild(Pauldron1L); - - this.HipGuardR = new ModelRenderer(this, 24, 32); - this.HipGuardR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.HipGuardR.addBox(-2.1F, 0.0F, -2.5F, 4, 6, 1, -0.1F); - this.setRotateAngle(HipGuardR, -0.17453292519943295F, 1.5707963267948966F, 0.0F); - this.bipedRightLeg.addChild(HipGuardR); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/main/java/gmail/Lance5057/armor/renderers/ModelClothArmor.java b/src/main/java/gmail/Lance5057/armor/renderers/ModelClothArmor.java deleted file mode 100644 index 3cc043e..0000000 --- a/src/main/java/gmail/Lance5057/armor/renderers/ModelClothArmor.java +++ /dev/null @@ -1,286 +0,0 @@ -package gmail.Lance5057.armor.renderers; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import org.lwjgl.opengl.GL11; - -/** - * Hood - Lance5057 - * Created using Tabula 4.1.1 - */ -public class ModelClothArmor extends ModelBase { - public ModelRenderer TopLeft; - public ModelRenderer field_78124_i; - public ModelRenderer field_78123_h; - public ModelRenderer Top; - public ModelRenderer Left; - public ModelRenderer Right; - public ModelRenderer Collar; - public ModelRenderer TrimLeft2; - public ModelRenderer TrimLeft3; - public ModelRenderer TrimLeft4; - public ModelRenderer TrimRight3; - public ModelRenderer TrimRight2; - public ModelRenderer TrimRight4; - public ModelRenderer Flop; - public ModelRenderer Top_1; - public ModelRenderer ArmLeft; - public ModelRenderer ArmRight; - public ModelRenderer Chest; - public ModelRenderer Belt; - public ModelRenderer Button; - public ModelRenderer Back; - public ModelRenderer ShawlLeft1; - public ModelRenderer ShawlLeft2; - public ModelRenderer ShawlRight1; - public ModelRenderer ShawlRight2; - public ModelRenderer LeftFront; - public ModelRenderer RightFront; - public ModelRenderer LeftFS; - public ModelRenderer LeftF; - public ModelRenderer LeftBS; - public ModelRenderer LeftB; - public ModelRenderer LeftB2; - public ModelRenderer LeftBA; - public ModelRenderer RightFS; - public ModelRenderer RightF; - public ModelRenderer RightBS; - public ModelRenderer RightB; - public ModelRenderer RightBA; - public ModelRenderer RightB2; - - public ModelClothArmor() { - this.textureWidth = 64; - this.textureHeight = 64; - this.TrimRight2 = new ModelRenderer(this, 0, 4); - this.TrimRight2.setRotationPoint(3.0F, -1.5F, -6.0F); - this.TrimRight2.addBox(0.0F, 0.0F, 0.0F, 2, 2, 1, 0.0F); - this.setRotateAngle(TrimRight2, 0.0F, 0.0F, 0.7853981633974483F); - this.Top_1 = new ModelRenderer(this, 0, 17); - this.Top_1.setRotationPoint(0.0F, -0.3F, 0.0F); - this.Top_1.addBox(-8.5F, 0.0F, -3.0F, 9, 2, 6, 0.01F); - this.RightB2 = new ModelRenderer(this, 0, 0); - this.RightB2.setRotationPoint(-6.2F, 0.0F, -3.61F); - this.RightB2.addBox(-1.7F, -0.4F, 3.3F, 1, 11, 2, 0.0F); - this.setRotateAngle(RightB2, 0.0F, 1.5707963267948966F, 0.08726646259971647F); - this.Top = new ModelRenderer(this, 0, 0); - this.Top.setRotationPoint(0.5F, 0.0F, 0.0F); - this.Top.addBox(-4.0F, -9.0F, -5.0F, 9, 1, 11, 0.0F); - this.setRotateAngle(Top, 0.0F, 3.141592653589793F, 0.0F); - this.TopLeft = new ModelRenderer(this, 0, 17); - this.TopLeft.setRotationPoint(0.0F, -0.3F, 0.0F); - this.TopLeft.addBox(-8.5F, 0.0F, -3.0F, 9, 2, 6, 0.01F); - this.setRotateAngle(TopLeft, 0.0F, 3.141592653589793F, 0.0F); - this.field_78123_h = new ModelRenderer(this, 0, 16); - this.field_78123_h.setRotationPoint(-1.899999976158142F, 12.0F, 0.10000000149011612F); - this.field_78123_h.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F); - this.TrimLeft3 = new ModelRenderer(this, 0, 0); - this.TrimLeft3.setRotationPoint(-2.3F, 0.0F, -5.5F); - this.TrimLeft3.addBox(0.0F, 0.0F, 0.0F, 2, 2, 1, 0.0F); - this.setRotateAngle(TrimLeft3, 0.009773843811168246F, 3.141592653589793F, 0.7853981633974483F); - this.ArmRight = new ModelRenderer(this, 32, 25); - this.ArmRight.setRotationPoint(-3.5F, 0.0F, 0.0F); - this.ArmRight.addBox(0.0F, 0.0F, -2.5F, 5, 11, 5, 0.01F); - this.setRotateAngle(ArmRight, 0.0F, 3.141592653589793F, 0.0F); - this.TrimRight3 = new ModelRenderer(this, 0, 0); - this.TrimRight3.setRotationPoint(3.7F, 0.0F, -5.5F); - this.TrimRight3.addBox(0.0F, 0.0F, 0.0F, 2, 2, 1, 0.0F); - this.setRotateAngle(TrimRight3, 0.0F, 3.141592653589793F, 0.7853981633974483F); - this.Left = new ModelRenderer(this, 40, 0); - this.Left.mirror = true; - this.Left.setRotationPoint(-0.5F, -0.3F, 0.0F); - this.Left.addBox(4.0F, -8.3F, -5.0F, 1, 7, 11, 0.0F); - this.setRotateAngle(Left, 0.0F, 3.141592653589793F, 0.08726646259971647F); - this.Right = new ModelRenderer(this, 40, 0); - this.Right.setRotationPoint(0.5F, -0.3F, 0.0F); - this.Right.addBox(-5.0F, -8.3F, -5.0F, 1, 7, 11, 0.0F); - this.setRotateAngle(Right, 0.0F, 3.141592653589793F, -0.08726646259971647F); - this.LeftB2 = new ModelRenderer(this, 0, 0); - this.LeftB2.setRotationPoint(-3.0F, -0.1F, 3.61F); - this.LeftB2.addBox(-1.7F, 0.0F, -2.0F, 1, 11, 2, 0.0F); - this.setRotateAngle(LeftB2, 0.0F, 4.71238898038469F, 0.08726646259971647F); - this.field_78124_i = new ModelRenderer(this, 0, 16); - this.field_78124_i.mirror = true; - this.field_78124_i.setRotationPoint(1.899999976158142F, 12.0F, 0.10000000149011612F); - this.field_78124_i.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F); - this.Button = new ModelRenderer(this, 0, 0); - this.Button.setRotationPoint(0.0F, 0.0F, -3.5F); - this.Button.addBox(0.0F, 0.0F, 0.0F, 2, 2, 1, 0.0F); - this.setRotateAngle(Button, 0.0F, 0.0F, 0.7853981633974483F); - this.LeftFS = new ModelRenderer(this, 0, 0); - this.LeftFS.setRotationPoint(-1.8F, 0.0F, -2.9F); - this.LeftFS.addBox(1.0F, 0.0F, 2.0F, 1, 11, 2, 0.0F); - this.setRotateAngle(LeftFS, 0.0F, 0.7853981633974483F, 0.0F); - this.Collar = new ModelRenderer(this, 0, 12); - this.Collar.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Collar.addBox(-5.5F, -1.0F, -5.5F, 11, 2, 11, 0.0F); - this.setRotateAngle(Collar, 0.0F, 3.141592653589793F, 0.0F); - this.Back = new ModelRenderer(this, 8, 37); - this.Back.setRotationPoint(0.0F, 1.2F, 2.02F); - this.Back.addBox(-4.0F, 0.0F, 0.0F, 8, 5, 1, 0.0F); - this.RightFront = new ModelRenderer(this, 0, 0); - this.RightFront.setRotationPoint(-1.9F, 12.0F, 0.0F); - this.RightFront.addBox(1.4F, 0.0F, -1.5F, 1, 11, 3, 0.0F); - this.setRotateAngle(RightFront, 0.0F, 3.141592653589793F, 0.08726646259971647F); - this.ShawlRight1 = new ModelRenderer(this, 32, 0); - this.ShawlRight1.mirror = true; - this.ShawlRight1.setRotationPoint(-0.6F, 1.3F, 0.0F); - this.ShawlRight1.addBox(0.0F, 0.0F, -3.0F, 6, 5, 6, 0.0F); - this.setRotateAngle(ShawlRight1, 0.0F, 0.0F, -0.2792526803190927F); - this.LeftF = new ModelRenderer(this, 0, 0); - this.LeftF.setRotationPoint(-4.1F, 0.0F, -1.9F); - this.LeftF.addBox(0.0F, 0.0F, 2.1F, 1, 11, 3, 0.0F); - this.setRotateAngle(LeftF, 0.0F, 1.5707963267948966F, 0.0F); - this.LeftB = new ModelRenderer(this, 0, 0); - this.LeftB.setRotationPoint(-2.0F, 0.0F, 3.6F); - this.LeftB.addBox(-1.7F, 0.0F, -3.0F, 1, 11, 3, 0.0F); - this.setRotateAngle(LeftB, 0.0F, 4.71238898038469F, 0.0F); - this.LeftBS = new ModelRenderer(this, 0, 0); - this.LeftBS.setRotationPoint(1.0F, 0.0F, 3.6F); - this.LeftBS.addBox(-1.5F, 0.0F, -2.5F, 1, 11, 2, 0.0F); - this.setRotateAngle(LeftBS, 0.0F, -0.7853981633974483F, 0.0F); - this.RightB = new ModelRenderer(this, 0, 0); - this.RightB.setRotationPoint(-6.1F, -0.2F, -3.6F); - this.RightB.addBox(-1.7F, 0.2F, 4.1F, 1, 11, 3, 0.0F); - this.setRotateAngle(RightB, 0.0F, 1.5707963267948966F, 0.0F); - this.TrimLeft4 = new ModelRenderer(this, 40, 0); - this.TrimLeft4.setRotationPoint(5.3F, -2.0F, 5.0F); - this.TrimLeft4.addBox(0.0F, 0.0F, 0.0F, 1, 2, 11, 0.0F); - this.setRotateAngle(TrimLeft4, 0.0F, 3.141592653589793F, 0.5235987755982988F); - this.RightF = new ModelRenderer(this, 0, 0); - this.RightF.setRotationPoint(-4.1F, 0.0F, 1.9F); - this.RightF.addBox(0.1F, 0.0F, -5.1F, 1, 11, 3, 0.0F); - this.setRotateAngle(RightF, 0.0F, -1.5707963267948966F, 0.0F); - this.ShawlLeft1 = new ModelRenderer(this, 32, 0); - this.ShawlLeft1.setRotationPoint(-0.6F, 1.3F, 0.0F); - this.ShawlLeft1.addBox(0.0F, 0.0F, -3.0F, 6, 5, 6, 0.0F); - this.setRotateAngle(ShawlLeft1, 0.0F, 0.0F, -0.2792526803190927F); - this.ShawlRight2 = new ModelRenderer(this, 0, 34); - this.ShawlRight2.mirror = true; - this.ShawlRight2.setRotationPoint(-2.5F, -1.8F, -0.1F); - this.ShawlRight2.addBox(1.0F, -1.0F, -2.0F, 6, 3, 5, 0.0F); - this.setRotateAngle(ShawlRight2, 0.0F, 0.0F, 0.9424777960769379F); - this.TrimLeft2 = new ModelRenderer(this, 0, 4); - this.TrimLeft2.setRotationPoint(-3.0F, -1.5F, -6.0F); - this.TrimLeft2.addBox(0.0F, 0.0F, 0.0F, 2, 2, 1, 0.0F); - this.setRotateAngle(TrimLeft2, 0.0F, 0.0F, 0.7853981633974483F); - this.LeftFront = new ModelRenderer(this, 0, 0); - this.LeftFront.setRotationPoint(1.9F, 12.0F, 0.0F); - this.LeftFront.addBox(1.4F, 0.0F, -1.5F, 1, 11, 3, 0.0F); - this.setRotateAngle(LeftFront, 0.0F, 0.0F, -0.08726646259971647F); - this.TrimRight4 = new ModelRenderer(this, 40, 0); - this.TrimRight4.mirror = true; - this.TrimRight4.setRotationPoint(-4.5F, -2.5F, 5.0F); - this.TrimRight4.addBox(0.0F, 0.0F, 0.0F, 1, 2, 11, 0.0F); - this.setRotateAngle(TrimRight4, 0.0F, 3.141592653589793F, -0.5235987755982988F); - this.ShawlLeft2 = new ModelRenderer(this, 0, 34); - this.ShawlLeft2.mirror = true; - this.ShawlLeft2.setRotationPoint(-2.5F, -1.8F, 0.1F); - this.ShawlLeft2.addBox(1.0F, -1.0F, -3.0F, 6, 3, 5, 0.0F); - this.setRotateAngle(ShawlLeft2, 0.0F, 0.0F, 0.9424777960769379F); - this.RightBA = new ModelRenderer(this, 0, 0); - this.RightBA.setRotationPoint(-5.8F, -0.4F, -3.61F); - this.RightBA.addBox(-3.9F, 0.0F, -4.1F, 1, 11, 5, 0.0F); - this.setRotateAngle(RightBA, 0.0F, 2.6179938779914944F, 0.08726646259971647F); - this.LeftBA = new ModelRenderer(this, 0, 0); - this.LeftBA.setRotationPoint(-2.9F, -0.1F, 3.91F); - this.LeftBA.addBox(0.3F, 0.0F, -6.0F, 1, 11, 5, 0.0F); - this.setRotateAngle(LeftBA, 0.0F, 0.4363323129985824F, 0.08726646259971647F); - this.RightFS = new ModelRenderer(this, 0, 0); - this.RightFS.setRotationPoint(-1.9F, 0.0F, 2.9F); - this.RightFS.addBox(1.1F, 0.0F, -4.0F, 1, 11, 2, 0.0F); - this.setRotateAngle(RightFS, 0.0F, -0.7853981633974483F, 0.0F); - this.ArmLeft = new ModelRenderer(this, 32, 25); - this.ArmLeft.setRotationPoint(3.5F, -0.0F, 0.0F); - this.ArmLeft.addBox(0.0F, 0.0F, -2.5F, 5, 11, 5, 0.01F); - this.RightBS = new ModelRenderer(this, 0, 0); - this.RightBS.setRotationPoint(-3.1F, -0.2F, -3.6F); - this.RightBS.addBox(1.4F, 0.2F, 3.4F, 1, 11, 2, 0.0F); - this.setRotateAngle(RightBS, 0.0F, 0.7853981633974483F, 0.0F); - this.Flop = new ModelRenderer(this, 18, 25); - this.Flop.setRotationPoint(0.0F, -7.0F, 8.5F); - this.Flop.addBox(-4.0F, 0.0F, 0.0F, 8, 7, 4, 0.0F); - this.setRotateAngle(Flop, 0.5235987755982988F, 3.141592653589793F, 0.0F); - this.Belt = new ModelRenderer(this, 0, 25); - this.Belt.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Belt.addBox(-6.8F, 10.0F, -3.0F, 10, 3, 6, 0.01F); - this.setRotateAngle(Belt, 0.0F, 0.0F, -0.13962634015954636F); - this.Chest = new ModelRenderer(this, 0, 0); - this.Chest.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Chest.addBox(-4.5F, 0.0F, -2.5F, 9, 12, 5, 0.0F); - this.RightFront.addChild(this.RightB2); - this.LeftFront.addChild(this.LeftB2); - this.LeftFront.addChild(this.LeftFS); - this.ArmRight.addChild(this.ShawlRight1); - this.LeftFront.addChild(this.LeftF); - this.LeftFront.addChild(this.LeftB); - this.LeftFront.addChild(this.LeftBS); - this.RightFront.addChild(this.RightB); - this.RightFront.addChild(this.RightF); - this.ArmLeft.addChild(this.ShawlLeft1); - this.ShawlRight1.addChild(this.ShawlRight2); - this.ShawlLeft1.addChild(this.ShawlLeft2); - this.RightFront.addChild(this.RightBA); - this.LeftFront.addChild(this.LeftBA); - this.RightFront.addChild(this.RightFS); - this.RightFront.addChild(this.RightBS); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - this.TrimRight2.render(f5); - this.Top_1.render(f5); - this.Top.render(f5); - this.TopLeft.render(f5); - this.field_78123_h.render(f5); - GL11.glPushMatrix(); - GL11.glTranslatef(this.TrimLeft3.offsetX, this.TrimLeft3.offsetY, this.TrimLeft3.offsetZ); - GL11.glTranslatef(this.TrimLeft3.rotationPointX * f5, this.TrimLeft3.rotationPointY * f5, this.TrimLeft3.rotationPointZ * f5); - GL11.glScaled(0.5D, 0.5D, 1.0D); - GL11.glTranslatef(-this.TrimLeft3.offsetX, -this.TrimLeft3.offsetY, -this.TrimLeft3.offsetZ); - GL11.glTranslatef(-this.TrimLeft3.rotationPointX * f5, -this.TrimLeft3.rotationPointY * f5, -this.TrimLeft3.rotationPointZ * f5); - this.TrimLeft3.render(f5); - GL11.glPopMatrix(); - this.ArmRight.render(f5); - GL11.glPushMatrix(); - GL11.glTranslatef(this.TrimRight3.offsetX, this.TrimRight3.offsetY, this.TrimRight3.offsetZ); - GL11.glTranslatef(this.TrimRight3.rotationPointX * f5, this.TrimRight3.rotationPointY * f5, this.TrimRight3.rotationPointZ * f5); - GL11.glScaled(0.5D, 0.5D, 1.0D); - GL11.glTranslatef(-this.TrimRight3.offsetX, -this.TrimRight3.offsetY, -this.TrimRight3.offsetZ); - GL11.glTranslatef(-this.TrimRight3.rotationPointX * f5, -this.TrimRight3.rotationPointY * f5, -this.TrimRight3.rotationPointZ * f5); - this.TrimRight3.render(f5); - GL11.glPopMatrix(); - this.Left.render(f5); - this.Right.render(f5); - this.field_78124_i.render(f5); - this.Button.render(f5); - this.Collar.render(f5); - this.Back.render(f5); - this.RightFront.render(f5); - this.TrimLeft4.render(f5); - this.TrimLeft2.render(f5); - this.LeftFront.render(f5); - this.TrimRight4.render(f5); - this.ArmLeft.render(f5); - GL11.glPushMatrix(); - GL11.glTranslatef(this.Flop.offsetX, this.Flop.offsetY, this.Flop.offsetZ); - GL11.glTranslatef(this.Flop.rotationPointX * f5, this.Flop.rotationPointY * f5, this.Flop.rotationPointZ * f5); - GL11.glScaled(1.1D, 1.0D, 1.0D); - GL11.glTranslatef(-this.Flop.offsetX, -this.Flop.offsetY, -this.Flop.offsetZ); - GL11.glTranslatef(-this.Flop.rotationPointX * f5, -this.Flop.rotationPointY * f5, -this.Flop.rotationPointZ * f5); - this.Flop.render(f5); - GL11.glPopMatrix(); - this.Belt.render(f5); - this.Chest.render(f5); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/main/java/gmail/Lance5057/armor/renderers/ModelSheath.java b/src/main/java/gmail/Lance5057/armor/renderers/ModelSheath.java deleted file mode 100644 index 0f86778..0000000 --- a/src/main/java/gmail/Lance5057/armor/renderers/ModelSheath.java +++ /dev/null @@ -1,105 +0,0 @@ -package gmail.Lance5057.armor.renderers; - -import gmail.Lance5057.TinkersDefense; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; - -/** - * ModelBiped - Either Mojang or a mod author - * Created using Tabula 4.1.1 - */ -public class ModelSheath extends ModelBiped { - public ModelRenderer sheath; - public ModelRenderer belt; - - String Color[]; - int rgbColors[]; - - public ModelSheath(String color[] /*4*/) { - this.textureWidth = 32; - this.textureHeight = 32; - this.belt = new ModelRenderer(this, 16, 0); - this.belt.setRotationPoint(-4.5F, 0.0F, 0.5F); - this.belt.addBox(0.0F, 0.0F, -3.0F, 1, 12, 5, 0.0F); - this.setRotateAngle(belt, 0.0F, 0.0F, -0.7853981633974483F); - this.sheath = new ModelRenderer(this, 0, 0); - this.sheath.setRotationPoint(-0.3F, 3.5F, 2.0F); - this.sheath.addBox(-3.0F, 0.0F, 0.0F, 6, 24, 2, 0.0F); - this.setRotateAngle(sheath, 0.0F, 0.0F, -0.45F); - - Color = color; - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - - GL11.glPushMatrix(); - - //Sheath Base - GL11.glPushMatrix(); - rgbColors = TinkersDefense.hexToRGB(Color[1]); - GL11.glColor3d((float)rgbColors[0]/255, (float)rgbColors[1]/255, (float)rgbColors[2]/255); - - GL11.glTranslatef(this.sheath.offsetX, this.sheath.offsetY, this.sheath.offsetZ); - GL11.glTranslatef(this.sheath.rotationPointX * f5, this.sheath.rotationPointY * f5, this.sheath.rotationPointZ * f5); - GL11.glScaled(0.65D, 0.65D, 0.5D); - GL11.glTranslatef(-this.sheath.offsetX, -this.sheath.offsetY, -this.sheath.offsetZ); - GL11.glTranslatef(-this.sheath.rotationPointX * f5, -this.sheath.rotationPointY * f5, -this.sheath.rotationPointZ * f5); - - this.sheath.render(f5); - GL11.glPopMatrix(); - - //Belt - GL11.glPushMatrix(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/armor/Sheath/_sheath_belt.png")); - - rgbColors = TinkersDefense.hexToRGB(Color[2]); - GL11.glColor3d((float)rgbColors[0]/255, (float)rgbColors[1]/255, (float)rgbColors[2]/255); - - this.belt.render(f5); - GL11.glPopMatrix(); - - //Buckle - GL11.glPushMatrix(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/armor/Sheath/_sheath_clasp.png")); - - rgbColors = TinkersDefense.hexToRGB(Color[3]); - GL11.glColor3d((float)rgbColors[0]/255, (float)rgbColors[1]/255, (float)rgbColors[2]/255); - - this.belt.render(f5); - GL11.glPopMatrix(); - - //Filigree - GL11.glPushMatrix(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/armor/Sheath/_sheath_filigree.png")); - - rgbColors = TinkersDefense.hexToRGB(Color[0]); - GL11.glColor3d((float)rgbColors[0]/255, (float)rgbColors[1]/255, (float)rgbColors[2]/255); - - GL11.glTranslatef(this.sheath.offsetX, this.sheath.offsetY, this.sheath.offsetZ); - GL11.glTranslatef(this.sheath.rotationPointX * f5, this.sheath.rotationPointY * f5, this.sheath.rotationPointZ * f5); - GL11.glScaled(0.65D, 0.65D, 0.5D); - GL11.glTranslatef(-this.sheath.offsetX, -this.sheath.offsetY, -this.sheath.offsetZ); - GL11.glTranslatef(-this.sheath.rotationPointX * f5, -this.sheath.rotationPointY * f5, -this.sheath.rotationPointZ * f5); - - this.sheath.render(f5); - GL11.glPopMatrix(); - - GL11.glPopMatrix(); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/main/java/gmail/Lance5057/armor/renderers/ModelTinkerArmor.java b/src/main/java/gmail/Lance5057/armor/renderers/ModelTinkerArmor.java deleted file mode 100644 index d97d7fb..0000000 --- a/src/main/java/gmail/Lance5057/armor/renderers/ModelTinkerArmor.java +++ /dev/null @@ -1,109 +0,0 @@ -// Date: 1/19/2015 11:08:25 PM -// Template version 1.1 -// Java generated by Techne -// Keep in mind that you still need to fill in some blanks -// - ZeuX - -package gmail.Lance5057.armor.renderers; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelTinkerArmor extends ModelBiped -{ - //fields - ModelRenderer BackPlate; - ModelRenderer BreastPlate; - ModelRenderer Plackart; - ModelRenderer PauldronL; - ModelRenderer ArmL; - ModelRenderer PauldronR; - ModelRenderer ArmR; - - public ModelTinkerArmor(float f) - { - super(f, 0, 64,64); - textureWidth = 64; - textureHeight = 64; - - BackPlate = new ModelRenderer(this, 0, 56); - BackPlate.addBox(-4F, 0F, 1F, 8, 5, 3); - BackPlate.setRotationPoint(0F, 0F, 0F); - BackPlate.setTextureSize(64, 32); - BackPlate.mirror = true; - setRotation(BackPlate, -0.0872665F, 0F, 0F); - this.bipedBody.addChild(BackPlate); - - BreastPlate = new ModelRenderer(this, 0, 32); - BreastPlate.addBox(-4F, -1F, -5F, 8, 6, 4); - BreastPlate.setRotationPoint(0F, 0F, 0F); - BreastPlate.setTextureSize(64, 32); - BreastPlate.mirror = true; - setRotation(BreastPlate, 0.4363323F, 0F, 0F); - this.bipedBody.addChild(BreastPlate); - - Plackart = new ModelRenderer(this, 0, 42); - Plackart.addBox(-4F, 5F, -3F, 8, 7, 6); - Plackart.setRotationPoint(0F, 0F, 0F); - Plackart.setTextureSize(64, 32); - Plackart.mirror = true; - setRotation(Plackart, 0F, 0F, 0F); - this.bipedBody.addChild(Plackart); - - PauldronL = new ModelRenderer(this, 28, 32); - PauldronL.addBox(1F, -2F, -3.5F, 5, 5, 7); - PauldronL.setRotationPoint(0F, 0F, 0F); - PauldronL.setTextureSize(64, 32); - PauldronL.mirror = true; - setRotation(PauldronL, 0F, 0F, -0.7853982F); - this.bipedLeftArm.addChild(PauldronL); - - ArmL = new ModelRenderer(this, 28, 44); - ArmL.addBox(-1F, -2F, -3F, 5, 10, 6); - ArmL.setRotationPoint(0F, 0F, 0F); - ArmL.setTextureSize(64, 32); - ArmL.mirror = true; - setRotation(ArmL, 0F, 0F, 0F); - this.bipedLeftArm.addChild(ArmL); - - PauldronR = new ModelRenderer(this, 28, 32); - PauldronR.mirror = true; - PauldronR.addBox(-6F, -2F, -3.5F, 5, 5, 7); - PauldronR.setRotationPoint(0F, 0F, 0F); - PauldronR.setTextureSize(64, 32); - PauldronR.mirror = true; - setRotation(PauldronR, 0F, 0F, 0.7853982F); - PauldronR.mirror = false; - this.bipedRightArm.addChild(PauldronR); - - ArmR = new ModelRenderer(this, 28, 44); - ArmR.mirror = true; - ArmR.addBox(-4F, -2F, -3F, 5, 10, 6); - ArmR.setRotationPoint(0F, 0F, 0F); - ArmR.setTextureSize(64, 32); - ArmR.mirror = true; - setRotation(ArmR, 0F, 0F, 0F); - ArmR.mirror = false; - this.bipedRightArm.addChild(ArmR); - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - -} diff --git a/src/main/java/gmail/Lance5057/blocks/AeonSteelBlock.java b/src/main/java/gmail/Lance5057/blocks/AeonSteelBlock.java deleted file mode 100644 index 259132a..0000000 --- a/src/main/java/gmail/Lance5057/blocks/AeonSteelBlock.java +++ /dev/null @@ -1,15 +0,0 @@ -package gmail.Lance5057.blocks; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class AeonSteelBlock extends Block -{ - - public AeonSteelBlock (Material material) - { - super(material); - setHarvestLevel("pickaxe",2); - } - -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/blocks/CrestMount.java b/src/main/java/gmail/Lance5057/blocks/CrestMount.java deleted file mode 100644 index d1561ec..0000000 --- a/src/main/java/gmail/Lance5057/blocks/CrestMount.java +++ /dev/null @@ -1,150 +0,0 @@ -package gmail.Lance5057.blocks; - -import static net.minecraftforge.common.util.ForgeDirection.EAST; -import static net.minecraftforge.common.util.ForgeDirection.NORTH; -import static net.minecraftforge.common.util.ForgeDirection.SOUTH; -import static net.minecraftforge.common.util.ForgeDirection.WEST; -import gmail.Lance5057.TinkersDefense; -import gmail.Lance5057.tileentities.TileEntity_CrestMount; - -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityChest; -import net.minecraft.world.World; - -public class CrestMount extends BlockContainer { - public CrestMount() { - super(Material.iron); - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } - - @Override - public void onBlockAdded(World world, int i, int j, int k) - { - super.onBlockAdded(world, i, j, k); - world.markBlockForUpdate(i, j, k); - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, - EntityPlayer player, int metadata, float what, float these, float are) { - TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity == null || player.isSneaking()) { - return false; - } - //code to open gui explained later - player.openGui(TinkersDefense.instance, TinkersDefense.GUI_CREST_INV, player.worldObj, x, y, z); - return true; - } - - @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); - } - - private void dropItems(World world, int x, int y, int z){ - Random rand = new Random(); - - TileEntity tileEntity = world.getTileEntity(x, y, z); - if (!(tileEntity instanceof IInventory)) { - return; - } - IInventory inventory = (IInventory) tileEntity; - - for (int i = 0; i < inventory.getSizeInventory(); i++) { - ItemStack item = inventory.getStackInSlot(i); - - if (item != null && item.stackSize > 0) { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; - - EntityItem entityItem = new EntityItem(world, - x + rx, y + ry, z + rz, - new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - - if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } - - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } -} - - //You don't want the normal render type, or it wont render properly. - @Override - public int getRenderType() { - return -1; - } - - //It's not an opaque cube, so you need this. - @Override - public boolean isOpaqueCube() { - return false; - } - - //It's not a normal block, so you need this too. - public boolean renderAsNormalBlock() { - return false; - } - - //This is the icon to use for showing the block in your hand. - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister icon) { - this.blockIcon = icon.registerIcon("tinkersdefense:Item_CrestMount"); - } - - @Override - public TileEntity createNewTileEntity(World w, int md) { - TileEntity_CrestMount te = new TileEntity_CrestMount(); - return te; - } - - @Override - public int onBlockPlaced(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_) - { - int j1 = p_149660_9_; - - if ((p_149660_9_ == 0 || p_149660_5_ == 2) && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ + 1, NORTH)) - { - j1 = 1; - } - - if ((j1 == 0 || p_149660_5_ == 3) && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH)) - { - j1 = 2; - } - - if ((j1 == 0 || p_149660_5_ == 4) && p_149660_1_.isSideSolid(p_149660_2_ + 1, p_149660_3_, p_149660_4_, WEST)) - { - j1 = 3; - } - - if ((j1 == 0 || p_149660_5_ == 5) && p_149660_1_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST)) - { - j1 = 4; - } - - return j1; - } -} diff --git a/src/main/java/gmail/Lance5057/blocks/DogbeariumBlock.java b/src/main/java/gmail/Lance5057/blocks/DogbeariumBlock.java deleted file mode 100644 index b7f5c79..0000000 --- a/src/main/java/gmail/Lance5057/blocks/DogbeariumBlock.java +++ /dev/null @@ -1,15 +0,0 @@ -package gmail.Lance5057.blocks; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class DogbeariumBlock extends Block -{ - - public DogbeariumBlock (Material material) - { - super(material); - setHarvestLevel("pickaxe",2); - } - -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/blocks/FinishingAnvil.java b/src/main/java/gmail/Lance5057/blocks/FinishingAnvil.java deleted file mode 100644 index ac4dcf3..0000000 --- a/src/main/java/gmail/Lance5057/blocks/FinishingAnvil.java +++ /dev/null @@ -1,150 +0,0 @@ -package gmail.Lance5057.blocks; - -import static net.minecraftforge.common.util.ForgeDirection.EAST; -import static net.minecraftforge.common.util.ForgeDirection.NORTH; -import static net.minecraftforge.common.util.ForgeDirection.SOUTH; -import static net.minecraftforge.common.util.ForgeDirection.WEST; -import gmail.Lance5057.TinkersDefense; -import gmail.Lance5057.tileentities.TileEntity_FinishingAnvil; - -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityChest; -import net.minecraft.world.World; - -public class FinishingAnvil extends BlockContainer { - public FinishingAnvil() { - super(Material.iron); - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } - - @Override - public void onBlockAdded(World world, int i, int j, int k) - { - super.onBlockAdded(world, i, j, k); - world.markBlockForUpdate(i, j, k); - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, - EntityPlayer player, int metadata, float what, float these, float are) { - TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity == null || player.isSneaking()) { - return false; - } - //code to open gui explained later - player.openGui(TinkersDefense.instance, TinkersDefense.GUI_ANVIL_INV, player.worldObj, x, y, z); - return true; - } - - @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); - } - - private void dropItems(World world, int x, int y, int z){ - Random rand = new Random(); - - TileEntity tileEntity = world.getTileEntity(x, y, z); - if (!(tileEntity instanceof IInventory)) { - return; - } - IInventory inventory = (IInventory) tileEntity; - - for (int i = 0; i < inventory.getSizeInventory(); i++) { - ItemStack item = inventory.getStackInSlot(i); - - if (item != null && item.stackSize > 0) { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; - - EntityItem entityItem = new EntityItem(world, - x + rx, y + ry, z + rz, - new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - - if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } - - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } -} - - //You don't want the normal render type, or it wont render properly. - @Override - public int getRenderType() { - return -1; - } - - //It's not an opaque cube, so you need this. - @Override - public boolean isOpaqueCube() { - return false; - } - - //It's not a normal block, so you need this too. - public boolean renderAsNormalBlock() { - return false; - } - - //This is the icon to use for showing the block in your hand. - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister icon) { - this.blockIcon = icon.registerIcon("tinkersdefense:WIP"); - } - - @Override - public TileEntity createNewTileEntity(World w, int md) { - TileEntity_FinishingAnvil te = new TileEntity_FinishingAnvil(); - return te; - } - - @Override - public int onBlockPlaced(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_) - { - int j1 = p_149660_9_; - - if ((p_149660_9_ == 0 || p_149660_5_ == 2) && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ + 1, NORTH)) - { - j1 = 1; - } - - if ((j1 == 0 || p_149660_5_ == 3) && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH)) - { - j1 = 2; - } - - if ((j1 == 0 || p_149660_5_ == 4) && p_149660_1_.isSideSolid(p_149660_2_ + 1, p_149660_3_, p_149660_4_, WEST)) - { - j1 = 3; - } - - if ((j1 == 0 || p_149660_5_ == 5) && p_149660_1_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST)) - { - j1 = 4; - } - - return j1; - } -} diff --git a/src/main/java/gmail/Lance5057/blocks/JewelersBench.java b/src/main/java/gmail/Lance5057/blocks/JewelersBench.java deleted file mode 100644 index 8f7580c..0000000 --- a/src/main/java/gmail/Lance5057/blocks/JewelersBench.java +++ /dev/null @@ -1,50 +0,0 @@ -package gmail.Lance5057.blocks; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gmail.Lance5057.tileentities.TileEntity_JewelersBench; -import net.minecraft.block.Block; -import net.minecraft.block.ITileEntityProvider; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class JewelersBench extends Block implements ITileEntityProvider -{ - - public JewelersBench() { - super(Material.iron); - } - - //You don't want the normal render type, or it wont render properly. - @Override - public int getRenderType() { - return -1; - } - - //It's not an opaque cube, so you need this. - @Override - public boolean isOpaqueCube() { - return false; - } - - //It's not a normal block, so you need this too. - public boolean renderAsNormalBlock() { - return false; - } - - //This is the icon to use for showing the block in your hand. - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister icon) { - this.blockIcon = icon.registerIcon("tinkersdefense:WIP"); - } - - @Override - public TileEntity createNewTileEntity(World w, int md) { - TileEntity_JewelersBench te = new TileEntity_JewelersBench(); - return te; - } - -} diff --git a/src/main/java/gmail/Lance5057/blocks/QueensGoldBlock.java b/src/main/java/gmail/Lance5057/blocks/QueensGoldBlock.java deleted file mode 100644 index 0ad2376..0000000 --- a/src/main/java/gmail/Lance5057/blocks/QueensGoldBlock.java +++ /dev/null @@ -1,15 +0,0 @@ -package gmail.Lance5057.blocks; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class QueensGoldBlock extends Block -{ - - public QueensGoldBlock (Material material) - { - super(material); - setHarvestLevel("pickaxe",2); - } - -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/containers/Container_CrestMount.java b/src/main/java/gmail/Lance5057/containers/Container_CrestMount.java deleted file mode 100644 index 4cdeb42..0000000 --- a/src/main/java/gmail/Lance5057/containers/Container_CrestMount.java +++ /dev/null @@ -1,46 +0,0 @@ -package gmail.Lance5057.containers; - -import gmail.Lance5057.tileentities.TileEntity_CrestMount; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class Container_CrestMount extends Container -{ - - public Container_CrestMount(InventoryPlayer inventoryPlayer, TileEntity_CrestMount te) - { - addSlotToContainer(new Slot(te, 0, 62, 28)); - addSlotToContainer(new Slot(te, 1, 98, 28)); - addSlotToContainer(new Slot(te, 2, 80, 28)); - addSlotToContainer(new Slot(te, 3, 80, 46)); - - for (int x = 0; x < 9; x++) - { - addSlotToContainer(new Slot(inventoryPlayer, x, 8 + 18 * x, 142)); - } - - for (int y = 0; y < 3; y++) - { - for (int x = 0; x < 9; x++) - { - addSlotToContainer(new Slot(inventoryPlayer, x + y * 9 + 9, 8 + 18 * x, 84 + y * 18)); - } - } - } - - @Override - public boolean canInteractWith(EntityPlayer player) { - - return true; - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) - { - return null; - } -} - diff --git a/src/main/java/gmail/Lance5057/containers/Container_FinishingAnvil.java b/src/main/java/gmail/Lance5057/containers/Container_FinishingAnvil.java deleted file mode 100644 index ab7d15a..0000000 --- a/src/main/java/gmail/Lance5057/containers/Container_FinishingAnvil.java +++ /dev/null @@ -1,41 +0,0 @@ -package gmail.Lance5057.containers; - -import gmail.Lance5057.tileentities.TileEntity_FinishingAnvil; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class Container_FinishingAnvil extends Container -{ - public Container_FinishingAnvil(InventoryPlayer inventoryPlayer, TileEntity_FinishingAnvil te) - { - addSlotToContainer(new Slot(te, 0, 48, 32)); - - for (int x = 0; x < 9; x++) - { - addSlotToContainer(new Slot(inventoryPlayer, x, 8 + 18 * x, 142)); - } - - for (int y = 0; y < 3; y++) - { - for (int x = 0; x < 9; x++) - { - addSlotToContainer(new Slot(inventoryPlayer, x + y * 9 + 9, 8 + 18 * x, 84 + y * 18)); - } - } - } - - @Override - public boolean canInteractWith(EntityPlayer p_75145_1_) - { - return true; - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) - { - return null; - } -} diff --git a/src/main/java/gmail/Lance5057/events/TDEventHandler.java b/src/main/java/gmail/Lance5057/events/TDEventHandler.java deleted file mode 100644 index bd46ed9..0000000 --- a/src/main/java/gmail/Lance5057/events/TDEventHandler.java +++ /dev/null @@ -1,84 +0,0 @@ -package gmail.Lance5057.events; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityFireball; -import net.minecraft.entity.projectile.EntityLargeFireball; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.DamageSource; -import net.minecraft.util.Vec3; -import net.minecraftforge.common.MinecraftForge; -import mods.battlegear2.api.PlayerEventChild.ShieldBlockEvent; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; - -public class TDEventHandler { - - public TDEventHandler() { - MinecraftForge.EVENT_BUS.register(this); - } - - @SubscribeEvent - public void TD_ShieldBlock(ShieldBlockEvent event) - { - NBTTagCompound tags = event.shield.getTagCompound().getCompoundTag("InfiTool"); - - if (!tags.getBoolean("Broken")) - { - event.getPlayer().addChatComponentMessage(new ChatComponentText("Pow!")); - - if(tags.hasKey("Crest of Mirrors")) - { - Entity test = event.source.getSourceOfDamage(); - - - if(event.source.getSourceOfDamage() instanceof EntityLargeFireball || - event.source.getSourceOfDamage() instanceof EntityFireball ) - { - EntityFireball ent = (EntityFireball) event.source.getSourceOfDamage(); - //EntityFireball newEnt = new EntityFireball(); - Vec3 playerlook = event.getPlayer().getLookVec(); - - //ent.attackEntityFrom(, 1); - - - //ent.setBeenAttacked(); - - ent.motionX = playerlook.xCoord; - ent.motionY = playerlook.yCoord; - ent.motionZ = playerlook.zCoord; - ent.accelerationX = ent.motionX * 0.1D; - ent.accelerationY = ent.motionY * 0.1D; - ent.accelerationZ = ent.motionZ * 0.1D; - - ent.shootingEntity = event.getPlayer(); - - ent.motionX += ent.accelerationX*2; - ent.motionY += ent.accelerationY*2; - ent.motionZ += ent.accelerationZ*2; - - //ent. - - ent.setDead(); - - event.getPlayer().addChatComponentMessage(new ChatComponentText("Nom")); - } - } - - if(tags.hasKey("Crest of Legends")) - { - event.getPlayer().addPotionEffect(new PotionEffect(Potion.fireResistance.getId(),4,30)); - event.getPlayer().addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(),4,30)); - event.getPlayer().addPotionEffect(new PotionEffect(Potion.resistance.getId(),4,30)); - } - - if(tags.hasKey("Crest of Vampires")) - { - event.getPlayer().heal(event.ammount/tags.getInteger("Crest of Vampires")); - } - } - } -} diff --git a/src/main/java/gmail/Lance5057/gui/Gui_CrestMount.java b/src/main/java/gmail/Lance5057/gui/Gui_CrestMount.java deleted file mode 100644 index cbd3b8d..0000000 --- a/src/main/java/gmail/Lance5057/gui/Gui_CrestMount.java +++ /dev/null @@ -1,89 +0,0 @@ -package gmail.Lance5057.gui; - -import gmail.Lance5057.TinkersDefense; -import gmail.Lance5057.containers.Container_CrestMount; -import gmail.Lance5057.network.Message_CrestMount; -import gmail.Lance5057.tileentities.TileEntity_CrestMount; - -import javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -public class Gui_CrestMount extends GuiContainer -{ -private float xSize_lo; -private float ySize_lo; - -private static final ResourceLocation iconLocation = new ResourceLocation("tinkersdefense", "textures/gui/crest_mount.png"); - -private final TileEntity_CrestMount inventory; - -public Gui_CrestMount(InventoryPlayer invPlayer, TileEntity_CrestMount te_crest) -{ -super(new Container_CrestMount(invPlayer, te_crest)); -this.inventory = te_crest; - - -} - -@Override -public void initGui() -{ - super.initGui(); - this.buttonList.add(new GuiButton(1,this.guiLeft + 61, this.guiTop + 8, 18, 18,"Flip")); - this.buttonList.add(new GuiButton(3,this.guiLeft + 79, this.guiTop + 8, 18, 18,"Flip")); - this.buttonList.add(new GuiButton(2,this.guiLeft + 97, this.guiTop + 8, 18, 18,"Flip")); - - this.buttonList.add(new GuiButton(4,this.guiLeft + 79, this.guiTop + 63, 18, 18,"Flip")); -} - -@Override -protected void actionPerformed(GuiButton button) -{ - for(int i = 1; i<5; i++) - { - if(button.id == i) - { - if(inventory.flip[i-1]==false) - inventory.flip[i-1]=true; - else - inventory.flip[i-1]=false; - - TinkersDefense.INSTANCE.sendToServer(new Message_CrestMount(inventory.xCoord, inventory.yCoord, inventory.zCoord, inventory.flip)); - } - } -} - -public void drawScreen(int par1, int par2, float par3) -{ -super.drawScreen(par1, par2, par3); -this.xSize_lo = (float)par1; -this.ySize_lo = (float)par2; -} - -protected void drawGuiContainerForegroundLayer(int par1, int par2) -{ - -} - -protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) -{ -GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); -this.mc.getTextureManager().bindTexture(iconLocation); -int k = (this.width - this.xSize) / 2; -int l = (this.height - this.ySize) / 2; -this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); -} -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/gui/Gui_FinishingAnvil.java b/src/main/java/gmail/Lance5057/gui/Gui_FinishingAnvil.java deleted file mode 100644 index 0e16dd8..0000000 --- a/src/main/java/gmail/Lance5057/gui/Gui_FinishingAnvil.java +++ /dev/null @@ -1,235 +0,0 @@ -package gmail.Lance5057.gui; - -import gmail.Lance5057.TinkersDefense; -import gmail.Lance5057.containers.Container_CrestMount; -import gmail.Lance5057.containers.Container_FinishingAnvil; -import gmail.Lance5057.network.Message_CrestMount; -import gmail.Lance5057.network.Message_FinishingAnvil; -import gmail.Lance5057.tileentities.TileEntity_CrestMount; -import gmail.Lance5057.tileentities.TileEntity_FinishingAnvil; - -import org.lwjgl.opengl.GL11; - -import tconstruct.library.TConstructRegistry; -import tconstruct.library.tools.ToolCore; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; - -public class Gui_FinishingAnvil extends GuiContainer -{ - private float xSize_lo; - private float ySize_lo; - - private ItemStack bigCopy; - private Boolean isNull = true; - private ItemStack editItem; - private RenderItem bigRender = new RenderItem_FinishingAnvil(this); - - public final TileEntity_FinishingAnvil inventory; - private ResourceLocation forGui; - - private int leftButtonPosX = 0; - private int leftButtonPosY = 0; - private int xLIcon_one, yLIcon_one; - private int xLIcon_two, yLIcon_two; - private int xLIcon_three, yLIcon_three; - private int leftSelect = 0; - - private int rightButtonPosX = 0; - private int rightButtonPosY = 2; - private int xRIcon_one, yRIcon_one; - private int xRIcon_two, yRIcon_two; - private int xRIcon_three, yRIcon_three; - - String[] renders; - - NBTTagCompound tags; - - private static final ResourceLocation iconLocation = new ResourceLocation("tinkersdefense", "textures/gui/finishinganvil.png"); - - public Gui_FinishingAnvil(InventoryPlayer invPlayer, TileEntity_FinishingAnvil te) - { - super(new Container_FinishingAnvil(invPlayer, te)); - this.inventory = te; - - renders = new String[4]; - renders[0] = "Head"; - renders[1] = "Accessory"; - renders[2] = "Handle"; - renders[3] = "Extra"; - } - - @Override - public void initGui() - { - super.initGui(); - this.buttonList.add(new GuiButton(1 ,this.guiLeft+25, this.guiTop+10, 10, 10,"▲")); - this.buttonList.add(new GuiButton(2 ,this.guiLeft+25, this.guiTop+59, 10, 10,"▼")); - this.buttonList.add(new GuiButton(3 ,this.guiLeft+47, this.guiTop+49, 18, 18,"✓")); - - this.buttonList.add(new GuiButton(4 ,this.guiLeft+5, this.guiTop+10, 20, 20,"")); - this.buttonList.add(new GuiButton(5 ,this.guiLeft+5, this.guiTop+30, 20, 20,"")); - this.buttonList.add(new GuiButton(6 ,this.guiLeft+5, this.guiTop+50, 20, 20,"")); - - this.buttonList.add(new GuiButton(7 ,this.guiLeft+120, this.guiTop+10, 10, 10,"▲")); - this.buttonList.add(new GuiButton(8 ,this.guiLeft+120, this.guiTop+59, 10, 10,"▼")); - - this.buttonList.add(new GuiButton(9 ,this.guiLeft+130, this.guiTop+10, 20, 20,"")); - this.buttonList.add(new GuiButton(10 ,this.guiLeft+130, this.guiTop+30, 20, 20,"")); - this.buttonList.add(new GuiButton(11 ,this.guiLeft+130, this.guiTop+50, 20, 20,"")); - - } - - @Override - protected void actionPerformed(GuiButton button) - { - if(tags != null) - switch(button.id) - { - case 1: if(this.leftButtonPosX > 0) this.leftButtonPosX--; break; - case 2: if(this.leftButtonPosX+2 < ((ToolCore)bigCopy.getItem()).getPartAmount() - 1) this.leftButtonPosX++; break; - - case 3: - TinkersDefense.INSTANCE.sendToServer(new Message_FinishingAnvil(inventory.xCoord, inventory.yCoord, inventory.zCoord, this.bigCopy)); - break; - - case 4: leftSelect = 0; rightButtonPosY = 2; break; - case 5: leftSelect = 1; rightButtonPosY = 3; break; - case 6: leftSelect = 2; rightButtonPosY = 4; break; - - case 7: if(this.rightButtonPosX > 0) this.rightButtonPosX--; break; - case 8: this.rightButtonPosX++; break; - - case 9: - if(tags.hasKey("Render"+renders[leftSelect])) - { - tags.setInteger("Render"+renders[leftSelect], bigCopy.getTagCompound().getCompoundTag("InfiTool").getInteger(renders[leftSelect]) + ((rightButtonPosX) * TinkersDefense.config.MaterialIndex)); - if(rightButtonPosX > 0) - tags.setInteger(renders[leftSelect]+"Color", TConstructRegistry.getMaterial(tags.getInteger(renders[leftSelect])).primaryColor()); - else - tags.removeTag(renders[leftSelect]+"Color"); - } - break; - - case 10: - if(tags.hasKey("Render"+renders[leftSelect])) - { - tags.setInteger("Render"+renders[leftSelect], bigCopy.getTagCompound().getCompoundTag("InfiTool").getInteger(renders[leftSelect]) + ((rightButtonPosX + 1) * TinkersDefense.config.MaterialIndex)); - tags.setInteger(renders[leftSelect]+"Color", TConstructRegistry.getMaterial(tags.getInteger(renders[leftSelect])).primaryColor()); - } - break; - - case 11: - if(tags.hasKey("Render"+renders[leftSelect])) - { - tags.setInteger("Render"+renders[leftSelect], bigCopy.getTagCompound().getCompoundTag("InfiTool").getInteger(renders[leftSelect]) + ((rightButtonPosX + 2) * TinkersDefense.config.MaterialIndex)); - tags.setInteger(renders[leftSelect]+"Color", TConstructRegistry.getMaterial(tags.getInteger(renders[leftSelect])).primaryColor()); - } - break; - } - } - public void drawScreen(int par1, int par2, float par3) - { - - - if(inventory.getStackInSlot(0) != null && isNull == true - /*inventory.getStackInSlot(0).getItem() != this.bigCopy*/) - { - this.bigCopy = inventory.getStackInSlot(0).copy(); - if(bigCopy.hasTagCompound() && bigCopy.getTagCompound().hasKey("InfiTool")) - tags = bigCopy.getTagCompound().getCompoundTag("InfiTool"); - isNull = false; - } - else if(inventory.getStackInSlot(0) == null) - { - this.bigCopy = null; - isNull = true; - } - - super.drawScreen(par1, par2, par3); - this.xSize_lo = (float)par1; - this.ySize_lo = (float)par2; - } - - protected void drawGuiContainerForegroundLayer(int par1, int par2) - { - this.forGui = new ResourceLocation("tinkersdefense", "textures/gui/finishinganvil.png"); - - this.xLIcon_one = 0; - this.yLIcon_one = 176; - this.xLIcon_two = 0; - this.yLIcon_two = 176; - this.xLIcon_three = 0; - this.yLIcon_three = 176; - - this.xRIcon_one = 0; - this.yRIcon_one = 176; - this.xRIcon_two = 0; - this.yRIcon_two = 176; - this.xRIcon_three = 0; - this.yRIcon_three = 176; - - if(inventory.getStackInSlot(0) != null) - { - editItem = inventory.getStackInSlot(0); - if(editItem.getItem() instanceof ToolCore) - { - //this.drawTexturedModelRectFromIcon(this.guiLeft+4, this.guiTop+14, - // ((ToolCore)this.inventorySlots.inventorySlots.get(0)).getHeadItem(), 16, 16); - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.forGui = new ResourceLocation("tinkersdefense","textures/gui/"+((ToolCore)editItem.getItem()).getDefaultFolder()+".png"); - this.xLIcon_one = 32; - this.yLIcon_one = 0; - this.xLIcon_two = 48; - this.yLIcon_two = 0; - this.xLIcon_three = 64; - this.yLIcon_three = 0; - - this.xRIcon_one = 0; - this.yRIcon_one = 0; - this.xRIcon_two = 16; - this.yRIcon_two = 0; - this.xRIcon_three = 32; - this.yRIcon_three = 0; - } - } - - this.mc.getTextureManager().bindTexture(this.forGui); - if(inventory.getStackInSlot(0) != null) - this.drawTexturedModalRect(7,12 + (leftSelect * 20),16,0,16,16); - - this.drawTexturedModalRect(7,12,this.xLIcon_one+(this.leftButtonPosX*16),this.yLIcon_one+(this.leftButtonPosY*16),16,16); - this.drawTexturedModalRect(7,32,this.xLIcon_two+(this.leftButtonPosX*16),this.yLIcon_two+(this.leftButtonPosY*16),16,16); - this.drawTexturedModalRect(7,52,this.xLIcon_three+(this.leftButtonPosX*16),this.yLIcon_three+(this.leftButtonPosY*16),16,16); - - this.drawTexturedModalRect(132,12,this.xRIcon_one+(this.rightButtonPosX*16),this.yRIcon_one+(this.rightButtonPosY*16),16,16); - this.drawTexturedModalRect(132,32,this.xRIcon_two+(this.rightButtonPosX*16),this.yRIcon_two+(this.rightButtonPosY*16),16,16); - this.drawTexturedModalRect(132,52,this.xRIcon_three+(this.rightButtonPosX*16),this.yRIcon_three+(this.rightButtonPosY*16),16,16); - - bigRender.renderItemAndEffectIntoGUI(fontRendererObj, this.mc.getTextureManager(), bigCopy, 23, 5); - - } - - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(iconLocation); - int k = ((this.width - this.xSize) / 2); - int l = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(k, l, 0, 0, this.xSize+80, this.ySize); - } - - protected void injectIcons() - { - - } -} diff --git a/src/main/java/gmail/Lance5057/gui/RenderItem_FinishingAnvil.java b/src/main/java/gmail/Lance5057/gui/RenderItem_FinishingAnvil.java deleted file mode 100644 index 6c67d44..0000000 --- a/src/main/java/gmail/Lance5057/gui/RenderItem_FinishingAnvil.java +++ /dev/null @@ -1,43 +0,0 @@ -package gmail.Lance5057.gui; - -import org.lwjgl.opengl.GL11; - -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class RenderItem_FinishingAnvil extends RenderItem -{ - private Gui_FinishingAnvil anvilGui; - RenderItem_FinishingAnvil(Gui_FinishingAnvil gui) - { - super(); - anvilGui = gui; - } - - @Override - public void renderItemAndEffectIntoGUI(FontRenderer fontRenderer, TextureManager textureManager, ItemStack itemStack, int x, int y) - { - if (itemStack == null) - { - return; - } - - RenderHelper.enableGUIStandardItemLighting(); - - Slot slot = anvilGui.inventorySlots.getSlotFromInventory(anvilGui.inventory, 0); - - if(slot.getStack() != null) - { - GL11.glPushMatrix(); - - GL11.glScalef(3.0f,3.0f,1.0f); - super.renderItemAndEffectIntoGUI(fontRenderer, textureManager, itemStack, x, y); - - GL11.glPopMatrix(); - } - } -} diff --git a/src/main/java/gmail/Lance5057/items/AeonSteelIngot.java b/src/main/java/gmail/Lance5057/items/AeonSteelIngot.java deleted file mode 100644 index 793507a..0000000 --- a/src/main/java/gmail/Lance5057/items/AeonSteelIngot.java +++ /dev/null @@ -1,12 +0,0 @@ -package gmail.Lance5057.items; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; - -public class AeonSteelIngot extends Item -{ - public AeonSteelIngot() - { - - } -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/items/Crest_Feathers.java b/src/main/java/gmail/Lance5057/items/Crest_Feathers.java deleted file mode 100644 index 29b2bbf..0000000 --- a/src/main/java/gmail/Lance5057/items/Crest_Feathers.java +++ /dev/null @@ -1,5 +0,0 @@ -package gmail.Lance5057.items; - -public class Crest_Feathers { - -} diff --git a/src/main/java/gmail/Lance5057/items/DogbeariumIngot.java b/src/main/java/gmail/Lance5057/items/DogbeariumIngot.java deleted file mode 100644 index 539dd08..0000000 --- a/src/main/java/gmail/Lance5057/items/DogbeariumIngot.java +++ /dev/null @@ -1,11 +0,0 @@ -package gmail.Lance5057.items; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; - -public class DogbeariumIngot extends Item -{ - public DogbeariumIngot() - { - - } -} diff --git a/src/main/java/gmail/Lance5057/items/Injector.java b/src/main/java/gmail/Lance5057/items/Injector.java deleted file mode 100644 index c1e5eb9..0000000 --- a/src/main/java/gmail/Lance5057/items/Injector.java +++ /dev/null @@ -1,172 +0,0 @@ -package gmail.Lance5057.items; - -import gmail.Lance5057.TinkersDefense; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import tconstruct.library.crafting.PatternBuilder; -import tconstruct.library.crafting.PatternBuilder.MaterialSet; -import tconstruct.library.tools.ToolCore; -import tconstruct.tools.TinkerTools; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.Item; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -public class Injector extends ToolCore -{ - - ToolCore tool; - - public Injector(int baseDamage, ToolCore tool) { - super(baseDamage); - this.tool = tool; - } - - List heads = new ArrayList(); - List accessorys= new ArrayList(); - List handles = new ArrayList(); - List extras = new ArrayList(); - - protected void loadHeads(IIconRegister iconRegister) - { - IIcon origHead = TinkerTools.broadsword.headIcons.get(-1); - IIcon origAccessory = TinkerTools.broadsword.accessoryIcons.get(-1); - IIcon origHandle = TinkerTools.broadsword.handleIcons.get(-1); - - //File[] icons = new File("tinkersdefense:items/" + tool.getDefaultFolder()).listFiles(); - ResourceLocation icons = new ResourceLocation("tinkersdefense", tool.getDefaultFolder()); - String test = icons.toString(); - for(int i = 0; i entry : pb.materialSets.entrySet()) - { - String icon = "tinkersdefense:"; - icon += TinkerTools.broadsword.getDefaultFolder() + "/" + entry.getKey().toLowerCase() + "/" + heads.get(i); - //toolIcons[i] = icon; - headStrings.put(entry.getValue().materialID+(TinkersDefense.config.MaterialIndex*(i+1)), icon); - } - - addIcons(headStrings, headIcons, iconRegister, heads.get(i), false); - - for(int j = (i+1)*TinkersDefense.config.MaterialIndex; j entry : pb.materialSets.entrySet()) - { - String icon = "tinkersdefense:"; - icon += TinkerTools.broadsword.getDefaultFolder() + "/" + entry.getKey().toLowerCase() + "/" + accessorys.get(i); - //toolIcons[i] = icon; - accessoryStrings.put(entry.getValue().materialID+(TinkersDefense.config.MaterialIndex*(i+1)), icon); - } - - addIcons(accessoryStrings, accessoryIcons, iconRegister, accessorys.get(i), false); - - for(int j = (i+1)*TinkersDefense.config.MaterialIndex; j entry : pb.materialSets.entrySet()) - { - String icon = "tinkersdefense:"; - icon += TinkerTools.broadsword.getDefaultFolder() + "/" + entry.getKey().toLowerCase() + "/" + handles.get(i); - //toolIcons[i] = icon; - handleStrings.put(entry.getValue().materialID+(TinkersDefense.config.MaterialIndex*(i+1)), icon); - } - - addIcons(handleStrings, handleIcons, iconRegister, handles.get(i), false); - - for(int j = (i+1)*TinkersDefense.config.MaterialIndex; j 0) { - par3List.add(String.format("%s%s %s", EnumChatFormatting.GOLD, - arrowCount, StatCollector - .translateToLocal("attribute.shield.arrow.count"))); - } - } - - @Override - protected String getHarvestType() { - return "shield"; - } -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/items/tools/RoundShield.java b/src/main/java/gmail/Lance5057/items/tools/RoundShield.java deleted file mode 100644 index 45ea263..0000000 --- a/src/main/java/gmail/Lance5057/items/tools/RoundShield.java +++ /dev/null @@ -1,156 +0,0 @@ -package gmail.Lance5057.items.tools; - -import gmail.Lance5057.TinkersDefense; - -import java.util.List; - -import mods.battlegear2.api.ISheathed; -import mods.battlegear2.api.shield.IArrowCatcher; -import mods.battlegear2.api.shield.IArrowDisplay; -import mods.battlegear2.api.shield.IShield; -import net.minecraft.block.material.Material; -import net.minecraft.entity.Entity; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import tconstruct.library.tools.AbilityHelper; -import tconstruct.library.tools.HarvestTool; -import tconstruct.tools.TinkerTools; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class RoundShield extends Shield { - int induceDamage = 0; - - public RoundShield() { - super(0); - this.setUnlocalizedName("shield"); - } - - @Override - public Item getHeadItem() { - return TinkersDefense.partArmorplate; - } - - @Override - public Item getHandleItem() { - return TinkerTools.toolRod; - } - - @Override - public Item getAccessoryItem() { - return TinkerTools.frypanHead; - } - - @Override - public int durabilityTypeAccessory() { - return 2; - } - - @Override - public float getRepairCost() { - return 4.0f; - } - - @Override - public float getDurabilityModifier() { - return 1.5f; - } - - @Override - public float breakSpeedModifier() { - return 0.4f; - } - - @Override - public float getDamageModifier() { - return 0f; - } - - @Override - public int getPartAmount() { - return 3; - } - - @Override - public String getIconSuffix(int partType) { - switch (partType) { - case 0: - return "_shield_face"; - case 1: - return "_shield_face_broken"; - case 2: - return "_shield_edge"; - case 3: - return "_shield_boss"; - default: - return ""; - } - } - - @Override - public String getEffectSuffix() { - return "_shield_effect"; - } - - @Override - public String getDefaultFolder() { - return "shield"; - } - -// /* tool_TinkerShield specific */ -// @Override -// public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, -// Entity entity) { -// if (AbilityHelper.onLeftClickEntity(stack, player, entity, this)) { -// entity.hurtResistantTime += 7; -// /* -// * if (entity instanceof EntityLiving) { EntityLiving living = -// * (EntityLiving) entity; if (living.getHealth() <= 0) { -// * -// * } } -// */ -// // if (entity.getHealth() <= 0) -// } -// return true; -// } - - @Override - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, - boolean par5) { - super.onUpdate(stack, world, entity, par4, par5); - - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack par1ItemStack, - EntityPlayer par2EntityPlayer, List par3List, boolean par4) { - NBTTagCompound tags = par1ItemStack.getTagCompound(); - super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4); - par3List.add(""); - par3List.add(EnumChatFormatting.DARK_GREEN - + ItemStack.field_111284_a - .format(1F / (10f / (tags.getCompoundTag("InfiTool") - .getInteger("MiningSpeed") / 1.5f)) / 20F) - + StatCollector.translateToLocal("attribute.shield.block.time")); - int arrowCount = getArrowCount(par1ItemStack); - if (arrowCount > 0) { - par3List.add(String.format("%s%s %s", EnumChatFormatting.GOLD, - arrowCount, StatCollector - .translateToLocal("attribute.shield.arrow.count"))); - } - } - - @Override - protected String getHarvestType() { - return "shield"; - } -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/items/tools/Shield.java b/src/main/java/gmail/Lance5057/items/tools/Shield.java deleted file mode 100644 index 5c8af46..0000000 --- a/src/main/java/gmail/Lance5057/items/tools/Shield.java +++ /dev/null @@ -1,263 +0,0 @@ -package gmail.Lance5057.items.tools; - -import cpw.mods.fml.common.Optional; -import tconstruct.library.tools.ToolCore; -import cpw.mods.fml.relauncher.*; -import mods.battlegear2.api.ISheathed; -import mods.battlegear2.api.shield.IArrowCatcher; -import mods.battlegear2.api.shield.IArrowDisplay; -import mods.battlegear2.api.shield.IShield; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.entity.Entity; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.*; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; - - -@Optional.InterfaceList({ - @Optional.Interface(modid = "battlegear2", iface = "mods.battlegear2.api.ISheathed"), - @Optional.Interface(modid = "battlegear2", iface = "mods.battlegear2.api.shield.IArrowCatcher"), - @Optional.Interface(modid = "battlegear2", iface = "mods.battlegear2.api.shield.IArrowDisplay"), - @Optional.Interface(modid = "battlegear2", iface = "mods.battlegear2.api.shield.IShield") -}) - -public class Shield extends ToolCore implements IShield, ISheathed, - IArrowCatcher, IArrowDisplay { - public Shield(int baseDamage) { - super(baseDamage); - } - - protected float baseSpeed() { - return 1.5f; - } - - protected float effectiveSpeed() { - return 15f; - } - - public float breakSpeedModifier() { - return 1.0f; - } - - @Override - public float getDigSpeed(ItemStack stack, Block block, int meta) { - if (stack.getTagCompound().getCompoundTag("InfiTool") - .getBoolean("Broken")) - return 0.1f; - for (int i = 0; i < web.length; i++) { - if (web[i] == block.getMaterial()) { - return effectiveSpeed(); - } - } - return baseSpeed(); - } - - /** - * returns the action that specifies what animation to play when the items - * is being used - */ - @Override - public EnumAction getItemUseAction(ItemStack par1ItemStack) { - return EnumAction.block; - } - - /** - * How long it takes to use or consume an item - */ - @Override - public int getMaxItemUseDuration(ItemStack par1ItemStack) { - return 72000; - } - - /** - * Called whenever this item is equipped and the right mouse button is - * pressed. Args: itemStack, world, entityPlayer - */ - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, - EntityPlayer player) { - player.setItemInUse(stack, this.getMaxItemUseDuration(stack)); - return stack; - } - - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, - int x, int y, int z, int side, float clickX, float clickY, - float clickZ) { - return false; - } - - /** - * Returns if the item (tool) can harvest results from the block type. - */ - @Override - public boolean canHarvestBlock(Block block, ItemStack is) { - for (int i = 0; i < web.length; i++) { - if (block.getMaterial() == web[i]) - return true; - } - return super.canHarvestBlock(block, is); - } - - protected Material[] getEffectiveMaterials() { - return web; - } - - @Override - @SideOnly(Side.CLIENT) - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, - boolean par5) { - super.onUpdate(stack, world, entity, par4, par5); - if (entity instanceof EntityPlayerSP) { - EntityPlayerSP player = (EntityPlayerSP) entity; - ItemStack usingItem = player.getItemInUse(); - if (usingItem != null && usingItem.getItem() == this) { - player.movementInput.moveForward *= 2.5F; - player.movementInput.moveStrafe *= 2.5F; - } - } - } - - @Override - public String[] getTraits() { - return new String[] { "shield", "blocking" }; - } - - public static Material[] web = new Material[] { Material.web, - Material.cloth, Material.coral, Material.cake }; - public static Material[] none = new Material[0]; - - protected String getHarvestType() { - return null; - } - - @Override - @Optional.Method(modid = "battlegear2") - public int getArrowCount(ItemStack stack) { - if (stack.hasTagCompound() && stack.getTagCompound().hasKey("arrows")) { - return stack.getTagCompound().getShort("arrows"); - } else - return 0; - } - - @Override - @Optional.Method(modid = "battlegear2") - public void setArrowCount(ItemStack stack, int count) { - if (!stack.hasTagCompound()) { - stack.setTagCompound(new NBTTagCompound()); - } - // Should never happen, you would need A LOT of arrows for this to - // happen - if (count > Short.MAX_VALUE) { - count = Short.MAX_VALUE; - } - stack.getTagCompound().setShort("arrows", (short) count); - - } - - @Override - @Optional.Method(modid = "battlegear2") - public boolean catchArrow(ItemStack shield, EntityPlayer player, - IProjectile arrow) { - if (arrow instanceof EntityArrow) { - setArrowCount(shield, getArrowCount(shield) + 1); - player.setArrowCountInEntity(player.getArrowCountInEntity() - 1); - ((EntityArrow) arrow).setDead(); - return true; - } - return false; - } - - - @Override - @Optional.Method(modid = "battlegear2") - public boolean sheatheOnBack(ItemStack item) { - return true; - } - - @Override - @Optional.Method(modid = "battlegear2") - public void blockAnimation(EntityPlayer player, float dmg) { - player.worldObj.playSoundAtEntity(player, "battlegear2:shield", 1, 1); - } - - @Override - @Optional.Method(modid = "battlegear2") - public boolean canBlock(ItemStack shield, DamageSource source) { - return !source.isUnblockable(); - } - - @Override - @Optional.Method(modid = "battlegear2") - public int getBashTimer(ItemStack arg0) { - return 10; - } - - @Override - @Optional.Method(modid = "battlegear2") - public float getBlockAngle(ItemStack arg0) { - return 60; - } - - @Override - @Optional.Method(modid = "battlegear2") - public float getDamageDecayRate(ItemStack shield, float amount) { - return 0; - } - - @Override - @Optional.Method(modid = "battlegear2") - public float getDamageReduction(ItemStack arg0, DamageSource arg1) { - return 1f; - } - - @Override - @Optional.Method(modid = "battlegear2") - public float getDecayRate(ItemStack stack) { - NBTTagCompound tags = stack.getTagCompound(); - float recovery = tags.getCompoundTag("InfiTool").getInteger( - "MiningSpeed") / 1.5f; - return 10f / recovery; - } - - @Override - @Optional.Method(modid = "battlegear2") - public float getRecoveryRate(ItemStack stack) { - NBTTagCompound tags = stack.getTagCompound(); - float recovery = tags.getCompoundTag("InfiTool").getInteger( - "MiningSpeed") / 1.5f; - return 10f / recovery; - } - - @Override - - public Item getAccessoryItem() { - return null; - } - - @Override - public String getDefaultFolder() { - return null; - } - - @Override - public String getEffectSuffix() { - return null; - } - - @Override - public Item getHeadItem() { - return null; - } - - @Override - public String getIconSuffix(int arg0) { - return null; - } -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/items/tools/TinkerWrench.java b/src/main/java/gmail/Lance5057/items/tools/TinkerWrench.java deleted file mode 100644 index 7435c87..0000000 --- a/src/main/java/gmail/Lance5057/items/tools/TinkerWrench.java +++ /dev/null @@ -1,122 +0,0 @@ -package gmail.Lance5057.items.tools; - -import java.util.List; - -import buildcraft.api.tools.IToolWrench; -import mods.battlegear2.api.ISheathed; -import mods.battlegear2.api.shield.IArrowCatcher; -import mods.battlegear2.api.shield.IArrowDisplay; -import mods.battlegear2.api.shield.IShield; -import net.minecraft.block.material.Material; -import net.minecraft.entity.Entity; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import tconstruct.library.tools.AbilityHelper; -import tconstruct.library.tools.HarvestTool; -import tconstruct.library.tools.Weapon; -import tconstruct.tools.TinkerTools; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class TinkerWrench extends Weapon implements IToolWrench { - int induceDamage = 0; - - public TinkerWrench() { - super(0); - this.setUnlocalizedName("tinkerwrench"); - } - - @Override - public Item getHeadItem() { - return TinkerTools.handGuard; - } - - @Override - public Item getHandleItem() { - return TinkerTools.toolRod; - } - - @Override - public Item getAccessoryItem() { - return TinkerTools.binding; - } - - @Override - public int durabilityTypeAccessory() { - return 2; - } - - @Override - public float getRepairCost() { - return 1.0f; - } - - @Override - public float getDurabilityModifier() { - return 0.1f; - } - - @Override - public float getDamageModifier() { - return 0.4f; - } - - @Override - public int getPartAmount() { - return 3; - } - - @Override - public String getIconSuffix(int partType) { - switch (partType) { - case 0: - return "_wrench_head"; - case 1: - return "_wrench_head_broken"; - case 2: - return "_wrench_handle"; - case 3: - return "_wrench_binding"; - default: - return ""; - } - } - - @Override - public String getEffectSuffix() { - return "_wrench_effect"; - } - - @Override - public String getDefaultFolder() { - return "wrench"; - } - - @Override - public boolean canWrench(EntityPlayer player, int x, int y, int z) { - NBTTagCompound tags = player.inventory.getCurrentItem() - .getTagCompound().getCompoundTag("InfiTool"); - - if (!tags.getBoolean("Broken")) { - return true; - } - return false; - } - - @Override - public void wrenchUsed(EntityPlayer player, int x, int y, int z) { - - player.swingItem(); - AbilityHelper.damageTool(player.inventory.getCurrentItem(), 1, player, - false); - - } -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/items/tools/TinkerZweihander.java b/src/main/java/gmail/Lance5057/items/tools/TinkerZweihander.java deleted file mode 100644 index 980542f..0000000 --- a/src/main/java/gmail/Lance5057/items/tools/TinkerZweihander.java +++ /dev/null @@ -1,97 +0,0 @@ -package gmail.Lance5057.items.tools; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.item.Item; -import tconstruct.library.tools.Weapon; -import tconstruct.tools.TinkerTools; - -public class TinkerZweihander extends Weapon -{ - - public TinkerZweihander(int baseDamage) { - super(5); - this.setUnlocalizedName("zweihander"); - } - - @Override - public Item getHeadItem() { - return TinkerTools.largeSwordBlade; - } - - @Override - public Item getHandleItem() { - return TinkerTools.toughRod; - } - - @Override - public Item getAccessoryItem() { - return TinkerTools.wideGuard; - } - - @Override - public Item getExtraItem() { - return TinkerTools.swordBlade; - } - - -// @Override -// public int durabilityTypeAccessory() { -// return 2; -// } -// -// @Override -// public int durabilityTypeExtra () -// { -// return 1; -// } - - @Override - public float getRepairCost() { - return 4.0f; - } - - @Override - public float getDurabilityModifier() { - return 2.5f; - } - - @Override - public float getDamageModifier() { - return 1.4f; - } - - - @Override - public int getPartAmount() { - return 4; - } - - @Override - public String getIconSuffix(int partType) { - switch (partType) { - case 0: - return "_zweihander_blade"; - case 1: - return "_zweihander_blade_broken"; - case 2: - return "_zweihander_handle"; - case 3: - return "_zweihander_guard"; - case 4: - return "_zweihander_core"; - default: - return ""; - } - } - - @Override - public String getEffectSuffix() { - return "_zweihander_effect"; - } - - @Override - public String getDefaultFolder() { - return "zweihander"; - } -} diff --git a/src/main/java/gmail/Lance5057/liquids/moltenAeonsteelFluid.java b/src/main/java/gmail/Lance5057/liquids/moltenAeonsteelFluid.java deleted file mode 100644 index 650426e..0000000 --- a/src/main/java/gmail/Lance5057/liquids/moltenAeonsteelFluid.java +++ /dev/null @@ -1,59 +0,0 @@ -package gmail.Lance5057.liquids; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.Locale; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.util.IIcon; -import net.minecraftforge.fluids.BlockFluidClassic; -import net.minecraftforge.fluids.Fluid; - -public class moltenAeonsteelFluid - extends BlockFluidClassic -{ - private IIcon stillIcon; - private IIcon flowingIcon; - private String stillIconTexture = "molten_Aeonsteel"; - private String flowIconTexture = "molten_Aeonsteel_flow"; - - public moltenAeonsteelFluid(Fluid fluid) - { - super(fluid, Material.lava); - setLightLevel(100.0F); - setHardness(1.0F); - setBlockName("MoltenAeonSteel"); - - this.stillIconTexture = ("tinkersdefense:" + stillIconTexture); - this.flowIconTexture = ("tinkersdefense:" + flowIconTexture); - } - - @SideOnly(Side.CLIENT) - public void func_149651_a(IIconRegister icon) - { - this.stillIcon = icon.registerIcon(this.stillIconTexture); - this.flowingIcon = icon.registerIcon(this.flowIconTexture); - - getFluid().setIcons(this.stillIcon, this.flowingIcon); - } - - public IIcon getStillIcon() - { - return this.stillIcon; - } - - public IIcon getFlowingIcon() - { - return this.flowingIcon; - } - - @SideOnly(Side.CLIENT) - public IIcon func_149691_a(int side, int meta) - { - if (side <= 1) { - return this.stillIcon; - } - return this.flowingIcon; - } -} diff --git a/src/main/java/gmail/Lance5057/liquids/moltenDogbeariumFluid.java b/src/main/java/gmail/Lance5057/liquids/moltenDogbeariumFluid.java deleted file mode 100644 index d23b24b..0000000 --- a/src/main/java/gmail/Lance5057/liquids/moltenDogbeariumFluid.java +++ /dev/null @@ -1,59 +0,0 @@ -package gmail.Lance5057.liquids; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.Locale; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.util.IIcon; -import net.minecraftforge.fluids.BlockFluidClassic; -import net.minecraftforge.fluids.Fluid; - -public class moltenDogbeariumFluid - extends BlockFluidClassic -{ - private IIcon stillIcon; - private IIcon flowingIcon; - private String stillIconTexture = "molten_Dogbearium"; - private String flowIconTexture = "molten_Dogbearium_flow"; - - public moltenDogbeariumFluid(Fluid fluid) - { - super(fluid, Material.lava); - setLightLevel(100.0F); - setHardness(1.0F); - setBlockName("MoltenDogbearium"); - - this.stillIconTexture = ("tinkersdefense:" + stillIconTexture); - this.flowIconTexture = ("tinkersdefense:" + flowIconTexture); - } - - @SideOnly(Side.CLIENT) - public void func_149651_a(IIconRegister icon) - { - this.stillIcon = icon.registerIcon(this.stillIconTexture); - this.flowingIcon = icon.registerIcon(this.flowIconTexture); - - getFluid().setIcons(this.stillIcon, this.flowingIcon); - } - - public IIcon getStillIcon() - { - return this.stillIcon; - } - - public IIcon getFlowingIcon() - { - return this.flowingIcon; - } - - @SideOnly(Side.CLIENT) - public IIcon func_149691_a(int side, int meta) - { - if (side <= 1) { - return this.stillIcon; - } - return this.flowingIcon; - } -} diff --git a/src/main/java/gmail/Lance5057/liquids/moltenQueensGoldFluid.java b/src/main/java/gmail/Lance5057/liquids/moltenQueensGoldFluid.java deleted file mode 100644 index 972761d..0000000 --- a/src/main/java/gmail/Lance5057/liquids/moltenQueensGoldFluid.java +++ /dev/null @@ -1,59 +0,0 @@ -package gmail.Lance5057.liquids; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.Locale; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.util.IIcon; -import net.minecraftforge.fluids.BlockFluidClassic; -import net.minecraftforge.fluids.Fluid; - -public class moltenQueensGoldFluid - extends BlockFluidClassic -{ - private IIcon stillIcon; - private IIcon flowingIcon; - private String stillIconTexture = "molten_QueensGold"; - private String flowIconTexture = "molten_QueensGold_flow"; - - public moltenQueensGoldFluid(Fluid fluid) - { - super(fluid, Material.lava); - setLightLevel(100.0F); - setHardness(1.0F); - setBlockName("MoltenQueensGold"); - - this.stillIconTexture = ("tinkersdefense:" + stillIconTexture); - this.flowIconTexture = ("tinkersdefense:" + flowIconTexture); - } - - @SideOnly(Side.CLIENT) - public void func_149651_a(IIconRegister icon) - { - this.stillIcon = icon.registerIcon(this.stillIconTexture); - this.flowingIcon = icon.registerIcon(this.flowIconTexture); - - getFluid().setIcons(this.stillIcon, this.flowingIcon); - } - - public IIcon getStillIcon() - { - return this.stillIcon; - } - - public IIcon getFlowingIcon() - { - return this.flowingIcon; - } - - @SideOnly(Side.CLIENT) - public IIcon func_149691_a(int side, int meta) - { - if (side <= 1) { - return this.stillIcon; - } - return this.flowingIcon; - } -} diff --git a/src/main/java/gmail/Lance5057/models/ModelArmorAnvil.java b/src/main/java/gmail/Lance5057/models/ModelArmorAnvil.java deleted file mode 100644 index 3bc064e..0000000 --- a/src/main/java/gmail/Lance5057/models/ModelArmorAnvil.java +++ /dev/null @@ -1,61 +0,0 @@ -package gmail.Lance5057.models; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -/** - * Armor Anvil - Lance5057 - * Created using Tabula 4.1.1 - */ -public class ModelArmorAnvil extends ModelBase { - public ModelRenderer Log; - public ModelRenderer HammerHead; - public ModelRenderer HammerHandle; - public ModelRenderer AnvilBase; - public ModelRenderer AnvilStem; - public ModelRenderer AnvilTop; - - public ModelArmorAnvil() { - this.textureWidth = 64; - this.textureHeight = 64; - this.AnvilTop = new ModelRenderer(this, 0, 22); - this.AnvilTop.setRotationPoint(-4.0F, 6.0F, -6.0F); - this.AnvilTop.addBox(0.0F, 0.0F, 0.0F, 8, 6, 12, 0.0F); - this.HammerHead = new ModelRenderer(this, 15, 21); - this.HammerHead.setRotationPoint(-1.3F, 4.0F, 0.0F); - this.HammerHead.addBox(0.0F, 0.0F, 0.0F, 3, 2, 2, 0.0F); - this.setRotateAngle(HammerHead, 0.091106186954104F, -0.5462880558742251F, 0.0F); - this.AnvilStem = new ModelRenderer(this, 10, 32); - this.AnvilStem.setRotationPoint(-2.0F, 12.0F, -3.0F); - this.AnvilStem.addBox(0.0F, 0.0F, 0.0F, 4, 2, 6, 0.0F); - this.HammerHandle = new ModelRenderer(this, 17, 47); - this.HammerHandle.setRotationPoint(1.0F, 0.5F, -6.0F); - this.HammerHandle.addBox(0.0F, 0.0F, 0.0F, 1, 1, 6, 0.0F); - this.AnvilBase = new ModelRenderer(this, 2, 28); - this.AnvilBase.setRotationPoint(-4.0F, 14.0F, -5.0F); - this.AnvilBase.addBox(0.0F, 0.0F, 0.0F, 8, 2, 10, 0.0F); - this.Log = new ModelRenderer(this, 0, 40); - this.Log.setRotationPoint(-8.0F, 16.0F, -8.0F); - this.Log.addBox(0.0F, 0.0F, 0.0F, 16, 8, 16, 0.0F); - this.HammerHead.addChild(this.HammerHandle); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - this.AnvilTop.render(f5); - this.HammerHead.render(f5); - this.AnvilStem.render(f5); - this.AnvilBase.render(f5); - this.Log.render(f5); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/main/java/gmail/Lance5057/models/ModelCrestMount.java b/src/main/java/gmail/Lance5057/models/ModelCrestMount.java deleted file mode 100644 index 8134ee2..0000000 --- a/src/main/java/gmail/Lance5057/models/ModelCrestMount.java +++ /dev/null @@ -1,87 +0,0 @@ -// Date: 1/18/2015 9:46:49 PM -// Template version 1.1 -// Java generated by Techne -// Keep in mind that you still need to fill in some blanks -// - ZeuX - -package gmail.Lance5057.models; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelCrestMount extends ModelBase -{ - //fields - ModelRenderer ShieldMount; - ModelRenderer Base; - ModelRenderer SwordMount1; - ModelRenderer SwordMount2; - //ModelRenderer SwordMount3; - - public ModelCrestMount() - { - textureWidth = 32; - textureHeight = 32; - - ShieldMount = new ModelRenderer(this, 20, 6); - ShieldMount.addBox(0F, 0F, 0F, 2, 7, 2); - ShieldMount.setRotationPoint(-1F, 17F, -1F); - ShieldMount.setTextureSize(32, 32); - ShieldMount.mirror = true; - setRotation(ShieldMount, 0F, 0F, 0F); - - Base = new ModelRenderer(this, 0, 6); - Base.addBox(0F, 0F, 0F, 4, 4, 4); - Base.setRotationPoint(-2F, 20F, -2F); - Base.setTextureSize(32, 32); - Base.mirror = true; - setRotation(Base, 0F, 0F, 0F); - - SwordMount1 = new ModelRenderer(this, 0, 0); - SwordMount1.addBox(-5F, 0F, -2F, 10, 2, 4); - SwordMount1.setRotationPoint(0F, 22F, 0F); - SwordMount1.setTextureSize(32, 32); - SwordMount1.mirror = true; - setRotation(SwordMount1, 0F, 0.7853982F, 0F); - - SwordMount2 = new ModelRenderer(this, 0, 0); - SwordMount2.addBox(-5F, 0F, -2F, 10, 2, 4); - SwordMount2.setRotationPoint(0F, 22F, 0F); - SwordMount2.setTextureSize(32, 32); - SwordMount2.mirror = true; - setRotation(SwordMount2, 0F, -0.7853982F, 0F); - -// SwordMount3 = new ModelRenderer(this, 0, 0); -// SwordMount3.addBox(-5F, 0F, -2F, 10, 2, 4); -// SwordMount3.setRotationPoint(0F, 21.9F, 0F); -// SwordMount3.setTextureSize(32, 32); -// SwordMount3.mirror = true; -// setRotation(SwordMount3, 0F, 1.570796F, 0F); - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, boolean left, boolean right, boolean shield) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - if(shield) ShieldMount.render(f5); - if(left) SwordMount1.render(f5); - if(right) SwordMount2.render(f5); - - Base.render(f5); - //SwordMount3.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - -} diff --git a/src/main/java/gmail/Lance5057/models/ModelJewelersBench.java b/src/main/java/gmail/Lance5057/models/ModelJewelersBench.java deleted file mode 100644 index 46c43bd..0000000 --- a/src/main/java/gmail/Lance5057/models/ModelJewelersBench.java +++ /dev/null @@ -1,100 +0,0 @@ -package gmail.Lance5057.models; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -/** - * JewelersBench - Lance5057 - * Created using Tabula 4.1.1 - */ -public class ModelJewelersBench extends ModelBase { - public ModelRenderer TableSide2; - public ModelRenderer SawBlock1; - public ModelRenderer SawBlock2; - public ModelRenderer SawBlock3; - public ModelRenderer SawBlockClamp; - public ModelRenderer Leg1; - public ModelRenderer Leg2; - public ModelRenderer Leg3; - public ModelRenderer Leg4; - public ModelRenderer TableTop; - public ModelRenderer TableBack; - public ModelRenderer TableSide1; - public ModelRenderer Drawer; - public ModelRenderer Handle; - - public ModelJewelersBench() { - this.textureWidth = 64; - this.textureHeight = 64; - this.SawBlock1 = new ModelRenderer(this, 0, 0); - this.SawBlock1.setRotationPoint(2.0F, 8.2F, -12.0F); - this.SawBlock1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 4, 0.0F); - this.Leg4 = new ModelRenderer(this, 0, 0); - this.Leg4.setRotationPoint(6.0F, 10.0F, 6.0F); - this.Leg4.addBox(0.0F, 0.0F, 0.0F, 2, 14, 2, 0.0F); - this.Drawer = new ModelRenderer(this, 0, 46); - this.Drawer.setRotationPoint(-6.0F, 11.5F, -8.0F); - this.Drawer.addBox(0.0F, 0.0F, 0.0F, 12, 2, 16, 0.0F); - this.TableSide2 = new ModelRenderer(this, 0, 0); - this.TableSide2.setRotationPoint(-8.0F, 7.0F, -7.0F); - this.TableSide2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 14, 0.0F); - this.Leg2 = new ModelRenderer(this, 0, 0); - this.Leg2.setRotationPoint(6.0F, 10.0F, -8.0F); - this.Leg2.addBox(0.0F, 0.0F, 0.0F, 2, 14, 2, 0.0F); - this.TableSide1 = new ModelRenderer(this, 0, 0); - this.TableSide1.setRotationPoint(7.0F, 7.0F, -7.0F); - this.TableSide1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 14, 0.0F); - this.SawBlock3 = new ModelRenderer(this, 0, 0); - this.SawBlock3.setRotationPoint(3.0F, 8.2F, -11.0F); - this.SawBlock3.addBox(0.0F, 0.0F, 0.0F, 1, 1, 3, 0.0F); - this.Handle = new ModelRenderer(this, 55, 0); - this.Handle.setRotationPoint(-2.0F, 12.0F, -9.0F); - this.Handle.addBox(0.0F, 0.0F, 0.0F, 4, 1, 1, 0.0F); - this.Leg1 = new ModelRenderer(this, 0, 0); - this.Leg1.setRotationPoint(-8.0F, 10.0F, -8.0F); - this.Leg1.addBox(0.0F, 0.0F, 0.0F, 2, 14, 2, 0.0F); - this.TableTop = new ModelRenderer(this, 0, 28); - this.TableTop.setRotationPoint(-8.0F, 8.0F, -8.0F); - this.TableTop.addBox(0.0F, 0.0F, 0.0F, 16, 2, 16, 0.0F); - this.TableBack = new ModelRenderer(this, 0, 0); - this.TableBack.setRotationPoint(-8.0F, 7.0F, 7.0F); - this.TableBack.addBox(0.0F, 0.0F, 0.0F, 16, 1, 1, 0.0F); - this.SawBlockClamp = new ModelRenderer(this, 54, 0); - this.SawBlockClamp.setRotationPoint(1.5F, 8.0F, -9.0F); - this.SawBlockClamp.addBox(0.0F, 0.0F, 0.0F, 4, 2, 1, 0.0F); - this.Leg3 = new ModelRenderer(this, 0, 0); - this.Leg3.setRotationPoint(-8.0F, 10.0F, 6.0F); - this.Leg3.addBox(0.0F, 0.0F, 0.0F, 2, 14, 2, 0.0F); - this.SawBlock2 = new ModelRenderer(this, 0, 0); - this.SawBlock2.setRotationPoint(4.0F, 8.2F, -12.0F); - this.SawBlock2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 4, 0.0F); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - this.SawBlock1.render(f5); - this.Leg4.render(f5); - this.Drawer.render(f5); - this.TableSide2.render(f5); - this.Leg2.render(f5); - this.TableSide1.render(f5); - this.SawBlock3.render(f5); - this.Handle.render(f5); - this.Leg1.render(f5); - this.TableTop.render(f5); - this.TableBack.render(f5); - this.SawBlockClamp.render(f5); - this.Leg3.render(f5); - this.SawBlock2.render(f5); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/main/java/gmail/Lance5057/models/Renderer_ArmorAnvil.java b/src/main/java/gmail/Lance5057/models/Renderer_ArmorAnvil.java deleted file mode 100644 index be7bd9e..0000000 --- a/src/main/java/gmail/Lance5057/models/Renderer_ArmorAnvil.java +++ /dev/null @@ -1,43 +0,0 @@ -package gmail.Lance5057.models; - -import org.lwjgl.opengl.GL11; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; - -public class Renderer_ArmorAnvil extends TileEntitySpecialRenderer -{ - private final ModelArmorAnvil model; - - public Renderer_ArmorAnvil() { - this.model = new ModelArmorAnvil(); -} - - @Override - public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) - { - - GL11.glPushMatrix(); - - GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); - - ResourceLocation textures = (new ResourceLocation("tinkersdefense:textures/blocks/ArmorAnvil.png")); - - Minecraft.getMinecraft().renderEngine.bindTexture(textures); - - GL11.glPushMatrix(); - - int meta = te.getBlockMetadata(); - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - - this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - - } - -} diff --git a/src/main/java/gmail/Lance5057/models/Renderer_CrestMount.java b/src/main/java/gmail/Lance5057/models/Renderer_CrestMount.java deleted file mode 100644 index d32d637..0000000 --- a/src/main/java/gmail/Lance5057/models/Renderer_CrestMount.java +++ /dev/null @@ -1,210 +0,0 @@ -package gmail.Lance5057.models; - -import gmail.Lance5057.tileentities.TileEntity_CrestMount; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; -import net.minecraftforge.client.IItemRenderer; - -import org.lwjgl.opengl.GL11; - -import tconstruct.library.tools.ToolCore; - -public class Renderer_CrestMount extends TileEntitySpecialRenderer -{ - //private RenderItem itemRenderer; - private final ModelCrestMount model; - EntityItem entItem = null; - EntityItem entItem2 = null; - EntityItem entItem3 = null; - EntityItem entItem4 = null; - - public Renderer_CrestMount() { - this.model = new ModelCrestMount(); - } - - @Override - public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) - { - TileEntity_CrestMount tileEntity = (TileEntity_CrestMount)te; - - boolean left=false, - right=false, - shield=false; - - if(tileEntity.getStackInSlot(0)!=null) - right=true; - if(tileEntity.getStackInSlot(1)!=null) - left=true; - if(tileEntity.getStackInSlot(3)!=null) - shield=true; - - - GL11.glPushMatrix(); - - //Render Crest Mount - GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); - - ResourceLocation textures = (new ResourceLocation("tinkersdefense:textures/blocks/CrestMount.png")); - - Minecraft.getMinecraft().renderEngine.bindTexture(textures); - - GL11.glPushMatrix(); - - int meta = te.getBlockMetadata(); - float rotation = 0; - switch(meta) - { - case 1: rotation = 0; break; - case 2: rotation = 180; break; - case 3: rotation = 90; break; - case 4: rotation = -90; break; - } - GL11.glRotatef(rotation, 0.0F, 1.0F, 0.0F); - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90F, 0.5F, 0.0F, 0.0F); - GL11.glTranslatef(0, -1, -1); - - this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F,left,right,shield); - GL11.glPopMatrix(); - - //Render Inventory - - //right slot - int slot = 0; - if(tileEntity.getStackInSlot(slot)!=null) - { - if((entItem == null) || entItem.getEntityItem().getItem() != tileEntity.getStackInSlot(slot).getItem()) - entItem = new EntityItem(tileEntity.getWorldObj(), 0, 0, 0, tileEntity.getStackInSlot(slot)); - GL11.glPushMatrix(); - this.entItem.hoverStart = 0.0F; - RenderItem.renderInFrame = true; - GL11.glScalef(2f,2f,2f); - GL11.glRotatef(90, 0, 0, -1); - GL11.glRotatef(rotation, -1.0F, 0.0F, 0.0F); - //GL11.glTranslatef(0.4f/*up - down*/, -0.3f/*left - right*/, 0.22f); - if(tileEntity.flip[0]==true) - { - GL11.glRotatef(180, 0, 0, 1); - GL11.glTranslatef(-0.8f, 0.2f, 0); - } - - if(tileEntity.getStackInSlot(0).getItem() instanceof ToolCore) - { - GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F); - GL11.glTranslatef(-0.505f, -0.32f, 0); - } - - RenderManager.instance.renderEntityWithPosYaw(entItem, 0.4f/*up - down*/, -0.3f/*left - right*/, 0.23f, 0, 0); - RenderItem.renderInFrame = false; - GL11.glPopMatrix(); - } - - //left slot - slot = 1; - if(tileEntity.getStackInSlot(slot)!=null) - { - if((entItem2 == null) || entItem2.getEntityItem().getItem() != tileEntity.getStackInSlot(slot).getItem()) - entItem2 = new EntityItem(tileEntity.getWorldObj(), x, y, z, tileEntity.getStackInSlot(slot)); - GL11.glPushMatrix(); - this.entItem2.hoverStart = 0.0F; - RenderItem.renderInFrame = true; - //GL11.glTranslatef((float)te.xCoord + 0.5F, (float)te.yCoord + 1.02F, (float)te.zCoord + 0.3F); - GL11.glScalef(2f,2f,2f); - GL11.glRotatef(180, 0, 0, 1); - GL11.glRotatef(rotation, 0.0F, -1.0F, 0.0F); - if(tileEntity.flip[1]==true) - { - GL11.glRotatef(180, 0, 0, 1); - GL11.glTranslatef(0.2f, -0.8f, 0); - } - - if(tileEntity.getStackInSlot(1).getItem() instanceof ToolCore) - { - GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F); - GL11.glTranslatef(0.5f, -0.325f, 0); - } - - RenderManager.instance.renderEntityWithPosYaw(entItem2, -0.1, 0.2, 0.23, 0, 0); - RenderItem.renderInFrame = false; - GL11.glPopMatrix(); - } - - //middle slot - slot = 2; - if(tileEntity.getStackInSlot(slot)!=null) - { - if((entItem3 == null) || entItem3.getEntityItem().getItem() != tileEntity.getStackInSlot(slot).getItem()) - entItem3 = new EntityItem(tileEntity.getWorldObj(), x, y, z, tileEntity.getStackInSlot(slot)); - GL11.glPushMatrix(); - this.entItem3.hoverStart = 0.0F; - RenderItem.renderInFrame = true; - GL11.glScalef(2f,2f,2f); - if(rotation == 90) - GL11.glTranslatef(0.3f, 0, 0.0f); - if(rotation == -90) - GL11.glTranslatef(-0.3f, 0, 0.0f); - GL11.glRotatef(225, 0, 0, 1); - GL11.glRotatef(rotation, 1F, 1F, 0F); - if(tileEntity.flip[2]==true) - { - GL11.glRotatef(180, 0, 0, 1); - GL11.glTranslatef(-0.5f, -0.5f, 0); - } - - if(tileEntity.getStackInSlot(2).getItem() instanceof ToolCore) - { - GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F); - GL11.glTranslatef(-0.1125f, -0.5125f, 0); - } - - RenderManager.instance.renderEntityWithPosYaw(entItem3, 0.3, 0.1, 0.16, 0, 0); - RenderItem.renderInFrame = false; - GL11.glPopMatrix(); - } - - //shield slot - slot = 3; - if(tileEntity.getStackInSlot(slot)!=null) - { - if((entItem4 == null) || entItem4.getEntityItem().getItem() != tileEntity.getStackInSlot(slot).getItem()) - entItem4 = new EntityItem(tileEntity.getWorldObj(), x, y, z, tileEntity.getStackInSlot(slot)); - GL11.glPushMatrix(); - this.entItem4.hoverStart = 0.0F; - RenderItem.renderInFrame = true; - GL11.glScalef(2f,2f,2f); - GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(rotation, 0.0F, 1.0F, 0.0F); - if(tileEntity.flip[3]==true) - { - GL11.glRotatef(180, 0, 0, 1); - GL11.glTranslatef(0.0f, 1.0f, 0); - } - - - RenderManager.instance.renderEntityWithPosYaw(entItem4, 0, -0.7, -0.01, 0, 0); - RenderItem.renderInFrame = false; - GL11.glPopMatrix(); - } - - - GL11.glPopMatrix(); - - entItem = null; - entItem2= null; - entItem3= null; - entItem4= null; - } - -} diff --git a/src/main/java/gmail/Lance5057/models/Renderer_JewelersBench.java b/src/main/java/gmail/Lance5057/models/Renderer_JewelersBench.java deleted file mode 100644 index df13248..0000000 --- a/src/main/java/gmail/Lance5057/models/Renderer_JewelersBench.java +++ /dev/null @@ -1,41 +0,0 @@ -package gmail.Lance5057.models; - -import org.lwjgl.opengl.GL11; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; - -public class Renderer_JewelersBench extends TileEntitySpecialRenderer -{ - private final ModelJewelersBench model; - - public Renderer_JewelersBench() { - this.model = new ModelJewelersBench(); -} - - @Override - public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) - { - GL11.glPushMatrix(); - GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); - - ResourceLocation textures = (new ResourceLocation("tinkersdefense:textures/blocks/JewelersBench.png")); - - Minecraft.getMinecraft().renderEngine.bindTexture(textures); - - GL11.glPushMatrix(); - - int meta = te.getBlockMetadata(); - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - - this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - - } - -} diff --git a/src/main/java/gmail/Lance5057/modifiers/TDefenseActiveToolMod.java b/src/main/java/gmail/Lance5057/modifiers/TDefenseActiveToolMod.java deleted file mode 100644 index fa47e3e..0000000 --- a/src/main/java/gmail/Lance5057/modifiers/TDefenseActiveToolMod.java +++ /dev/null @@ -1,86 +0,0 @@ -package gmail.Lance5057.modifiers; - -import java.util.ArrayList; -import java.util.Random; - -import mods.battlegear2.api.core.IBattlePlayer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.projectile.EntityFireball; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import tconstruct.library.ActiveToolMod; -import tconstruct.library.tools.ToolCore; - -public class TDefenseActiveToolMod extends ActiveToolMod { - @Override - public void updateTool(ToolCore tool, ItemStack stack, World world, Entity entity) - { - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - - if (!tags.getBoolean("Broken")) - { - //stack.getTagCompound().getCompoundTag("InfiTool").setInteger("RenderHead", 100); - if(((IBattlePlayer)entity).isBlockingWithShield()) - { - if(tags.hasKey("Crest of Mirrors")) - { - AxisAlignedBB boundingBox = AxisAlignedBB.getBoundingBox(((EntityLivingBase)entity).posX - 3, ((EntityLivingBase)entity).posY - 3, ((EntityLivingBase)entity).posZ - 3, ((EntityLivingBase)entity).posX + 3, ((EntityLivingBase)entity).posY + 3, ((EntityLivingBase)entity).posZ + 3); - - ArrayList fireballs = (ArrayList) world.getEntitiesWithinAABB(EntityFireball.class, boundingBox); - for (EntityFireball fireball : fireballs) - { - if (fireball.getDistanceSqToEntity(((EntityLivingBase)entity)) <= 25) - { - Vec3 playerlook = ((EntityLivingBase)entity).getLookVec(); - - fireball.motionX = playerlook.xCoord; - fireball.motionY = playerlook.yCoord; - fireball.motionZ = playerlook.zCoord; - fireball.accelerationX = fireball.motionX * 0.1D; - fireball.accelerationY = fireball.motionY * 0.1D; - fireball.accelerationZ = fireball.motionZ * 0.1D; - - fireball.shootingEntity = ((EntityLivingBase)entity); - - ((EntityLivingBase)entity).worldObj.playSoundAtEntity(((EntityLivingBase)entity), "battlegear2:shield", 1, 1); - } - } - } - } - } - } - - @Override - - public int baseAttackDamage(int earlyModDamage, int damage, ToolCore tool, - NBTTagCompound tags, NBTTagCompound toolTags, ItemStack stack, - EntityLivingBase player, Entity entity) { - if (!toolTags.hasKey("Broken")) { - if (toolTags.hasKey("Daze")) { - int[] array = toolTags.getIntArray("Daze"); - int chance = array[0] * 5; - - Random roll = new Random(); - int num = roll.nextInt(100) + 1; - - if (num <= chance) { - ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect(2, 3 * 20, 100)); - ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect(9, 3 * 20, 100)); - ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect(15, 3 * 20, 100)); - ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect(18, 3 * 20, 100)); - } - } - } - - return 0; - } -} diff --git a/src/main/java/gmail/Lance5057/modifiers/modifierDaze.java b/src/main/java/gmail/Lance5057/modifiers/modifierDaze.java deleted file mode 100644 index cf30e66..0000000 --- a/src/main/java/gmail/Lance5057/modifiers/modifierDaze.java +++ /dev/null @@ -1,97 +0,0 @@ -package gmail.Lance5057.modifiers; - -import java.util.Arrays; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import tconstruct.library.tools.ToolCore; -import tconstruct.modifiers.tools.ItemModTypeFilter; - -public class modifierDaze extends ItemModTypeFilter -{ - String tooltipName; - int max = 5; - String guiType; - - public modifierDaze(String type, int effect, ItemStack[] items, int[] values) - { - super(effect, "Daze", items, values); - tooltipName = "\u00A76Daze"; - guiType = type; - } - - @Override - protected boolean canModify (ItemStack tool, ItemStack[] input) - { - if (tool.getItem() instanceof ToolCore) - { - List list = Arrays.asList(((ToolCore)tool.getItem()).getTraits()); - if (list.contains("weapon")) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - if (!tags.hasKey(key)) - return tags.getInteger("Modifiers") > 0 && matchingAmount(input) <= max; - - if (matchingAmount(input) > max) - return false; - - int keyPair[] = tags.getIntArray(key); - if (keyPair[0] + matchingAmount(input) <= keyPair[1]) - return true; - - else if (keyPair[0] == keyPair[1]) - return tags.getInteger("Modifiers") > 0; - } - } - - return false; - } - - @Override - public void modify (ItemStack[] input, ItemStack tool) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - int increase = matchingAmount(input); - if (tags.hasKey(key)) - { - int[] keyPair = tags.getIntArray(key); - - if (keyPair[0] % max == 0) - { - keyPair[0] += increase; - keyPair[1] += max; - tags.setIntArray(key, keyPair); - - int modifiers = tags.getInteger("Modifiers"); - modifiers -= 1; - tags.setInteger("Modifiers", modifiers); - } - else - { - keyPair[0] += increase; - tags.setIntArray(key, keyPair); - } - updateModTag(tool, keyPair); - - } - else - { - int modifiers = tags.getInteger("Modifiers"); - modifiers -= 1; - tags.setInteger("Modifiers", modifiers); - String modName = "\u00A76" + guiType + " (" + increase + "/" + max + ")"; - int tooltipIndex = addToolTip(tool, tooltipName, modName); - int[] keyPair = new int[] { increase, max, tooltipIndex }; - tags.setIntArray(key, keyPair); - } - } - - void updateModTag (ItemStack tool, int[] keys) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - String tip = "ModifierTip" + keys[2]; - String modName = "\u00A76" + guiType + " (" + keys[0] + "/" + keys[1] + ")"; - tags.setString(tip, modName); - } -} \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofBlades.java b/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofBlades.java deleted file mode 100644 index 455a21f..0000000 --- a/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofBlades.java +++ /dev/null @@ -1,92 +0,0 @@ -package gmail.Lance5057.modifiers.shields; - -import tconstruct.library.tools.ToolCore; -import tconstruct.modifiers.tools.ItemModTypeFilter; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class modifierCrestofBlades extends ItemModTypeFilter -{ - String tooltipName; - int max = 5; - String guiType; - - public modifierCrestofBlades(String type, int effect, ItemStack[] items, int[] values) - { - super(effect, "Blades", items, values); - tooltipName = "\u00A7fBlades"; - guiType = type; - } - - @Override - protected boolean canModify (ItemStack tool, ItemStack[] input) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - if (!tags.hasKey(key)) - return tags.getInteger("Modifiers") > 0 && matchingAmount(input) <= max; - - if (matchingAmount(input) > max) - return false; - - int keyPair[] = tags.getIntArray(key); - if (keyPair[0] + matchingAmount(input) <= keyPair[1]) - return true; - -// else if (keyPair[0] == keyPair[1]) -// return tags.getInteger("Modifiers") > 0; - - else - return false; - } - - @Override - public void modify (ItemStack[] input, ItemStack tool) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - int increase = matchingAmount(input); - int[] keyPair; - int current = 0; - if (tags.hasKey(key)) - { - keyPair = tags.getIntArray(key); - - if (keyPair[0] % max == 0) - { - keyPair[0] += increase; - keyPair[1] += max; - tags.setIntArray(key, keyPair); - - int modifiers = tags.getInteger("Modifiers"); - modifiers -= 1; - tags.setInteger("Modifiers", modifiers); - } - else - { - keyPair[0] += increase; - tags.setIntArray(key, keyPair); - } - updateModTag(tool, keyPair); - - } - else - { - int modifiers = tags.getInteger("Modifiers"); - modifiers -= 1; - tags.setInteger("Modifiers", modifiers); - String modName = "\u00A76" + guiType + " (" + increase + "/" + max + ")"; - int tooltipIndex = addToolTip(tool, tooltipName, modName); - keyPair = new int[] { increase, max, tooltipIndex }; - tags.setIntArray(key, keyPair); - } - - } - - void updateModTag (ItemStack tool, int[] keys) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - String tip = "ModifierTip" + keys[2]; - String modName = "\u00A76" + guiType + " (" + keys[0] + "/" + keys[1] + ")"; - tags.setString(tip, modName); - } -} diff --git a/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofFeathers.java b/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofFeathers.java deleted file mode 100644 index 0bdcb85..0000000 --- a/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofFeathers.java +++ /dev/null @@ -1,119 +0,0 @@ -package gmail.Lance5057.modifiers.shields; - -import tconstruct.library.tools.ToolCore; -import tconstruct.modifiers.tools.ItemModTypeFilter; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class modifierCrestofFeathers extends ItemModTypeFilter -{ - String tooltipName; - int max = 10; - String guiType; - - public modifierCrestofFeathers(String type, int effect, ItemStack[] items, int[] values) - { - super(effect, "Feathers", items, values); - tooltipName = "\u00A7fCrest of Feathers"; - guiType = type; - } - - @Override - protected boolean canModify (ItemStack tool, ItemStack[] input) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - if (!tags.hasKey(key)) - return tags.getInteger("Modifiers") > 0 && matchingAmount(input) <= max; - - if (matchingAmount(input) > max) - return false; - - int keyPair[] = tags.getIntArray(key); - if (keyPair[0] + matchingAmount(input) <= keyPair[1]) - return true; - - else if (keyPair[0] == keyPair[1]) - return tags.getInteger("Modifiers") > 0; - - else - return false; - } - - @Override - public void modify (ItemStack[] input, ItemStack tool) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - int increase = matchingAmount(input); - int[] keyPair; - int current = 0; - if (tags.hasKey(key)) - { - keyPair = tags.getIntArray(key); - - if (keyPair[0] % max == 0) - { - keyPair[0] += increase; - keyPair[1] += max; - tags.setIntArray(key, keyPair); - - int modifiers = tags.getInteger("Modifiers"); - modifiers -= 1; - tags.setInteger("Modifiers", modifiers); - } - else - { - keyPair[0] += increase; - tags.setIntArray(key, keyPair); - } - updateModTag(tool, keyPair); - - } - else - { - int modifiers = tags.getInteger("Modifiers"); - modifiers -= 1; - tags.setInteger("Modifiers", modifiers); - String modName = "\u00A76" + guiType + " (" + increase + "/" + max + ")"; - int tooltipIndex = addToolTip(tool, tooltipName, modName); - keyPair = new int[] { increase, max, tooltipIndex }; - tags.setIntArray(key, keyPair); - } - - int miningSpeed = tags.getInteger("MiningSpeed"); - int boost = 8 + ((current - 1) / 50 * 2); - Item temp = tool.getItem(); - if (temp instanceof ToolCore) - { - ToolCore toolcore = (ToolCore) temp; - if (toolcore.durabilityTypeHandle() == 2) - boost += 2; - if (toolcore.durabilityTypeAccessory() == 2) - boost += 2; - if (toolcore.durabilityTypeExtra() == 2) - boost += 2; - } - miningSpeed += (increase * boost); - tags.setInteger("MiningSpeed", miningSpeed); - - String[] type = { "MiningSpeed2", "MiningSpeedHandle", "MiningSpeedExtra" }; - - for (int i = 0; i < 3; i++) - { - if (tags.hasKey(type[i])) - { - int speed = tags.getInteger(type[i]); - speed += (increase * boost); - tags.setInteger(type[i], speed); - } - } - } - - void updateModTag (ItemStack tool, int[] keys) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - String tip = "ModifierTip" + keys[2]; - String modName = "\u00A76" + guiType + " (" + keys[0] + "/" + keys[1] + ")"; - tags.setString(tip, modName); - } -} diff --git a/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofLegends.java b/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofLegends.java deleted file mode 100644 index 1589b36..0000000 --- a/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofLegends.java +++ /dev/null @@ -1,60 +0,0 @@ -package gmail.Lance5057.modifiers.shields; - -import gmail.Lance5057.items.tools.Shield; -import tconstruct.modifiers.tools.ItemModTypeFilter; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class modifierCrestofLegends extends ItemModTypeFilter -{ - String tooltipName; - String guiType; - - public modifierCrestofLegends(String type, int effect, ItemStack[] items, int[] values) - { - super(effect, "Legends", items, values); - tooltipName = "\u00A7fCrest of Legends"; - guiType = type; - } - - @Override - protected boolean canModify (ItemStack tool, ItemStack[] input) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - - if(tool.getItem() instanceof Shield) - return tags.getInteger("Modifiers") > 0; - - return false; - } - - @Override - public void modify (ItemStack[] input, ItemStack tool) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - int increase = matchingAmount(input); - if (tags.hasKey(key)) - { - int[] keyPair = tags.getIntArray(key); - - updateModTag(tool, keyPair); - - } - else - { - int modifiers = tags.getInteger("Modifiers"); - modifiers -= 1; - tags.setInteger("Modifiers", modifiers); - String modName = "\u00A76" + guiType; - int tooltipIndex = addToolTip(tool, tooltipName, modName); - } - } - - void updateModTag (ItemStack tool, int[] keys) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - String tip = "ModifierTip" + keys[2]; - String modName = "\u00A76" + guiType + " (" + keys[0] + "/" + keys[1] + ")"; - tags.setString(tip, modName); - } -} diff --git a/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofMirrors.java b/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofMirrors.java deleted file mode 100644 index 35cf9a9..0000000 --- a/src/main/java/gmail/Lance5057/modifiers/shields/modifierCrestofMirrors.java +++ /dev/null @@ -1,64 +0,0 @@ -package gmail.Lance5057.modifiers.shields; - -import java.util.Arrays; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import tconstruct.library.tools.ToolCore; -import tconstruct.modifiers.tools.ModBoolean; - -public class modifierCrestofMirrors extends ModBoolean -{ - String tooltipName; - String guiType; - - public modifierCrestofMirrors(String type, int effect, ItemStack[] items, int[] values) - { - super(items, effect, "Mirrors", "\u00A7", ""); - tooltipName = "\u00A7bCrest of Mirrors"; - guiType = type; - } - - @Override - protected boolean canModify (ItemStack tool, ItemStack[] input) - { - if (tool.getItem() instanceof ToolCore) - { - List list = Arrays.asList(((ToolCore)tool.getItem()).getTraits()); - if (list.contains("shield")) - { - - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - - if (tags.hasKey(key)) - return false; - - return true; - } - } - return false; - - } - - @Override - public void modify (ItemStack[] input, ItemStack tool) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - tags.setBoolean(key, true); - - int modifiers = tags.getInteger("Modifiers"); - modifiers -= 1; - tags.setInteger("Modifiers", modifiers); - - addToolTip(tool, "\u00A7b" + tooltipName, "\u00A7b" + key); - } - - void updateModTag (ItemStack tool, int[] keys) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - String tip = "ModifierTip" + keys[2]; - String modName = "\u00A7b" + guiType; - tags.setString(tip, modName); - } -} diff --git a/src/main/java/gmail/Lance5057/network/Handler_CrestMount.java b/src/main/java/gmail/Lance5057/network/Handler_CrestMount.java deleted file mode 100644 index fa1a89c..0000000 --- a/src/main/java/gmail/Lance5057/network/Handler_CrestMount.java +++ /dev/null @@ -1,24 +0,0 @@ -package gmail.Lance5057.network; - -import ibxm.Player; -import gmail.Lance5057.tileentities.TileEntity_CrestMount; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; - -public class Handler_CrestMount implements IMessageHandler -{ - @Override - public IMessage onMessage(Message_CrestMount message, MessageContext ctx) - { - TileEntity te = ctx.getServerHandler().playerEntity.worldObj.getTileEntity(message.x, message.y, message.z); - if (te instanceof TileEntity_CrestMount) { - ((TileEntity_CrestMount) te).flip = message.flip; - } - return null; - } -} - diff --git a/src/main/java/gmail/Lance5057/network/Handler_FinishingAnvil.java b/src/main/java/gmail/Lance5057/network/Handler_FinishingAnvil.java deleted file mode 100644 index 125a514..0000000 --- a/src/main/java/gmail/Lance5057/network/Handler_FinishingAnvil.java +++ /dev/null @@ -1,26 +0,0 @@ -package gmail.Lance5057.network; - -import ibxm.Player; -import gmail.Lance5057.tileentities.TileEntity_FinishingAnvil; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; - -public class Handler_FinishingAnvil implements IMessageHandler -{ - @Override - public IMessage onMessage(Message_FinishingAnvil message, MessageContext ctx) - { - TileEntity te = ctx.getServerHandler().playerEntity.worldObj.getTileEntity(message.x, message.y, message.z); - if (te instanceof TileEntity_FinishingAnvil) - { - //((TileEntity_FinishingAnvil) te).flip = message.flip; - ((TileEntity_FinishingAnvil) te).inventory[0] = message.item; - } - return null; - } -} - diff --git a/src/main/java/gmail/Lance5057/network/Message_CrestMount.java b/src/main/java/gmail/Lance5057/network/Message_CrestMount.java deleted file mode 100644 index 66328aa..0000000 --- a/src/main/java/gmail/Lance5057/network/Message_CrestMount.java +++ /dev/null @@ -1,56 +0,0 @@ -package gmail.Lance5057.network; - -import gmail.Lance5057.tileentities.TileEntity_CrestMount; -import io.netty.buffer.ByteBuf; -import net.minecraft.client.Minecraft; -import net.minecraft.tileentity.TileEntity; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; - -public class Message_CrestMount implements IMessage -{ - public int x, y, z; - public boolean[] flip = new boolean[4]; - - public Message_CrestMount() - { - - } - - public Message_CrestMount(int x, int y, int z, boolean[] flip) - { - this.x = x; - this.y = y; - this.z = z; - this.flip = flip; - //System.arraycopy(flip, 0, this.flip, 0, flip.length); - - } - - - - - @Override - public void fromBytes(ByteBuf buf) { - this.x = buf.readInt(); - this.y = buf.readInt(); - this.z = buf.readInt(); - for(int i = 0; i amount) - { - stack = stack.splitStack(amount); - - if (stack.stackSize == 0) - { - setInventorySlotContents(slot, null); - } - } - else - { - setInventorySlotContents(slot, null); - } - - this.markDirty(); - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(int slot) { - ItemStack stack = getStackInSlot(slot); - - if (stack != null) - { - setInventorySlotContents(slot, stack); - } - return stack; - } - - @Override - public void setInventorySlotContents(int slot, ItemStack itemstack) { - this.inventory[slot] = itemstack; - - if (itemstack != null && itemstack.stackSize > this.getInventoryStackLimit()) - { - itemstack.stackSize = this.getInventoryStackLimit(); - } - - this.markDirty(); - } - - @Override - public String getInventoryName() { - return name; - } - - @Override - public boolean hasCustomInventoryName() { - return name.length() > 0; - } - - @Override - public int getInventoryStackLimit() { - return 1; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { - return true; - } - - @Override - public void openInventory() { - - } - - @Override - public void closeInventory() { - - } - - @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { - return true; - } - - @Override - public void writeToNBT(NBTTagCompound compound) - { - super.writeToNBT(compound); - if(flip!=null) - { - compound.setBoolean("flip_1", flip[0]); - compound.setBoolean("flip_2", flip[1]); - compound.setBoolean("flip_3", flip[2]); - compound.setBoolean("flip_4", flip[3]); - } - - writeInventoryToNBT(compound); - } - - @Override - public void readFromNBT(NBTTagCompound compound) - { - super.readFromNBT(compound); - - flip[0] = compound.getBoolean("flip_1"); - flip[1] = compound.getBoolean("flip_2"); - flip[2] = compound.getBoolean("flip_3"); - flip[3] = compound.getBoolean("flip_4"); - - readInventoryFromNBT(compound); - } - - public void readInventoryFromNBT(NBTTagCompound tags) { - NBTTagList nbttaglist = tags.getTagList("Items", Constants.NBT.TAG_COMPOUND); - for (int iter = 0; iter < nbttaglist.tagCount(); iter++) { - NBTTagCompound tagList = (NBTTagCompound) nbttaglist.getCompoundTagAt(iter); - byte slotID = tagList.getByte("Slot"); - if (slotID >= 0 && slotID < inventory.length) { - inventory[slotID] = ItemStack.loadItemStackFromNBT(tagList); - } - } - } - - -public void writeInventoryToNBT(NBTTagCompound tags) { - NBTTagList nbttaglist = new NBTTagList(); - for (int iter = 0; iter < inventory.length; iter++) { - if (inventory[iter] != null) { - NBTTagCompound tagList = new NBTTagCompound(); - tagList.setByte("Slot", (byte) iter); - inventory[iter].writeToNBT(tagList); - nbttaglist.appendTag(tagList); - } - } - - tags.setTag("Items", nbttaglist); - } -} diff --git a/src/main/java/gmail/Lance5057/tileentities/TileEntity_FinishingAnvil.java b/src/main/java/gmail/Lance5057/tileentities/TileEntity_FinishingAnvil.java deleted file mode 100644 index 164048e..0000000 --- a/src/main/java/gmail/Lance5057/tileentities/TileEntity_FinishingAnvil.java +++ /dev/null @@ -1,176 +0,0 @@ -package gmail.Lance5057.tileentities; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.Constants; - -public class TileEntity_FinishingAnvil extends TileEntity implements IInventory -{ - public static int invSize = 1; - public ItemStack[] inventory; - - private final String name = "Anvil Inventory"; - - public TileEntity_FinishingAnvil() - { - super(); - inventory = new ItemStack[invSize]; - } - - @Override - public void updateEntity() - { - super.updateEntity(); - } - - @Override - public Packet getDescriptionPacket() { - NBTTagCompound tag = new NBTTagCompound(); - writeToNBT(tag); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, tag); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { - readFromNBT(pkt.func_148857_g()); - } - - @Override - public int getSizeInventory() { - return invSize; - } - - @Override - public ItemStack getStackInSlot(int slot) { - return inventory[slot]; - } - - @Override - public ItemStack decrStackSize(int slot, int amount) { - ItemStack stack = getStackInSlot(slot); - if (stack != null) - { - if (stack.stackSize > amount) - { - stack = stack.splitStack(amount); - - if (stack.stackSize == 0) - { - setInventorySlotContents(slot, null); - } - } - else - { - setInventorySlotContents(slot, null); - } - - this.markDirty(); - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(int slot) { - ItemStack stack = getStackInSlot(slot); - - if (stack != null) - { - setInventorySlotContents(slot, stack); - } - return stack; - } - - @Override - public void setInventorySlotContents(int slot, ItemStack itemstack) { - this.inventory[slot] = itemstack; - - if (itemstack != null && itemstack.stackSize > this.getInventoryStackLimit()) - { - itemstack.stackSize = this.getInventoryStackLimit(); - } - - this.markDirty(); - } - - @Override - public String getInventoryName() { - return name; - } - - @Override - public boolean hasCustomInventoryName() { - return name.length() > 0; - } - - @Override - public int getInventoryStackLimit() { - return 1; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { - return true; - } - - @Override - public void openInventory() { - - } - - @Override - public void closeInventory() { - - } - - @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { - return true; - } - - @Override - public void writeToNBT(NBTTagCompound compound) - { - super.writeToNBT(compound); - writeInventoryToNBT(compound); - } - - @Override - public void readFromNBT(NBTTagCompound compound) - { - super.readFromNBT(compound); - readInventoryFromNBT(compound); - } - - public void readInventoryFromNBT(NBTTagCompound tags) { - NBTTagList nbttaglist = tags.getTagList("Items", Constants.NBT.TAG_COMPOUND); - for (int iter = 0; iter < nbttaglist.tagCount(); iter++) { - NBTTagCompound tagList = (NBTTagCompound) nbttaglist.getCompoundTagAt(iter); - byte slotID = tagList.getByte("Slot"); - if (slotID >= 0 && slotID < inventory.length) { - inventory[slotID] = ItemStack.loadItemStackFromNBT(tagList); - } - } - } - - -public void writeInventoryToNBT(NBTTagCompound tags) { - NBTTagList nbttaglist = new NBTTagList(); - for (int iter = 0; iter < inventory.length; iter++) { - if (inventory[iter] != null) { - NBTTagCompound tagList = new NBTTagCompound(); - tagList.setByte("Slot", (byte) iter); - inventory[iter].writeToNBT(tagList); - nbttaglist.appendTag(tagList); - } - } - - tags.setTag("Items", nbttaglist); - } -} diff --git a/src/main/java/gmail/Lance5057/tileentities/TileEntity_JewelersBench.java b/src/main/java/gmail/Lance5057/tileentities/TileEntity_JewelersBench.java deleted file mode 100644 index 7ca36da..0000000 --- a/src/main/java/gmail/Lance5057/tileentities/TileEntity_JewelersBench.java +++ /dev/null @@ -1,8 +0,0 @@ -package gmail.Lance5057.tileentities; - -import net.minecraft.tileentity.TileEntity; - -public class TileEntity_JewelersBench extends TileEntity -{ - -} -- cgit v1.2.3