diff options
Diffstat (limited to 'src/main/java')
36 files changed, 1397 insertions, 584 deletions
diff --git a/src/main/java/lance5057/tDefense/TD_Commands.java b/src/main/java/lance5057/tDefense/TD_Commands.java new file mode 100644 index 0000000..258480f --- /dev/null +++ b/src/main/java/lance5057/tDefense/TD_Commands.java @@ -0,0 +1,129 @@ +package lance5057.tDefense; + +import java.util.ArrayList; +import java.util.List; + +import lance5057.tDefense.armor.renderers.ModelMask; +import lance5057.tDefense.armor.renderers.ModelSheath; +import lance5057.tDefense.armor.renderers.cloth.ModelTinkersHood; +import lance5057.tDefense.armor.renderers.cloth.ModelTinkersRobe; +import lance5057.tDefense.armor.renderers.cloth.ModelTinkersShawl; +import lance5057.tDefense.armor.renderers.heavy.ModelTinkersBreastplate; +import lance5057.tDefense.armor.renderers.heavy.ModelTinkersGauntlets; +import lance5057.tDefense.armor.renderers.heavy.ModelTinkersGrieves; +import lance5057.tDefense.armor.renderers.heavy.ModelTinkersHelm; +import lance5057.tDefense.armor.renderers.heavy.ModelTinkersSabatons; +import lance5057.tDefense.armor.renderers.light.ModelTinkersBoots; +import lance5057.tDefense.armor.renderers.light.ModelTinkersChausses; +import lance5057.tDefense.armor.renderers.light.ModelTinkersCoif; +import lance5057.tDefense.armor.renderers.light.ModelTinkersHalberd; +import lance5057.tDefense.proxy.ClientProxy; +import net.minecraft.command.CommandBase; +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; +import net.minecraft.util.ChatComponentText; +import net.minecraft.world.World; + +public class TD_Commands extends CommandBase implements ICommand +{ + private final List aliases; + private final List commands; + + public TD_Commands() + { + aliases = new ArrayList(); + + aliases.add("TinkersDefense"); + aliases.add("TDefense"); + aliases.add("TD"); + + commands = new ArrayList(); + + commands.add("reloadModels"); + } + + @Override + public int getRequiredPermissionLevel() + { + return 0; + } + + @Override + public int compareTo(Object arg0) + { + return 0; + } + + @Override + public String getCommandName() + { + return "TinkersDefense"; + } + + @Override + public String getCommandUsage(ICommandSender p_71518_1_) + { + return "TinkersDefense <text>"; + } + + @Override + public List getCommandAliases() + { + return aliases; + } + + @Override + public void processCommand(ICommandSender p_71515_1_, String[] p_71515_2_) + { + World world = p_71515_1_.getEntityWorld(); + if(p_71515_2_[0].equals("reloadModels")) + { + p_71515_1_.addChatMessage(new ChatComponentText("§9[TDefense] - Reloading All Models...")); + reloadModels(); + } + else + { + p_71515_1_.addChatMessage(new ChatComponentText("§c[TDefense] - Invalid Command")); + } + } + + @Override + public boolean canCommandSenderUseCommand(ICommandSender p_71519_1_) + { + return true; + } + + @Override + public List addTabCompletionOptions(ICommandSender p_71516_1_, String[] p_71516_2_) + { + return commands; + } + + @Override + public boolean isUsernameIndex(String[] p_82358_1_, int p_82358_2_) + { + return false; + } + + public void reloadModels() + { + ClientProxy.mask = new ModelMask(null); + ClientProxy.sheath = new ModelSheath(); + + ClientProxy.helm = new ModelTinkersHelm(); + ClientProxy.breastplate = new ModelTinkersBreastplate(); + ClientProxy.grieves = new ModelTinkersGrieves(); + ClientProxy.sabatons = new ModelTinkersSabatons(); + ClientProxy.gauntlets = new ModelTinkersGauntlets(); + + ClientProxy.hood = new ModelTinkersHood(); + ClientProxy.shawl = new ModelTinkersShawl(); + ClientProxy.robe = new ModelTinkersRobe(); + ClientProxy.shoes = new ModelTinkersBoots(); + + ClientProxy.coif = new ModelTinkersCoif(); + ClientProxy.halberd = new ModelTinkersHalberd(); + ClientProxy.chausses = new ModelTinkersChausses(); + ClientProxy.boots = new ModelTinkersBoots(); + } +} diff --git a/src/main/java/lance5057/tDefense/TD_Config.java b/src/main/java/lance5057/tDefense/TD_Config.java index 5d212ba..6035707 100644 --- a/src/main/java/lance5057/tDefense/TD_Config.java +++ b/src/main/java/lance5057/tDefense/TD_Config.java @@ -25,7 +25,12 @@ public class TD_Config public int ArmorFireProtectionID; public int ArmorBlastProtectionID; public int ArmorProjectileProtectionID; - public int FeatherfallID; + public int ArmorFeatherfallID; + public int ArmorGlowstepID; + public int ArmorFrostwalkerID; + public int ArmorFirewalkerID; + public int ArmorDepthstriderID; + public int ArmorRebreatherID; public int MaterialIndex; @@ -57,7 +62,12 @@ public class TD_Config ArmorFireProtectionID = config.getInt("Fire Protection ID", "Armor Modifier Configs", 41, 0, Integer.MAX_VALUE, ""); ArmorBlastProtectionID = config.getInt("Blast Protection ID", "Armor Modifier Configs", 42, 0, Integer.MAX_VALUE, ""); ArmorProjectileProtectionID = config.getInt("Projectile Protection ID", "Armor Modifier Configs", 43, 0, Integer.MAX_VALUE, ""); - FeatherfallID = config.getInt("Featherfall ID", "Armor Modifier Configs", 44, 0, Integer.MAX_VALUE, ""); + ArmorFeatherfallID = config.getInt("Featherfall ID", "Armor Modifier Configs", 44, 0, Integer.MAX_VALUE, ""); + ArmorGlowstepID = config.getInt("Glowstep ID", "Armor Modifier Configs", 45, 0, Integer.MAX_VALUE, ""); + ArmorFrostwalkerID = config.getInt("Frostwalker ID", "Armor Modifier Configs", 46, 0, Integer.MAX_VALUE, ""); + ArmorFirewalkerID = config.getInt("Firewalker ID", "Armor Modifier Configs", 47, 0, Integer.MAX_VALUE, ""); + ArmorDepthstriderID = config.getInt("Depthstrider ID", "Armor Modifier Configs", 48, 0, Integer.MAX_VALUE, ""); + ArmorRebreatherID = config.getInt("Rebreather ID", "Armor Modifier Configs", 49, 0, Integer.MAX_VALUE, ""); BotaniaAddon = config.getBoolean("Enable Botania Addon", "Botania Addon", true, "Still requires Botania to use"); CorpseIvyModID = config.getInt("Corpse Drinker Ivy Modifier ID", "Botania Addon", 60, 0, Integer.MAX_VALUE, ""); diff --git a/src/main/java/lance5057/tDefense/TinkersDefense.java b/src/main/java/lance5057/tDefense/TinkersDefense.java index 484de86..04421fc 100644 --- a/src/main/java/lance5057/tDefense/TinkersDefense.java +++ b/src/main/java/lance5057/tDefense/TinkersDefense.java @@ -4,9 +4,7 @@ import static net.minecraft.util.EnumChatFormatting.DARK_RED; import static net.minecraft.util.EnumChatFormatting.GOLD; import static net.minecraft.util.EnumChatFormatting.LIGHT_PURPLE; -import java.util.ArrayList; import java.util.Date; -import java.util.List; import lance5057.tDefense.addons.TDAddonBotania; import lance5057.tDefense.armor.blocks.GlowstoneCrumbs; @@ -14,11 +12,13 @@ import lance5057.tDefense.armor.blocks.UnstableBlock; import lance5057.tDefense.armor.blocks.UnstableItemBlock; import lance5057.tDefense.armor.events.ArmorModEvents; import lance5057.tDefense.armor.events.ArmorRenderEvent; +import lance5057.tDefense.armor.items.Sheath; import lance5057.tDefense.armor.items.cloth.TinkersHood; import lance5057.tDefense.armor.items.cloth.TinkersRobe; import lance5057.tDefense.armor.items.cloth.TinkersShawl; import lance5057.tDefense.armor.items.cloth.TinkersShoes; import lance5057.tDefense.armor.items.heavy.TinkersBreastplate; +import lance5057.tDefense.armor.items.heavy.TinkersGauntlets; import lance5057.tDefense.armor.items.heavy.TinkersGrieves; import lance5057.tDefense.armor.items.heavy.TinkersHelm; import lance5057.tDefense.armor.items.heavy.TinkersSabatons; @@ -37,9 +37,7 @@ import lance5057.tDefense.core.blocks.QueensGoldBlock; import lance5057.tDefense.core.blocks.RedMintBlock; import lance5057.tDefense.core.blocks.crestMount.CrestMount; import lance5057.tDefense.core.blocks.crestMount.TileEntity_CrestMount; -import lance5057.tDefense.core.blocks.ore.TD_Ore; import lance5057.tDefense.core.events.TDEventHandler; -import lance5057.tDefense.core.items.RawGem; import lance5057.tDefense.core.liquids.MoltenFluid; import lance5057.tDefense.core.network.PacketHandler; import lance5057.tDefense.core.tools.HeaterShield; @@ -51,7 +49,6 @@ import lance5057.tDefense.core.tools.modifiers.Modifiers; import lance5057.tDefense.finishingAnvil.blocks.finishingAnvil.FinishingAnvil; import lance5057.tDefense.finishingAnvil.blocks.finishingAnvil.TileEntity_FinishingAnvil; import lance5057.tDefense.finishingAnvil.utilities.Injector; -import lance5057.tDefense.finishingAnvil.utilities.InjectorLocations; import lance5057.tDefense.proxy.CommonProxy; import lance5057.tDefense.tileentities.TileEntity_JewelersBench; import net.minecraft.block.Block; @@ -62,6 +59,7 @@ import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; +import net.minecraftforge.client.ClientCommandHandler; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; @@ -73,7 +71,6 @@ 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; @@ -169,7 +166,7 @@ public class TinkersDefense public static ToolCore tool_roundShield; public static ToolCore tool_heaterShield; public static ToolCore tool_wrench; - // public static ToolCore tool_sheath; + public static ToolCore tool_sheath; // public static ToolCore tool_mask; public static ToolCore tool_zweihander; public static ToolCore tool_shears; @@ -195,6 +192,7 @@ public class TinkersDefense public static ToolCore armor_TinkerBreastplate; public static ToolCore armor_TinkerGrieves; public static ToolCore armor_TinkerSabatons; + public static ToolCore armor_TinkerGauntlets; public static Item item_ChainArmor; public static Pattern woodPattern; @@ -206,8 +204,7 @@ public class TinkersDefense public static Item partCloth; public static Item partChainmaille; - public static List<Injector> tcInject; - public static InjectorLocations injectLoc; + public static ToolCore tcInject; public static TDAddonBotania flowermod; @@ -234,14 +231,15 @@ public class TinkersDefense NetworkRegistry.INSTANCE.registerGuiHandler(TinkersDefense.instance, new CommonProxy()); MinecraftForge.EVENT_BUS.register(this); + ClientCommandHandler.instance.registerCommand(new TD_Commands()); + tabIcon = new Item().setMaxStackSize(1).setCreativeTab(tabName).setUnlocalizedName("tabIcon").setTextureName(Reference.MOD_ID + ":Icon"); GameRegistry.registerItem(tabIcon, "tabIcon"); //flowermod = new TDAddonBotania(); mods = new Modifiers(); - - injectLoc = new InjectorLocations(); + mods.preInit(); // item_RawSapphire = new RawGem("sapphire"); // item_RawRuby = new RawGem("ruby"); @@ -391,7 +389,7 @@ public class TinkersDefense tool_shears = new Shears(); tool_wrench = new TinkerWrench(); - // tool_sheath = new Sheath(); + tool_sheath = new Sheath(); // tool_mask = new Mask(); tool_zweihander = new TinkerZweihander(0); @@ -400,6 +398,7 @@ public class TinkersDefense armor_TinkerBreastplate = new TinkersBreastplate(); armor_TinkerGrieves = new TinkersGrieves(); armor_TinkerSabatons = new TinkersSabatons(); + armor_TinkerGauntlets = new TinkersGauntlets(); armor_TinkerRobe = new TinkersRobe(); armor_TinkerShawl = new TinkersShawl(); @@ -418,7 +417,7 @@ public class TinkersDefense GameRegistry.registerItem(tool_shears, "Tinker Shears"); GameRegistry.registerItem(tool_wrench, "Tinker Wrench"); - // GameRegistry.registerItem(tool_sheath, "Sheath"); + GameRegistry.registerItem(tool_sheath, "Sheath"); // GameRegistry.registerItem(tool_mask, "Mask"); GameRegistry.registerItem(tool_zweihander, "Zweihander"); @@ -426,6 +425,7 @@ public class TinkersDefense GameRegistry.registerItem(armor_TinkerBreastplate, "tinkerbreastplate"); GameRegistry.registerItem(armor_TinkerGrieves, "tinkergrieves"); GameRegistry.registerItem(armor_TinkerSabatons, "tinkersabatons"); + GameRegistry.registerItem(armor_TinkerGauntlets, "tinkergauntlets"); GameRegistry.registerItem(armor_TinkerCoif, "tinkercoif"); GameRegistry.registerItem(armor_TinkerHalberd, "tinkerhalberd"); @@ -442,7 +442,7 @@ public class TinkersDefense TConstructRegistry.addItemToDirectory("Heater Shield", tool_heaterShield); TConstructRegistry.addItemToDirectory("Tinker Shears", tool_shears); TConstructRegistry.addItemToDirectory("Tinker Wrench", tool_wrench); - // TConstructRegistry.addItemToDirectory("Sheath", tool_sheath); + TConstructRegistry.addItemToDirectory("Sheath", tool_sheath); // TConstructRegistry.addItemToDirectory("Mask", tool_mask); TConstructRegistry.addItemToDirectory("Zweihander", tool_zweihander); @@ -450,6 +450,7 @@ public class TinkersDefense TConstructRegistry.addItemToDirectory("tinkerbreastplate", armor_TinkerBreastplate); TConstructRegistry.addItemToDirectory("tinkergrieves", armor_TinkerGrieves); TConstructRegistry.addItemToDirectory("tinkersabatons", armor_TinkerSabatons); + TConstructRegistry.addItemToDirectory("tinkergauntlets", armor_TinkerGauntlets); TConstructRegistry.addItemToDirectory("tinkercoif", armor_TinkerCoif); TConstructRegistry.addItemToDirectory("tinkerhalberd", armor_TinkerHalberd); @@ -475,15 +476,6 @@ public class TinkersDefense // Renderers proxy.registerRenderers(); - - // item_ChainArmor = new ChainArmor(ArmorMaterial.IRON, 4, 1).setUnlocalizedName("Chain_Armor"); - // GameRegistry.registerItem(item_ChainArmor,"Chain Armor"); - - //tool_Sheath = new Sheath().setUnlocalizedName("Sheath"); - - // network.registerMessage(messageHandler, requestMessageType, - // discriminator, side); - } @EventHandler @@ -523,7 +515,7 @@ public class TinkersDefense //buildParts(partCloth, 3); buildParts(partChainmaille, 4); - mods.init(); + PatternBuilder pb = PatternBuilder.instance; @@ -677,13 +669,14 @@ public class TinkersDefense TConstructRegistry.addToolRecipe(tool_zweihander, TinkerTools.largeSwordBlade, TinkerTools.toughRod, TinkerTools.wideGuard, TinkerTools.swordBlade); //Armor - // TConstructRegistry.addToolRecipe(tool_sheath, partArmorplate,TinkerTools.toolRod, partCloth, partClasp); + TConstructRegistry.addToolRecipe(tool_sheath, partArmorplate, TinkerTools.toolRod, partClasp, partCloth); // TConstructRegistry.addToolRecipe(tool_mask, partArmorplate, partCloth, partClasp); TConstructRegistry.addToolRecipe(armor_TinkerHelm, TinkerTools.frypanHead, TinkerTools.toughRod, partArmorplate); TConstructRegistry.addToolRecipe(armor_TinkerBreastplate, TinkerTools.largePlate, TinkerTools.toughRod, partArmorplate, partChainmaille); TConstructRegistry.addToolRecipe(armor_TinkerGrieves, partArmorplate, TinkerTools.toughRod, partChainmaille, partArmorplate); TConstructRegistry.addToolRecipe(armor_TinkerSabatons, partArmorplate, TinkerTools.toughRod, partArmorplate, partCloth); + TConstructRegistry.addToolRecipe(armor_TinkerGauntlets, partArmorplate, TinkerTools.toughRod, partRivet); TConstructRegistry.addToolRecipe(armor_TinkerRobe, partCloth, partCloth); TConstructRegistry.addToolRecipe(armor_TinkerShawl, partCloth, partCloth, partClasp); @@ -695,16 +688,19 @@ public class TinkersDefense TConstructRegistry.addToolRecipe(armor_TinkerChausses, partChainmaille, partArmorplate); TConstructRegistry.addToolRecipe(armor_TinkerBoots, partChainmaille, partCloth, partRivet); - tcInject = new ArrayList<Injector>(); - - for(int i = 0; i < TConstructRegistry.tools.size(); i++) - { - if(!(TConstructRegistry.tools.get(i) instanceof Injector)) - { - tcInject.add(new Injector(i, TConstructRegistry.tools.get(i), injectLoc)); - GameRegistry.registerItem(tcInject.get(i), "debugger_" + TConstructRegistry.tools.get(i).getLocalizedToolName()); - } - } + tcInject = new Injector(0); + GameRegistry.registerItem(tcInject, "???"); + + mods.Init(); + + // for(int i = 0; i < TConstructRegistry.tools.size(); i++) + // { + // if(!(TConstructRegistry.tools.get(i) instanceof Injector)) + // { + // tcInject.add(new Injector(i, TConstructRegistry.tools.get(i), injectLoc)); + // GameRegistry.registerItem(tcInject.get(i), "debugger_" + TConstructRegistry.tools.get(i).getLocalizedToolName()); + // } + // } //AMEvent.init(); } diff --git a/src/main/java/lance5057/tDefense/armor/ArmorCore.java b/src/main/java/lance5057/tDefense/armor/ArmorCore.java index f43cc46..6405da0 100644 --- a/src/main/java/lance5057/tDefense/armor/ArmorCore.java +++ b/src/main/java/lance5057/tDefense/armor/ArmorCore.java @@ -1,5 +1,6 @@ package lance5057.tDefense.armor; +import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.modifiers.ArmorMods; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; @@ -21,14 +22,12 @@ public class ArmorCore extends ToolCore implements ISpecialArmor int slot; public float reductionPercent = 0f; protected int maxReduction = 100; - ArmorMods amod; - + public ArmorCore(int baseProtection, int slot) { super(baseProtection); this.slot = slot; - amod = new ArmorMods(); } @Override @@ -124,7 +123,7 @@ public class ArmorCore extends ToolCore implements ISpecialArmor public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - amod.UpdateAll((ToolCore) itemStack.getItem(), itemStack, world, player, itemStack.getTagCompound().getCompoundTag("InfiTool")); + TinkersDefense.mods.AMod.UpdateAll((ToolCore) itemStack.getItem(), itemStack, world, player, itemStack.getTagCompound().getCompoundTag("InfiTool")); } } diff --git a/src/main/java/lance5057/tDefense/armor/blocks/UnstableBlock.java b/src/main/java/lance5057/tDefense/armor/blocks/UnstableBlock.java index f98206e..f6ca02c 100644 --- a/src/main/java/lance5057/tDefense/armor/blocks/UnstableBlock.java +++ b/src/main/java/lance5057/tDefense/armor/blocks/UnstableBlock.java @@ -84,6 +84,21 @@ public class UnstableBlock extends Block { return 1; } + @Override + public void breakBlock(World par1World, int par2, int par3, int par4, Block p_149749_5_, int meta) + { + //int meta = par1World.getBlockMetadata(par2, par3, par4); + + if(meta == 0) + { + par1World.setBlock(par2, par3, par4, Blocks.water, 0, 3); + } + if(meta == 1) + { + par1World.setBlock(par2, par3, par4, Blocks.lava, 0, 3); + } + par1World.notifyBlockOfNeighborChange(par2, par3, par4, par1World.getBlock(par2, par3, par4)); + } @Override public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) diff --git a/src/main/java/lance5057/tDefense/armor/events/ArmorRenderEvent.java b/src/main/java/lance5057/tDefense/armor/events/ArmorRenderEvent.java index 9accd4f..99eedbe 100644 --- a/src/main/java/lance5057/tDefense/armor/events/ArmorRenderEvent.java +++ b/src/main/java/lance5057/tDefense/armor/events/ArmorRenderEvent.java @@ -1,5 +1,7 @@ package lance5057.tDefense.armor.events; +import tconstruct.armor.ArmorProxyClient; +import tconstruct.armor.player.ArmorExtended; import lance5057.tDefense.armor.ArmorCore; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.player.EntityPlayer; @@ -20,65 +22,73 @@ public class ArmorRenderEvent { if(event.entityPlayer != null) { - for(int i = 0; i < 4; i++) + ArmorExtended armorEx = ArmorProxyClient.armorExtended; + + ItemStack Armor = event.entityPlayer.inventory.armorItemInSlot(event.slot); + + if(Armor != null) { - if(event.entityPlayer.inventory.armorItemInSlot(i) != null) - { - ItemStack Armor = event.entityPlayer.inventory.armorItemInSlot(i); - NBTTagCompound tags = Armor.getTagCompound(); + ModelBiped armorModel = Armor.getItem().getArmorModel(event.entityLiving, Armor, event.slot); + + TrimArmor(armorModel, event); + } + + ItemStack Accessory = armorEx.getStackInSlot(event.slot); + + if(Accessory != null) + { + ModelBiped accessoryModel = Accessory.getItem().getArmorModel(event.entityLiving, Accessory, event.slot); + + TrimArmor(accessoryModel, event); + } + + } + } + + private void TrimArmor(ModelBiped armorModel, RenderPlayerEvent.SetArmorModel event) + { + if(armorModel != null) + { + armorModel.isSneak = event.entityPlayer.isSneaking(); + armorModel.isRiding = event.entityPlayer.isRiding(); + armorModel.isChild = event.entityPlayer.isChild(); - if(Armor.getItem() instanceof ArmorCore) + armorModel.onGround = event.entityPlayer.getSwingProgress(event.partialRenderTick); + + if(event.entityPlayer instanceof EntityPlayer) + { + ItemStack itemstack = event.entityPlayer.inventory.getCurrentItem(); + armorModel.heldItemRight = 0; + armorModel.aimedBow = false; + if(itemstack != null) + { + if(event.entityPlayer.getItemInUseCount() > 0) { - ArmorCore AArmor = (ArmorCore) Armor.getItem(); - ModelBiped armorModel = AArmor.getArmorModel(event.entityLiving, Armor, AArmor.getSlot()); + EnumAction enumaction = itemstack.getItemUseAction(); - if(armorModel != null) + if(enumaction == EnumAction.block) { - armorModel.isSneak = event.entityPlayer.isSneaking(); - armorModel.isRiding = event.entityPlayer.isRiding(); - armorModel.isChild = event.entityPlayer.isChild(); - - armorModel.onGround = event.entityPlayer.getSwingProgress(event.partialRenderTick); - - if(event.entityPlayer instanceof EntityPlayer) - { - ItemStack itemstack = event.entityPlayer.inventory.getCurrentItem(); - armorModel.heldItemRight = 0; - armorModel.aimedBow = false; - if(itemstack != null) - { - if(event.entityPlayer.getItemInUseCount() > 0) - { - EnumAction enumaction = itemstack.getItemUseAction(); - - if(enumaction == EnumAction.block) - { - armorModel.heldItemRight = 3; - } - else if(enumaction == EnumAction.bow) - { - armorModel.aimedBow = true; - } - } - else - { - armorModel.heldItemRight = event.entityPlayer.getHeldItem() != null ? 1 : 0; - } - } - } + armorModel.heldItemRight = 3; } - - float yaw = event.entityPlayer.prevRotationYawHead + (event.entityPlayer.rotationYawHead - event.entityPlayer.prevRotationYawHead) * event.partialRenderTick; - float yawOffset = event.entityPlayer.prevRenderYawOffset + (event.entityPlayer.renderYawOffset - event.entityPlayer.prevRenderYawOffset) * event.partialRenderTick; - float limbs = event.entityPlayer.prevLimbSwingAmount + (event.entityPlayer.limbSwingAmount - event.entityPlayer.prevLimbSwingAmount) * event.partialRenderTick; - float limbSwing = event.entityPlayer.limbSwing - event.entityPlayer.limbSwingAmount * (1.0F - event.partialRenderTick); - - armorModel.setRotationAngles(limbSwing, limbs, event.entityPlayer.ticksExisted, yaw - yawOffset, event.entityPlayer.rotationPitch, 0.1f, event.entityPlayer); - armorModel.render(event.entityPlayer, limbSwing, limbs, event.entityPlayer.ticksExisted, yaw - yawOffset, event.entityPlayer.rotationPitch, 0.1f); + else if(enumaction == EnumAction.bow) + { + armorModel.aimedBow = true; + } + } + else + { + armorModel.heldItemRight = event.entityPlayer.getHeldItem() != null ? 1 : 0; } } } + + float yaw = event.entityPlayer.prevRotationYawHead + (event.entityPlayer.rotationYawHead - event.entityPlayer.prevRotationYawHead) * event.partialRenderTick; + float yawOffset = event.entityPlayer.prevRenderYawOffset + (event.entityPlayer.renderYawOffset - event.entityPlayer.prevRenderYawOffset) * event.partialRenderTick; + float limbs = event.entityPlayer.prevLimbSwingAmount + (event.entityPlayer.limbSwingAmount - event.entityPlayer.prevLimbSwingAmount) * event.partialRenderTick; + float limbSwing = event.entityPlayer.limbSwing - event.entityPlayer.limbSwingAmount * (1.0F - event.partialRenderTick); + + armorModel.setRotationAngles(limbSwing, limbs, event.entityPlayer.ticksExisted, yaw - yawOffset, event.entityPlayer.rotationPitch, 0.1f, event.entityPlayer); + armorModel.render(event.entityPlayer, limbSwing, limbs, event.entityPlayer.ticksExisted, yaw - yawOffset, event.entityPlayer.rotationPitch, 0.1f); } } - } diff --git a/src/main/java/lance5057/tDefense/armor/items/Sheath.java b/src/main/java/lance5057/tDefense/armor/items/Sheath.java index b631d1b..1dc87ea 100644 --- a/src/main/java/lance5057/tDefense/armor/items/Sheath.java +++ b/src/main/java/lance5057/tDefense/armor/items/Sheath.java @@ -1,19 +1,24 @@ package lance5057.tDefense.armor.items; +import lance5057.tDefense.TinkersDefense; +import lance5057.tDefense.armor.parts.ClothMaterial; import lance5057.tDefense.armor.renderers.ModelSheath; +import lance5057.tDefense.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.TConstructRegistry; import tconstruct.library.accessory.IAccessory; import tconstruct.library.accessory.IAccessoryModel; import tconstruct.library.tools.ToolCore; +import tconstruct.tools.TinkerTools; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class Sheath extends ToolCore implements IAccessoryModel, IAccessory +public class Sheath extends ToolCore implements IAccessory { public Sheath() @@ -31,34 +36,43 @@ public class Sheath extends ToolCore implements IAccessoryModel, IAccessory @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { - String color[] = new String[10]; + String[] color = new String[10]; - for(int i = 0; i < 10; i++) - color[i] = Integer.toHexString(this.getColorFromItemStack(itemStack, i)); + for(int j = 0; j < 10; j++) + color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); + + int HandleID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderExtra"); + + color[3] = Integer.toHexString(TConstructRegistry.getCustomMaterial(HandleID, ClothMaterial.class).color); - return new ModelSheath(color); + String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(4), this.getIconSuffix(3)}; + + ClientProxy.sheath.SetColors(color, this.getDefaultFolder(), textures); + return ClientProxy.sheath; } @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) + public Item getHeadItem() { - return "tinkersdefense:textures/armor/Sheath/_sheath_base.png"; + return TinkersDefense.partArmorplate; } - ResourceLocation texture = new ResourceLocation("tinkersdefense", "textures/armor/Sheath/_sheath_base.png"); - @Override - @SideOnly(Side.CLIENT) - public ResourceLocation getWearbleTexture(Entity entity, ItemStack stack, int slot) + public Item getHandleItem() { - return texture; + return TinkerTools.toolRod; } @Override public Item getAccessoryItem() { - // TODO Auto-generated method stub - return null; + return TinkersDefense.partClasp; + } + + @Override + public Item getExtraItem() + { + return TinkersDefense.partCloth; } @Override @@ -74,13 +88,6 @@ public class Sheath extends ToolCore implements IAccessoryModel, IAccessory return "_sheath_effect"; } - @Override - public Item getHeadItem() - { - // TODO Auto-generated method stub - return null; - } - @SideOnly(Side.CLIENT) @Override public int getPartAmount() diff --git a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersHood.java b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersHood.java index 98a17bb..361bf54 100644 --- a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersHood.java +++ b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersHood.java @@ -6,6 +6,7 @@ import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.parts.ClothMaterial; import lance5057.tDefense.armor.renderers.cloth.ModelTinkersHood; +import lance5057.tDefense.proxy.ClientProxy; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -120,17 +121,21 @@ public class TinkersHood extends ArmorCore @Override public String[] getTraits() { - return new String[] {"armor", "helmet", "hood", "cloth"}; + return new String[] {"armor", "head", "hood", "cloth"}; } @Override @SideOnly(Side.CLIENT) - public ModelBiped getModel(String[] color, NBTTagCompound tags) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + String[] color = new String[10]; String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; - int HeadID = tags.getCompoundTag("InfiTool").getInteger("RenderHead"); - int HandleID = tags.getCompoundTag("InfiTool").getInteger("RenderHandle"); + for(int j = 0; j < 10; j++) + color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); + + int HeadID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHead"); + int HandleID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHandle"); CustomMaterial newColor = TConstructRegistry.getCustomMaterial(HeadID, ClothMaterial.class); color[1] = Integer.toHexString(newColor.color); @@ -138,7 +143,8 @@ public class TinkersHood extends ArmorCore newColor = TConstructRegistry.getCustomMaterial(HandleID, ClothMaterial.class); color[0] = Integer.toHexString(newColor.color); - return new ModelTinkersHood(color, this.getDefaultFolder(), textures); + ClientProxy.hood.SetColors(color, this.getDefaultFolder(), textures); + return ClientProxy.hood; } @Override diff --git a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersRobe.java b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersRobe.java index d963c1d..394267c 100644 --- a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersRobe.java +++ b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersRobe.java @@ -8,8 +8,10 @@ import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.parts.ClothMaterial; import lance5057.tDefense.armor.renderers.cloth.ModelTinkersRobe; +import lance5057.tDefense.proxy.ClientProxy; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -114,12 +116,16 @@ public class TinkersRobe extends ArmorCore @Override @SideOnly(Side.CLIENT) - public ModelBiped getModel(String[] color, NBTTagCompound tags) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { - String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0)}; + String[] color = new String[10]; + String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; - int HeadID = tags.getCompoundTag("InfiTool").getInteger("RenderHead"); - int HandleID = tags.getCompoundTag("InfiTool").getInteger("RenderHandle"); + for(int j = 0; j < 10; j++) + color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); + + int HeadID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHead"); + int HandleID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHandle"); CustomMaterial newColor = TConstructRegistry.getCustomMaterial(HeadID, ClothMaterial.class); color[1] = Integer.toHexString(newColor.color); @@ -127,7 +133,8 @@ public class TinkersRobe extends ArmorCore newColor = TConstructRegistry.getCustomMaterial(HandleID, ClothMaterial.class); color[0] = Integer.toHexString(newColor.color); - return new ModelTinkersRobe(color, this.getDefaultFolder(), textures); + ClientProxy.robe.SetColors(color, this.getDefaultFolder(), textures); + return ClientProxy.robe; } @Override diff --git a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShawl.java b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShawl.java index 76b5ae9..9afc5f1 100644 --- a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShawl.java +++ b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShawl.java @@ -7,8 +7,10 @@ import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.parts.ClothMaterial; import lance5057.tDefense.armor.renderers.cloth.ModelTinkersShawl; import lance5057.tDefense.armor.renderers.heavy.ModelTinkersHelm; +import lance5057.tDefense.proxy.ClientProxy; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -124,12 +126,16 @@ public class TinkersShawl extends ArmorCore @Override @SideOnly(Side.CLIENT) - public ModelBiped getModel(String[] color, NBTTagCompound tags) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + String[] color = new String[10]; String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; - int HeadID = tags.getCompoundTag("InfiTool").getInteger("RenderHead"); - int HandleID = tags.getCompoundTag("InfiTool").getInteger("RenderHandle"); + for(int j = 0; j < 10; j++) + color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); + + int HeadID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHead"); + int HandleID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHandle"); CustomMaterial newColor = TConstructRegistry.getCustomMaterial(HeadID, ClothMaterial.class); color[1] = Integer.toHexString(newColor.color); @@ -137,7 +143,8 @@ public class TinkersShawl extends ArmorCore newColor = TConstructRegistry.getCustomMaterial(HandleID, ClothMaterial.class); color[0] = Integer.toHexString(newColor.color); - return new ModelTinkersShawl(color, this.getDefaultFolder(), textures); + ClientProxy.shawl.SetColors(color, this.getDefaultFolder(), textures); + return ClientProxy.shawl; } @Override diff --git a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShoes.java b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShoes.java index 0ab18d1..1b481be 100644 --- a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShoes.java +++ b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShoes.java @@ -6,8 +6,10 @@ import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.parts.ClothMaterial; import lance5057.tDefense.armor.renderers.light.ModelTinkersBoots; +import lance5057.tDefense.proxy.ClientProxy; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -122,16 +124,21 @@ public class TinkersShoes extends ArmorCore @Override @SideOnly(Side.CLIENT) - public ModelBiped getModel(String[] color, NBTTagCompound tags) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + String[] color = new String[10]; String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; - int HeadID = tags.getCompoundTag("InfiTool").getInteger("RenderHead"); + for(int j = 0; j < 10; j++) + color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); + + int HeadID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHead"); CustomMaterial newColor = TConstructRegistry.getCustomMaterial(HeadID, ClothMaterial.class); color[1] = Integer.toHexString(newColor.color); - return (ModelBiped) new ModelTinkersBoots(color, this.getDefaultFolder(), textures); + ClientProxy.shoes.SetColors(color, this.getDefaultFolder(), textures); + return ClientProxy.shoes; } @Override diff --git a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersGauntlets.java b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersGauntlets.java new file mode 100644 index 0000000..4a94f9e --- /dev/null +++ b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersGauntlets.java @@ -0,0 +1,148 @@ +package lance5057.tDefense.armor.items.heavy; + +import lance5057.tDefense.TinkersDefense; +import lance5057.tDefense.armor.ArmorCore; +import lance5057.tDefense.proxy.ClientProxy; +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +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 tconstruct.tools.TinkerTools; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class TinkersGauntlets extends ToolCore implements IAccessory +{ + public TinkersGauntlets() + { + super(2); + this.setUnlocalizedName("tinkersgauntlets"); + } + + @Override + public boolean canEquipAccessory(ItemStack item, int slot) + { + return slot == 1; + } + + @Override + public Item getHeadItem() + { + return TinkersDefense.partArmorplate; + } + + @Override + public Item getHandleItem() + { + return TinkerTools.toughRod; + } + + @Override + public Item getAccessoryItem() + { + return TinkersDefense.partRivet; + } + + @Override + public int durabilityTypeAccessory() + { + return 2; + } + + @Override + public float getRepairCost() + { + return 1.0f; + } + + @Override + public float getDurabilityModifier() + { + return 2.5f; + } + + @Override + public float getDamageModifier() + { + return 1.4f; + } + + @Override + public int getPartAmount() + { + return 3; + } + + @Override + public String getIconSuffix(int partType) + { + switch(partType) + { + case 0: + return "_gauntlet_plate"; + case 1: + return "_gauntlet_plate_broken"; + case 2: + return "_gauntlet_trim"; + case 3: + return "_gauntlet_rivet"; + default: + return ""; + } + } + + @Override + public String getEffectSuffix() + { + return "_gauntlet_effect"; + } + + @Override + public String getDefaultFolder() + { + return "armor/gauntlets"; + } + + // @Override + // public void onUpdate(ItemStack stack, World world, Entity entity, int + // par4, + // boolean par5) { + // super.onUpdate(stack, world, entity, par4, par5); + // + // } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) + { + return "tinkersdefense:textures/armor/Tinkersgauntlet.png"; + } + + @Override + public String[] getTraits() + { + return new String[] {"hands", "gauntlet"}; + } + + @Override + @SideOnly(Side.CLIENT) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + { + String[] color = new String[10]; + + for(int j = 0; j < 10; j++) + color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); + + String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; + + ClientProxy.gauntlets.SetColors(color, this.getDefaultFolder(), textures); + return ClientProxy.gauntlets; + } +} diff --git a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersHelm.java b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersHelm.java index 5bd30f2..23287b9 100644 --- a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersHelm.java +++ b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersHelm.java @@ -121,7 +121,7 @@ public class TinkersHelm extends ArmorCore @Override public String[] getTraits() { - return new String[] {"armor", "helmet", "helm", "heavyarmor"}; + return new String[] {"armor", "head", "helm", "heavyarmor"}; } @Override diff --git a/src/main/java/lance5057/tDefense/armor/items/light/TinkersBoots.java b/src/main/java/lance5057/tDefense/armor/items/light/TinkersBoots.java index ce972ea..acce2b6 100644 --- a/src/main/java/lance5057/tDefense/armor/items/light/TinkersBoots.java +++ b/src/main/java/lance5057/tDefense/armor/items/light/TinkersBoots.java @@ -7,6 +7,7 @@ import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.parts.ClothMaterial; import lance5057.tDefense.armor.renderers.cloth.ModelTinkersHood; import lance5057.tDefense.armor.renderers.light.ModelTinkersBoots; +import lance5057.tDefense.proxy.ClientProxy; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -128,16 +129,21 @@ public class TinkersBoots extends ArmorCore @Override @SideOnly(Side.CLIENT) - public ModelBiped getModel(String[] color, NBTTagCompound tags) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { - String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; + String[] color = new String[10]; - int HandleID = tags.getCompoundTag("InfiTool").getInteger("RenderHandle"); + for(int j = 0; j < 10; j++) + color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); + + int AccessoryID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHandle"); - CustomMaterial newColor = TConstructRegistry.getCustomMaterial(HandleID, ClothMaterial.class); + CustomMaterial newColor = TConstructRegistry.getCustomMaterial(AccessoryID, ClothMaterial.class); color[0] = Integer.toHexString(newColor.color); - return new ModelTinkersBoots(color, this.getDefaultFolder(), textures); + String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; + ClientProxy.boots.SetColors(color, this.getDefaultFolder(), textures); + return ClientProxy.boots; } @Override diff --git a/src/main/java/lance5057/tDefense/armor/items/light/TinkersChausses.java b/src/main/java/lance5057/tDefense/armor/items/light/TinkersChausses.java index c552584..40fc7f0 100644 --- a/src/main/java/lance5057/tDefense/armor/items/light/TinkersChausses.java +++ b/src/main/java/lance5057/tDefense/armor/items/light/TinkersChausses.java @@ -6,6 +6,7 @@ import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.parts.ClothMaterial; import lance5057.tDefense.armor.renderers.light.ModelTinkersChausses; +import lance5057.tDefense.proxy.ClientProxy; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -119,11 +120,16 @@ public class TinkersChausses extends ArmorCore @Override @SideOnly(Side.CLIENT) - public ModelBiped getModel(String[] color, NBTTagCompound tags) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { - String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0)}; + String[] color = new String[10]; + + for(int j = 0; j < 10; j++) + color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); - return new ModelTinkersChausses(color, this.getDefaultFolder(), textures); + String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0)}; + ClientProxy.chausses.SetColors(color, this.getDefaultFolder(), textures); + return ClientProxy.chausses; } @Override diff --git a/src/main/java/lance5057/tDefense/armor/items/light/TinkersCoif.java b/src/main/java/lance5057/tDefense/armor/items/light/TinkersCoif.java index 98a77c6..4e1b538 100644 --- a/src/main/java/lance5057/tDefense/armor/items/light/TinkersCoif.java +++ b/src/main/java/lance5057/tDefense/armor/items/light/TinkersCoif.java @@ -7,6 +7,7 @@ import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.parts.ClothMaterial; import lance5057.tDefense.armor.renderers.cloth.ModelTinkersHood; import lance5057.tDefense.armor.renderers.light.ModelTinkersCoif; +import lance5057.tDefense.proxy.ClientProxy; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -129,16 +130,21 @@ public class TinkersCoif extends ArmorCore @Override @SideOnly(Side.CLIENT) - public ModelBiped getModel(String[] color, NBTTagCompound tags) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { - String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; + String[] color = new String[10]; - int HandleID = tags.getCompoundTag("InfiTool").getInteger("RenderHandle"); + for(int j = 0; j < 10; j++) + color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); + + int AccessoryID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHandle"); - CustomMaterial newColor = TConstructRegistry.getCustomMaterial(HandleID, ClothMaterial.class); + CustomMaterial newColor = TConstructRegistry.getCustomMaterial(AccessoryID, ClothMaterial.class); color[0] = Integer.toHexString(newColor.color); - return new ModelTinkersCoif(color, this.getDefaultFolder(), textures); + String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; + ClientProxy.coif.SetColors(color, this.getDefaultFolder(), textures); + return ClientProxy.coif; } @Override diff --git a/src/main/java/lance5057/tDefense/armor/items/light/TinkersHalberd.java b/src/main/java/lance5057/tDefense/armor/items/light/TinkersHalberd.java index b71d719..3c7ca44 100644 --- a/src/main/java/lance5057/tDefense/armor/items/light/TinkersHalberd.java +++ b/src/main/java/lance5057/tDefense/armor/items/light/TinkersHalberd.java @@ -137,9 +137,9 @@ public class TinkersHalberd extends ArmorCore for(int j = 0; j < 10; j++) color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); - String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3), this.getIconSuffix(4)}; - ClientProxy.breastplate.SetColors(color, this.getDefaultFolder(), textures); - return ClientProxy.breastplate; + String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; + ClientProxy.halberd.SetColors(color, this.getDefaultFolder(), textures); + return ClientProxy.halberd; } @Override diff --git a/src/main/java/lance5057/tDefense/armor/modifiers/ArmorMods.java b/src/main/java/lance5057/tDefense/armor/modifiers/ArmorMods.java index b59f789..9bc1766 100644 --- a/src/main/java/lance5057/tDefense/armor/modifiers/ArmorMods.java +++ b/src/main/java/lance5057/tDefense/armor/modifiers/ArmorMods.java @@ -1,12 +1,15 @@ package lance5057.tDefense.armor.modifiers; +import lance5057.tDefense.Reference; import lance5057.tDefense.TinkersDefense; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; @@ -14,49 +17,97 @@ import tconstruct.library.TConstructRegistry; import tconstruct.library.client.TConstructClientRegistry; import tconstruct.library.crafting.ModifyBuilder; import tconstruct.library.tools.ToolCore; +import tconstruct.tools.TinkerTools; +import cpw.mods.fml.common.registry.GameRegistry; public class ArmorMods { - public ArmorMods() - { - LoadItems(); - RegisterRecipes(); - RegisterModifiers(); - } + // public ArmorMods() + // { + // + // } + Item item_Canister; + Item item_Emptycanister; + Item item_Rebreather; + + Item item_Glowsole; + Item item_Firesole; + Item item_Icesole; + Item item_Feathersole; + Item item_Flippers; public void LoadItems() { - // protKit = new Item() - // .setUnlocalizedName("protectionkit") - // .setCreativeTab(TinkersDefense.tabName) - // .setTextureName("tinkersdefense:protectionkit"); - // - // GameRegistry.registerItem(protKit, "protectionkit"); + item_Canister = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(10).setUnlocalizedName("FilledCart").setTextureName(Reference.MOD_ID + ":FilledCart"); + item_Emptycanister = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(10).setUnlocalizedName("EmptyCart").setTextureName(Reference.MOD_ID + ":EmptyCart"); + item_Rebreather = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(1).setUnlocalizedName("Rebreather").setTextureName(Reference.MOD_ID + ":Rebreather"); + + item_Feathersole = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(1).setUnlocalizedName("FeatherSole").setTextureName(Reference.MOD_ID + ":FeatherSole"); + item_Firesole = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(1).setUnlocalizedName("FireSole").setTextureName(Reference.MOD_ID + ":FireSole"); + item_Icesole = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(1).setUnlocalizedName("IceSole").setTextureName(Reference.MOD_ID + ":IceSole"); + item_Glowsole = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(1).setUnlocalizedName("GlowSole").setTextureName(Reference.MOD_ID + ":GlowSole"); + item_Flippers = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(1).setUnlocalizedName("Flippers").setTextureName(Reference.MOD_ID + ":Flippers"); + + GameRegistry.registerItem(item_Canister, "FilledCart"); + GameRegistry.registerItem(item_Emptycanister, "EmptyCart"); + GameRegistry.registerItem(item_Rebreather, "Rebreather"); + + GameRegistry.registerItem(item_Feathersole, "FeatherSole"); + GameRegistry.registerItem(item_Firesole, "FireSole"); + GameRegistry.registerItem(item_Icesole, "IceSole"); + GameRegistry.registerItem(item_Glowsole, "GlowSole"); + GameRegistry.registerItem(item_Flippers, "Flippers"); } public void RegisterRecipes() { - // GameRegistry.addShapelessRecipe(new ItemStack(protKit,1), new - // ItemStack(TinkersDefense.partArmorplate,1,2), - // TinkerArmor.heartCanister, Items.iron_ingot); + GameRegistry.addShapedRecipe(new ItemStack(item_Canister), new Object[] {"-c-", "ses", "-s-", 'c', new ItemStack(Items.coal, 1, 1), 's', new ItemStack(Blocks.sapling, 1), 'e', new ItemStack(item_Emptycanister, 1, 0)}); + GameRegistry.addShapedRecipe(new ItemStack(item_Emptycanister), new Object[] {"gsg", "lil", "gig", 'g', new ItemStack(Items.gold_nugget, 1, 0), 's', new ItemStack(Items.slime_ball, 1, 0), 'l', new ItemStack(Items.dye, 1, 4), 'i', new ItemStack(Items.iron_ingot, 1, 0)}); + GameRegistry.addShapedRecipe(new ItemStack(item_Rebreather), new Object[] {"-s-", "eie", "-d-", 's', new ItemStack(Items.slime_ball, 1, 0), 'e', new ItemStack(item_Emptycanister, 1, 0), 'i', new ItemStack(TinkersDefense.partArmorplate,1,2), 'd', new ItemStack(Items.dye, 1, 0)}); + + GameRegistry.addShapedRecipe(new ItemStack(item_Glowsole), new Object[] {"ggg", "ala", "ggg", 'g', new ItemStack(Blocks.glowstone, 1, 0), 'a', new ItemStack(Items.glowstone_dust, 1, 0), 'l', TConstructRegistry.getItemStack("lavaCrystal")}); + GameRegistry.addShapedRecipe(new ItemStack(item_Glowsole), new Object[] {"gag", "glg", "gag", 'g', new ItemStack(Blocks.glowstone, 1, 0), 'a', new ItemStack(Items.glowstone_dust, 1, 0), 'l', TConstructRegistry.getItemStack("lavaCrystal")}); + GameRegistry.addShapedRecipe(new ItemStack(item_Feathersole), new Object[] {"fgf", 'g', new ItemStack(Items.gold_nugget, 1, 0), 'f', new ItemStack(Items.feather, 1, 0)}); + GameRegistry.addShapedRecipe(new ItemStack(item_Firesole), new Object[] {"lol", "oao", "lol", 'o', new ItemStack(Blocks.obsidian, 1, 0), 'a', TConstructRegistry.getItemStack("ingotArdite"), 'l', TConstructRegistry.getItemStack("lavaCrystal")}); + GameRegistry.addShapedRecipe(new ItemStack(item_Icesole), new Object[] {"ili", "lcl", "ili", 'l', new ItemStack(Blocks.lapis_block, 1, 0), 'i', new ItemStack(Blocks.ice, 1, 0), 'c', TConstructRegistry.getItemStack("ingotCobalt")}); + GameRegistry.addShapedRecipe(new ItemStack(item_Flippers), new Object[] {"-b-", "rlr", "-s-", 'b', new ItemStack(Items.leather_boots, 1, 0), 'l', new ItemStack(Items.leather, 1, 0), 'r', new ItemStack(TinkerTools.toolRod,1,2), 's', new ItemStack(Items.slime_ball, 1, 0)}); + } public void RegisterModifiers() { + //Head only + ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_Rebreather, 1, 0)}, TinkersDefense.config.ArmorRebreatherID, "Rebreather", "\u00A76", "Rebreather", new String[] {"head"})); + + //Excluding Cloth ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(TinkersDefense.partArmorplate, 1, 2)}, TinkersDefense.config.ArmorProtectionID, 1, "\u00A77", "Protection")); ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(Items.magma_cream, 1)}, TinkersDefense.config.ArmorFireProtectionID, 1, "\u00A7c", "Fire Protection")); ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(Blocks.wool, 1)}, TinkersDefense.config.ArmorBlastProtectionID, 1, "\u00A72", "Blast Protection")); ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(TinkersDefense.partRivet, 1, 2)}, TinkersDefense.config.ArmorProjectileProtectionID, 1, "\u00A7f", "Projectile Protection")); - ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(Blocks.hay_block)}, TinkersDefense.config.FeatherfallID, 1, "\u00A7f", "Featherfall")); + ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(item_Feathersole, 1, 0)}, TinkersDefense.config.ArmorFeatherfallID, 1, "\u00A7f", "Featherfall")); + + //Feet only + ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_Glowsole, 1, 0)}, TinkersDefense.config.ArmorGlowstepID, "GlowStep", "\u00A76", "GlowStep", new String[] {"feet"})); + ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_Firesole, 1, 0)}, TinkersDefense.config.ArmorFirewalkerID, "Firewalker", "\u00A74", "Firewalker", new String[] {"feet"})); + ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_Icesole, 1, 0)}, TinkersDefense.config.ArmorFrostwalkerID, "Frostwalker", "\u00A7b", "Frostwalker", new String[] {"feet"})); + ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_Flippers, 1, 0)}, TinkersDefense.config.ArmorDepthstriderID, "Depthstrider", "\u00A71", "Depthstrider", new String[] {"feet"})); for(ToolCore tool : TConstructRegistry.getToolMapping()) { + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorRebreatherID, "tinker", "rebreather", true); + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorProtectionID, "tinker", "protection", true); TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorFireProtectionID, "tinker", "fireprotection", true); TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorBlastProtectionID, "tinker", "blastprotection", true); TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorProjectileProtectionID, "tinker", "projprotection", true); - TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.FeatherfallID, "tinker", "featherfall", true); + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorFeatherfallID, "tinker", "featherfall", true); + + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorGlowstepID, "tinker", "glowstep", true); + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorFirewalkerID, "tinker", "firewalk", true); + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorFrostwalkerID, "tinker", "frostwalk", true); + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorDepthstriderID, "tinker", "depthstrider", true); + } } @@ -64,9 +115,19 @@ public class ArmorMods { if(!world.isRemote) { - UpdateWalker(tool, stack, world, entity, Material.water, TinkersDefense.block_Unstable, 0); - UpdateWalker(tool, stack, world, entity, Material.lava, TinkersDefense.block_Unstable, 1); - UpdateGlowstep(tool, stack, world, entity); + if(tags.hasKey("Frostwalker")) + UpdateWalker(tool, stack, world, entity, Material.water, TinkersDefense.block_Unstable, 0); + if(tags.hasKey("Firewalker")) + UpdateWalker(tool, stack, world, entity, Material.lava, TinkersDefense.block_Unstable, 1); + if(tags.hasKey("GlowStep")) + UpdateGlowstep(tool, stack, world, entity); + if(tags.hasKey("Rebreather")) + UpdateRebreather(tool, stack, world, entity); + } + else + { + if(tags.hasKey("Depthstrider")) + UpdateFlippers(tool, stack, world, entity); } } @@ -120,4 +181,34 @@ public class ArmorMods prevX = x; prevZ = z; } + + public void UpdateFlippers(ToolCore tool, ItemStack stack, World world, Entity entity) + { + if(entity.isInWater()) + { + entity.motionX *= 1.2; + entity.motionY *= 1.2; + entity.motionZ *= 1.2; + } + } + + public void UpdateRebreather(ToolCore tool, ItemStack stack, World world, Entity entity) + { + EntityPlayer player = (EntityPlayer) entity; + if(player.getAir() <= 0) + { + if(player.inventory.hasItem(item_Canister)) + { + player.inventory.consumeInventoryItem(item_Canister); + player.inventory.addItemStackToInventory(new ItemStack(item_Emptycanister, 1, 0)); + player.setAir(150); + } + if(player.inventory.hasItem(item_Canister)) + { + player.inventory.consumeInventoryItem(item_Canister); + player.inventory.addItemStackToInventory(new ItemStack(item_Emptycanister, 1, 0)); + player.setAir(300); + } + } + } } diff --git a/src/main/java/lance5057/tDefense/armor/modifiers/modifierBoolExclusive.java b/src/main/java/lance5057/tDefense/armor/modifiers/modifierBoolExclusive.java new file mode 100644 index 0000000..f573ada --- /dev/null +++ b/src/main/java/lance5057/tDefense/armor/modifiers/modifierBoolExclusive.java @@ -0,0 +1,36 @@ +package lance5057.tDefense.armor.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.ModBoolean; + +public class modifierBoolExclusive extends ModBoolean +{ + String[] exclusive; + public modifierBoolExclusive(ItemStack[] items, int effect, String tag, String c, String tip, String[] exclusive) + { + super(items, effect, tag, c, tip); + this.exclusive = exclusive; + } + + @Override + protected boolean canModify(ItemStack tool, ItemStack[] input) + { + List list = Arrays.asList(((ToolCore) tool.getItem()).getTraits()); + NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); + + for(int i = 0; i < exclusive.length; i++) + { + if(list.contains(exclusive[i])) + { + return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); + } + } + + return false; + } +} diff --git a/src/main/java/lance5057/tDefense/armor/modifiers/modifierProtection.java b/src/main/java/lance5057/tDefense/armor/modifiers/modifierProtection.java index f691adf..986c03e 100644 --- a/src/main/java/lance5057/tDefense/armor/modifiers/modifierProtection.java +++ b/src/main/java/lance5057/tDefense/armor/modifiers/modifierProtection.java @@ -25,6 +25,7 @@ public class modifierProtection extends ModInteger super(items, effect, t, increase, c, t); color = c; type = t; + initialIncrease = secondaryIncrease = increase; } @Override @@ -90,35 +91,4 @@ public class modifierProtection extends ModInteger addToolTip(tool, color + tooltipName, color + key); } - - protected int addToolTip(ItemStack tool, String tooltip, String modifierTip) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - int tipNum = 0; - while(true) - { - tipNum++; - String tip = "Tooltip" + tipNum; - if(!tags.hasKey(tip)) - { - tags.setString(tip, ""); - String modTip = "ModifierTip" + tipNum; - String tag = tags.getString(modTip); - tags.setString(modTip, getProperName(modifierTip, tag)); - return tipNum; - } - else - { - String modTip = "ModifierTip" + tipNum; - String tag = tags.getString(modTip); - if(tag.contains(modifierTip)) - { - tags.setString(tip, ""); - tag = tags.getString(modTip); - tags.setString(modTip, getProperName(modifierTip, tag)); - return tipNum; - } - } - } - } } diff --git a/src/main/java/lance5057/tDefense/armor/renderers/ModelSheath.java b/src/main/java/lance5057/tDefense/armor/renderers/ModelSheath.java index 609908d..2fdc674 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/ModelSheath.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/ModelSheath.java @@ -14,7 +14,7 @@ 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 class ModelSheath extends ArmorRenderer { public ModelRenderer sheath; public ModelRenderer belt; @@ -22,78 +22,48 @@ public class ModelSheath extends ModelBiped String Color[]; int rgbColors[]; - public ModelSheath(String color[] /*4*/) + public ModelSheath() { - this.textureWidth = 32; - this.textureHeight = 32; - this.belt = new ModelRenderer(this, 16, 0); + super(0.5f, 0, 64, 64); + + this.textureWidth = 64; + this.textureHeight = 64; + + this.belt = new ModelRenderer(this, 16, 32); 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); + this.bipedBody.addChild(belt); - Color = color; + this.sheath = new ModelRenderer(this, 0, 32); + this.sheath.setRotationPoint(0f, 0f, 0f); + this.sheath.addBox(-5.0F, 0.0F, 2.0F, 5, 16, 2, -0.4F); + this.setRotateAngle(sheath, 0.0F, 0.0F, -0.45F); + this.bipedBody.addChild(sheath); } @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(); + for(int i = 0; i < 4; i++) + { + GL11.glPushMatrix(); - //Buckle - GL11.glPushMatrix(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/armor/Sheath/_sheath_clasp.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/" + defaultFolder + "/" + textures[i] + ".png")); - rgbColors = TinkersDefense.hexToRGB(Color[3]); - GL11.glColor3d((float) rgbColors[0] / 255, (float) rgbColors[1] / 255, (float) rgbColors[2] / 255); + float size = 1.6f; + GL11.glScalef(1.0F / size, 1.0F / size, 1.0F / size); + GL11.glTranslatef(0.0F, -0.0F, 0.0F); - this.belt.render(f5); - GL11.glPopMatrix(); + int[] intColors = TinkersDefense.hexToRGB(colors[i]); + GL11.glColor3d((float) intColors[0] / 255, (float) intColors[1] / 255, (float) intColors[2] / 255); - //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(); + //setLivingAnimations((EntityLivingBase) entity, f,f1, f5); + super.render(entity, f, f1, f2, f3, f4, f5); + GL11.glPopMatrix(); + } GL11.glPopMatrix(); } diff --git a/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersHood.java b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersHood.java index 077b6ca..59b058c 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersHood.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersHood.java @@ -19,9 +19,9 @@ public class ModelTinkersHood extends ArmorRenderer public ModelRenderer Hood; public ModelRenderer Flop; - public ModelTinkersHood(String[] colors, String defaultFolder, String[] textures) + public ModelTinkersHood() { - super(1.1f, 0, 64, 64); + super(1.0f, 0, 64, 64); this.textureWidth = 64; this.textureHeight = 64; @@ -58,7 +58,7 @@ public class ModelTinkersHood extends ArmorRenderer GL11.glColor3d((float) intColors[0] / 255, (float) intColors[1] / 255, (float) intColors[2] / 255); super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); + //setRotationAngles(f, f1, f2, f3, f4, f5, entity); GL11.glPopMatrix(); } GL11.glPopMatrix(); diff --git a/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersRobe.java b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersRobe.java index 024738d..a981f8f 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersRobe.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersRobe.java @@ -24,7 +24,7 @@ public class ModelTinkersRobe extends ArmorRenderer public ModelRenderer Belt; public ModelRenderer LeftBack; - public ModelTinkersRobe(String[] colors, String defaultFolder, String[] textures) + public ModelTinkersRobe() { super(1f, 0, 64, 64); @@ -53,7 +53,7 @@ public class ModelTinkersRobe extends ArmorRenderer this.Belt = new ModelRenderer(this, 0, 32); this.Belt.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Belt.addBox(-6.8F, 10.0F, -3.0F, 10, 3, 6, 0.0F); + this.Belt.addBox(-6.5F, 9.0F, -3.0F, 10, 3, 6, -0.1F); this.setRotateAngle(Belt, 0.0F, 0.0F, -0.13962634015954636F); this.bipedBody.addChild(this.Belt); @@ -95,9 +95,9 @@ public class ModelTinkersRobe extends ArmorRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/" + defaultFolder + "/" + textures[i] + ".png")); - float size = 1.45f; + float size = 1.6f; GL11.glScalef(1.0F / size, 1.0F / size, 1.0F / size); - GL11.glTranslatef(0F, -1.5F * f5, -0F); + GL11.glTranslatef(0F, -0F * f5, -0F); int[] intColors = TinkersDefense.hexToRGB(colors[i]); GL11.glColor3d((float) intColors[0] / 255, (float) intColors[1] / 255, (float) intColors[2] / 255); diff --git a/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersShawl.java b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersShawl.java index 37519b2..f9c6ad1 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersShawl.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersShawl.java @@ -27,7 +27,7 @@ public class ModelTinkersShawl extends ArmorRenderer public ModelRenderer ArmRight; public ModelRenderer Chest; - public ModelTinkersShawl(String[] colors, String defaultFolder, String[] textures) + public ModelTinkersShawl() { super(1f, 0, 64, 64); @@ -37,17 +37,17 @@ public class ModelTinkersShawl extends ArmorRenderer this.ArmLeft = new ModelRenderer(this, 48, 48); this.ArmLeft.mirror = true; this.ArmLeft.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ArmLeft.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F); + this.ArmLeft.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.02F); this.bipedLeftArm.addChild(this.ArmLeft); this.ArmRight = new ModelRenderer(this, 48, 48); this.ArmRight.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ArmRight.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F); + this.ArmRight.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.02F); this.bipedRightArm.addChild(this.ArmRight); this.Chest = new ModelRenderer(this, 40, 32); this.Chest.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Chest.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.0F); + this.Chest.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.02F); this.bipedBody.addChild(this.Chest); this.TopRight = new ModelRenderer(this, 0, 52); @@ -108,7 +108,7 @@ public class ModelTinkersShawl extends ArmorRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/" + defaultFolder + "/" + textures[i] + ".png")); - float size = 1.5f; + float size = 1.6f; GL11.glScalef(1.0F / size, 1.0F / size, 1.0F / size); GL11.glTranslatef(0F, -0F * f5, -0F); diff --git a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersBreastplate.java b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersBreastplate.java index fa4ee35..f1d777c 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersBreastplate.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersBreastplate.java @@ -47,7 +47,7 @@ public class ModelTinkersBreastplate extends ArmorRenderer this.Plackart = new ModelRenderer(this, 0, 42); this.Plackart.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Plackart.addBox(-4.0F, 5.0F, -3.0F, 8, 7, 6, 0.0F); + this.Plackart.addBox(-4.0F, 5.0F, -3.0F, 8, 7, 6, 0.01F); this.bipedBody.addChild(this.Plackart); this.ArmGuardR = new ModelRenderer(this, 28, 44); diff --git a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersGauntlets.java b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersGauntlets.java new file mode 100644 index 0000000..e007127 --- /dev/null +++ b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersGauntlets.java @@ -0,0 +1,105 @@ +package lance5057.tDefense.armor.renderers.heavy; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.client.FMLClientHandler; +import lance5057.tDefense.TinkersDefense; +import lance5057.tDefense.armor.renderers.ArmorRenderer; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + +/** + * TinkersGauntlets - Either Mojang or a mod author + * Created using Tabula 4.1.1 + */ +public class ModelTinkersGauntlets extends ArmorRenderer +{ + public ModelRenderer BracerL; + public ModelRenderer RivetL; + public ModelRenderer MittL; + public ModelRenderer BracerR; + public ModelRenderer RivetR; + public ModelRenderer MittR; + + public ModelTinkersGauntlets() + { + super(0.15f, 0, 64, 64); + + this.textureWidth = 64; + this.textureHeight = 64; + + this.BracerR = new ModelRenderer(this, 0, 56); + this.BracerR.mirror = true; + this.BracerR.setRotationPoint(0.0F, 0.0F, 0.0F); + this.BracerR.addBox(-3.3F, 4.0F, -2.0F, 3, 4, 4, 0.2F); + this.setRotateAngle(BracerR, 0.0F, 0.0F, -0.03490658503988659F); + this.bipedRightArm.addChild(BracerR); + + this.RivetL = new ModelRenderer(this, 0, 47); + this.RivetL.setRotationPoint(0.0F, 0.0F, 0.0F); + this.RivetL.addBox(0.0F, 7.0F, -3.0F, 2, 2, 6, -0.5F); + this.bipedLeftArm.addChild(RivetL); + + this.BracerL = new ModelRenderer(this, 0, 56); + this.BracerL.setRotationPoint(0.0F, 0.0F, 0.0F); + this.BracerL.addBox(0.3F, 4.0F, -2.0F, 3, 4, 4, 0.2F); + this.setRotateAngle(BracerL, 0.0F, 0.0F, 0.03490658503988659F); + this.bipedLeftArm.addChild(BracerL); + + this.MittL = new ModelRenderer(this, 0, 41); + this.MittL.setRotationPoint(0.0F, 0.0F, 0.0F); + this.MittL.addBox(1.4F, 7.9F, -2.0F, 2, 2, 4, 0.3F); + this.setRotateAngle(MittL, 0.0F, 0.0F, 0.03490658503988659F); + this.bipedLeftArm.addChild(MittL); + + this.RivetR = new ModelRenderer(this, 0, 47); + this.RivetR.mirror = true; + this.RivetR.setRotationPoint(0.0F, 0.0F, 0.0F); + this.RivetR.addBox(-2.0F, 7.0F, -3.0F, 2, 2, 6, -0.5F); + this.bipedRightArm.addChild(RivetR); + + this.MittR = new ModelRenderer(this, 0, 41); + this.MittR.mirror = true; + this.MittR.setRotationPoint(0.0F, 0.0F, 0.0F); + this.MittR.addBox(-3.4F, 7.9F, -2.0F, 2, 2, 4, 0.3F); + this.setRotateAngle(MittR, 0.0F, 0.0F, -0.03490658503988659F); + this.bipedRightArm.addChild(MittR); + } + + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + { + GL11.glPushMatrix(); + for(int i = 0; i < 3; i++) + { + GL11.glPushMatrix(); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/" + defaultFolder + "/" + textures[i] + ".png")); + + float size = 1.6f; + GL11.glScalef(1.0F / size, 1.0F / size, 1.0F / size); + GL11.glTranslatef(0.0F, -0.0F, 0.0F); + + int[] intColors = TinkersDefense.hexToRGB(colors[i]); + GL11.glColor3d((float) intColors[0] / 255, (float) intColors[1] / 255, (float) intColors[2] / 255); + + //setLivingAnimations((EntityLivingBase) entity, f,f1, f5); + super.render(entity, f, f1, f2, f3, f4, 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/lance5057/tDefense/armor/renderers/light/ModelTinkersBoots.java b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersBoots.java index d10ea48..a55c825 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersBoots.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersBoots.java @@ -21,7 +21,7 @@ public class ModelTinkersBoots extends ArmorRenderer public ModelRenderer FootL; public ModelRenderer FootR; - public ModelTinkersBoots(String[] colors, String defaultFolder, String[] textures) + public ModelTinkersBoots() { super(1.1f, 0, 64, 64); @@ -30,22 +30,22 @@ public class ModelTinkersBoots extends ArmorRenderer this.FootL = new ModelRenderer(this, 0, 43); this.FootL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.FootL.addBox(-2.0F, 10.0F, -3.0F, 4, 2, 1, 0.0F); + this.FootL.addBox(-2.0F, 10.0F, -3.0F, 4, 2, 1, 0.01F); this.bipedLeftLeg.addChild(this.FootL); 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.0F); + this.LegL.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.01F); this.bipedLeftLeg.addChild(this.LegL); this.FootR = new ModelRenderer(this, 0, 43); this.FootR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.FootR.addBox(-2.0F, 10.0F, -3.0F, 4, 2, 1, 0.0F); + this.FootR.addBox(-2.0F, 10.0F, -3.0F, 4, 2, 1, 0.01F); this.bipedRightLeg.addChild(this.FootR); 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.0F); + this.LegR.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.01F); this.bipedRightLeg.addChild(this.LegR); } @@ -59,9 +59,9 @@ public class ModelTinkersBoots extends ArmorRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/" + defaultFolder + "/" + textures[i] + ".png")); - float size = 1.45f; + float size = 1.6f; GL11.glScalef(1.0F / size, 1.0F / size, 1.0F / size); - GL11.glTranslatef(0.0F, -1F * f5, 0.0F); + GL11.glTranslatef(0.0F, -0F * f5, 0.0F); int[] intColors = TinkersDefense.hexToRGB(colors[i]); GL11.glColor3d((float) intColors[0] / 255, (float) intColors[1] / 255, (float) intColors[2] / 255); diff --git a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersChausses.java b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersChausses.java index 6936d01..00f0d64 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersChausses.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersChausses.java @@ -24,54 +24,60 @@ public class ModelTinkersChausses extends ArmorRenderer public ModelRenderer BackL; public ModelRenderer FrontR; public ModelRenderer BackR; + public ModelRenderer Belt; - public ModelTinkersChausses(String[] colors, String defaultFolder, String[] textures) + public ModelTinkersChausses() { super(1.1f, 0, 64, 64); this.textureWidth = 64; this.textureHeight = 64; + this.Belt = new ModelRenderer(this, 16, 54); + this.Belt.setRotationPoint(0.0F, 0.0F, 0.0F); + this.Belt.addBox(-4.5F, 10.0F, -3F, 9, 2, 6, 0.1F); + this.bipedBody.addChild(this.Belt); + this.HipGuardR = new ModelRenderer(this, 10, 37); this.HipGuardR.setRotationPoint(0F, 0F, 0F); - this.HipGuardR.addBox(-2.5F, 0.0F, -2.5F, 4, 6, 5, 0.0F); + this.HipGuardR.addBox(-2.5F, 0.0F, -2.5F, 4, 6, 5, 0.01F); this.setRotateAngle(HipGuardR, 0.0F, 0.0F, 0.17453292519943295F); this.bipedRightLeg.addChild(this.HipGuardR); this.LegL = new ModelRenderer(this, 0, 48); this.LegL.setRotationPoint(0F, 0F, 0F); - this.LegL.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F); + this.LegL.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.01F); this.bipedLeftLeg.addChild(this.LegL); this.BackR = new ModelRenderer(this, 0, 40); this.BackR.setRotationPoint(0F, 0F, 0F); - this.BackR.addBox(-0.1F, 0.0F, 1.7F, 4, 7, 1, 0.01F); + this.BackR.addBox(-0.1F, 0.0F, 1.7F, 4, 7, 1, 0.02F); this.bipedRightLeg.addChild(this.BackR); this.FrontL = new ModelRenderer(this, 0, 40); this.FrontL.setRotationPoint(0F, 0F, 0F); - this.FrontL.addBox(-4.0F, 0.0F, -2.7F, 4, 7, 1, 0.0F); + this.FrontL.addBox(-4.0F, 0.0F, -2.7F, 4, 7, 1, 0.01F); this.bipedLeftLeg.addChild(this.FrontL); this.LegR = new ModelRenderer(this, 0, 48); this.LegR.setRotationPoint(0F, 0F, 0F); - this.LegR.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F); + this.LegR.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.01F); this.bipedRightLeg.addChild(this.LegR); this.BackL = new ModelRenderer(this, 0, 40); this.BackL.setRotationPoint(0F, 0F, 0F); - this.BackL.addBox(-4.0F, 0.0F, 1.7F, 4, 7, 1, 0.0F); + this.BackL.addBox(-4.0F, 0.0F, 1.7F, 4, 7, 1, 0.01F); this.bipedLeftLeg.addChild(this.BackL); this.FrontR = new ModelRenderer(this, 0, 40); this.FrontR.setRotationPoint(0F, 0F, 0F); - this.FrontR.addBox(-0.1F, 0.0F, -2.7F, 4, 7, 1, 0.01F); + this.FrontR.addBox(-0.1F, 0.0F, -2.7F, 4, 7, 1, 0.02F); this.bipedRightLeg.addChild(this.FrontR); this.HipGuardL = new ModelRenderer(this, 10, 37); this.HipGuardL.mirror = true; this.HipGuardL.setRotationPoint(0F, 0F, 0F); - this.HipGuardL.addBox(-1.5F, 0.0F, -2.5F, 4, 6, 5, 0.0F); + this.HipGuardL.addBox(-1.5F, 0.0F, -2.5F, 4, 6, 5, 0.01F); this.setRotateAngle(HipGuardL, 0.0F, 0.0F, -0.17453292519943295F); this.bipedLeftLeg.addChild(this.HipGuardL); } @@ -86,15 +92,14 @@ public class ModelTinkersChausses extends ArmorRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/" + defaultFolder + "/" + textures[i] + ".png")); - float size = 1.5f; + float size = 1.6f; GL11.glScalef(1.0F / size, 1.0F / size, 1.0F / size); - GL11.glTranslatef(0F, -1F * f5, -0F); + GL11.glTranslatef(0F, 0F * f5, -0F); int[] intColors = TinkersDefense.hexToRGB(colors[i]); GL11.glColor3d((float) intColors[0] / 255, (float) intColors[1] / 255, (float) intColors[2] / 255); super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); GL11.glPopMatrix(); } GL11.glPopMatrix(); diff --git a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersCoif.java b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersCoif.java index d631c08..d59bcc2 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersCoif.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersCoif.java @@ -19,7 +19,7 @@ public class ModelTinkersCoif extends ArmorRenderer public ModelRenderer Coif; public ModelRenderer Head; - public ModelTinkersCoif(String[] colors, String defaultFolder, String[] textures) + public ModelTinkersCoif() { super(1.1f, 0, 64, 64); @@ -28,12 +28,12 @@ public class ModelTinkersCoif extends ArmorRenderer this.Head = new ModelRenderer(this, 32, 48); this.Head.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Head.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F); + this.Head.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.01F); this.bipedHead.addChild(this.Head); this.Coif = new ModelRenderer(this, 0, 46); this.Coif.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Coif.addBox(-4.0F, -8.0F, -4.0F, 8, 10, 8, 0.5F); + this.Coif.addBox(-4.0F, -8.0F, -4.0F, 8, 10, 8, 0.51F); this.bipedHead.addChild(this.Coif); } @@ -47,8 +47,8 @@ public class ModelTinkersCoif extends ArmorRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/" + defaultFolder + "/" + textures[i] + ".png")); - float size = 2.25f; - GL11.glScalef(1.5F / size, 1.5F / size, 1.5F / size); + float size = 1.6f; + GL11.glScalef(1.0F / size, 1.0F / size, 1.0F / size); GL11.glTranslatef(0.0F, 0F * f5, 0.0F); int[] intColors = TinkersDefense.hexToRGB(colors[i]); diff --git a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersHalberd.java b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersHalberd.java index 7de3ccd..0eff717 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersHalberd.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersHalberd.java @@ -35,57 +35,57 @@ public class ModelTinkersHalberd extends ArmorRenderer this.Pauldron2_1 = new ModelRenderer(this, 0, 32); this.Pauldron2_1.mirror = true; - this.Pauldron2_1.setRotationPoint(0.0F, 0.0F, 0.0F); + this.Pauldron2_1.setRotationPoint(0.0F, 0.0F, 0.01F); this.Pauldron2_1.addBox(-0.7F, -2.7F, -2.0F, 3, 3, 4, 0.1F); this.setRotateAngle(Pauldron2_1, 0.0F, 0.0F, 0.2617993877991494F); this.bipedLeftArm.addChild(this.Pauldron2_1); 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.0F); + this.Body.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.01F); this.bipedBody.addChild(this.Body); this.Pauldron1_1 = new ModelRenderer(this, 30, 32); this.Pauldron1_1.mirror = true; this.Pauldron1_1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron1_1.addBox(0.5F, -1.9F, -2.5F, 3, 4, 5, 0.0F); + this.Pauldron1_1.addBox(0.5F, -1.9F, -2.5F, 3, 4, 5, 0.01F); this.setRotateAngle(Pauldron1_1, 0.0F, 0.0F, -0.2617993877991494F); this.bipedLeftArm.addChild(this.Pauldron1_1); this.Pauldron3 = new ModelRenderer(this, 16, 32); this.Pauldron3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron3.addBox(-1.2F, -1.5F, -2.5F, 2, 2, 5, 0.1F); + this.Pauldron3.addBox(-1.2F, -1.5F, -2.5F, 2, 2, 5, 0.11F); this.setRotateAngle(Pauldron3, 0.0F, 0.0F, -0.2617993877991494F); this.bipedRightArm.addChild(this.Pauldron3); this.ArmL = new ModelRenderer(this, 0, 48); this.ArmL.mirror = true; this.ArmL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ArmL.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F); + this.ArmL.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.02F); this.bipedLeftArm.addChild(this.ArmL); this.Pauldron1 = new ModelRenderer(this, 30, 32); this.Pauldron1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron1.addBox(-3.5F, -1.9F, -2.5F, 3, 4, 5, 0.0F); + this.Pauldron1.addBox(-3.5F, -1.9F, -2.5F, 3, 4, 5, 0.01F); this.setRotateAngle(Pauldron1, 0.0F, 0.0F, 0.2617993877991494F); this.bipedRightArm.addChild(this.Pauldron1); this.Pauldron3_1 = new ModelRenderer(this, 16, 32); this.Pauldron3_1.mirror = true; this.Pauldron3_1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron3_1.addBox(-0.8F, -1.5F, -2.5F, 2, 2, 5, 0.1F); + this.Pauldron3_1.addBox(-0.8F, -1.5F, -2.5F, 2, 2, 5, 0.11F); this.setRotateAngle(Pauldron3_1, 0.0F, 0.0F, 0.2617993877991494F); this.bipedLeftArm.addChild(this.Pauldron3_1); this.Pauldron2 = new ModelRenderer(this, 0, 32); this.Pauldron2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Pauldron2.addBox(-2.3F, -2.7F, -2.0F, 3, 3, 4, 0.1F); + this.Pauldron2.addBox(-2.3F, -2.7F, -2.0F, 3, 3, 4, 0.11F); this.setRotateAngle(Pauldron2, 0.0F, 0.0F, -0.2617993877991494F); this.bipedRightArm.addChild(this.Pauldron2); this.ArmR = new ModelRenderer(this, 0, 48); this.ArmR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ArmR.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F); + this.ArmR.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.02F); this.bipedRightArm.addChild(this.ArmR); } @@ -99,15 +99,14 @@ public class ModelTinkersHalberd extends ArmorRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("tinkersdefense:textures/" + defaultFolder + "/" + textures[i] + ".png")); - float size = 2.25f; - GL11.glScalef(1.5F / size, 1.5F / size, 1.5F / size); + float size = 1.6f; + GL11.glScalef(1.0F / size, 1.0F / size, 1.0F / size); GL11.glTranslatef(0.0F, 0F * f5, 0.0F); int[] intColors = TinkersDefense.hexToRGB(colors[i]); GL11.glColor3d((float) intColors[0] / 255, (float) intColors[1] / 255, (float) intColors[2] / 255); super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); GL11.glPopMatrix(); } GL11.glPopMatrix(); diff --git a/src/main/java/lance5057/tDefense/core/tools/modifiers/Modifiers.java b/src/main/java/lance5057/tDefense/core/tools/modifiers/Modifiers.java index 5b2705b..10ac1d0 100644 --- a/src/main/java/lance5057/tDefense/core/tools/modifiers/Modifiers.java +++ b/src/main/java/lance5057/tDefense/core/tools/modifiers/Modifiers.java @@ -25,19 +25,25 @@ public class Modifiers { public static Item item_relic; public static Item itemSoulChain; - public static ArmorMods AMod; + public static ArmorMods AMod = new ArmorMods(); - public void init() + public void preInit() { - AMod = new ArmorMods(); - + AMod.LoadItems(); + item_relic = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(1).setUnlocalizedName("AncientRelic").setTextureName(Reference.MOD_ID + ":AncientRelic"); itemSoulChain = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(1).setUnlocalizedName("SoulChain").setTextureName(Reference.MOD_ID + ":SoulChain"); GameRegistry.registerItem(item_relic, "Ancient Relic"); GameRegistry.registerItem(itemSoulChain, "Soul Chain"); - + } + + public void Init() + { + AMod.RegisterRecipes(); + AMod.RegisterModifiers(); + ModifyBuilder.registerModifier(new modifierDaze("Daze", TinkersDefense.config.DazeID, new ItemStack[] {new ItemStack(Blocks.light_weighted_pressure_plate), new ItemStack(Items.potionitem, 1, 8202)}, new int[] {1, 0})); //ModifyBuilder.registerModifier(new modifierTorchArrow(new ItemStack[] {new ItemStack(Blocks.glowstone)}, 12)); diff --git a/src/main/java/lance5057/tDefense/finishingAnvil/blocks/finishingAnvil/Gui_FinishingAnvil.java b/src/main/java/lance5057/tDefense/finishingAnvil/blocks/finishingAnvil/Gui_FinishingAnvil.java index a4167bb..f97fdcc 100644 --- a/src/main/java/lance5057/tDefense/finishingAnvil/blocks/finishingAnvil/Gui_FinishingAnvil.java +++ b/src/main/java/lance5057/tDefense/finishingAnvil/blocks/finishingAnvil/Gui_FinishingAnvil.java @@ -1,7 +1,12 @@ package lance5057.tDefense.finishingAnvil.blocks.finishingAnvil; +import java.util.ArrayList; +import java.util.List; + import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.core.network.Message_FinishingAnvil; +import lance5057.tDefense.finishingAnvil.utilities.Injector; +import lance5057.tDefense.finishingAnvil.utilities.ToolCoreTip; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.entity.RenderItem; @@ -12,6 +17,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import cpw.mods.fml.client.config.GuiButtonExt; import tconstruct.library.TConstructRegistry; import tconstruct.library.tools.ToolCore; @@ -36,7 +42,7 @@ public class Gui_FinishingAnvil extends GuiContainer private int leftSelect = 0; private int rightButtonPosX = 0; - private int rightButtonPosY = 2; + private int rightButtonPosY = 0; private int xRIcon_one, yRIcon_one; private int xRIcon_two, yRIcon_two; private int xRIcon_three, yRIcon_three; @@ -63,20 +69,20 @@ public class Gui_FinishingAnvil extends GuiContainer 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 GuiButtonExt(1, this.guiLeft + 25, this.guiTop + 10, 10, 10, "⇑")); + this.buttonList.add(new GuiButtonExt(2, this.guiLeft + 25, this.guiTop + 59, 10, 10, "⇓")); + this.buttonList.add(new GuiButtonExt(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 GuiButtonExt(4, this.guiLeft + 5, this.guiTop + 10, 20, 20, "")); + this.buttonList.add(new GuiButtonExt(5, this.guiLeft + 5, this.guiTop + 30, 20, 20, "")); + this.buttonList.add(new GuiButtonExt(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 GuiButtonExt(7, this.guiLeft + 120, this.guiTop + 10, 10, 10, "⇑")); + this.buttonList.add(new GuiButtonExt(8, this.guiLeft + 120, this.guiTop + 60, 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, "")); + this.buttonList.add(new GuiButtonExt(9, this.guiLeft + 130, this.guiTop + 10, 20, 20, "")); + this.buttonList.add(new GuiButtonExt(10, this.guiLeft + 130, this.guiTop + 30, 20, 20, "")); + this.buttonList.add(new GuiButtonExt(11, this.guiLeft + 130, this.guiTop + 50, 20, 20, "")); } @@ -91,7 +97,7 @@ public class Gui_FinishingAnvil extends GuiContainer this.leftButtonPosX--; break; case 2: - if(this.leftButtonPosX + 2 < ((ToolCore) bigCopy.getItem()).getPartAmount()) + if(this.leftButtonPosX + 3 < ((ToolCore) bigCopy.getItem()).getPartAmount()) this.leftButtonPosX++; break; @@ -100,31 +106,43 @@ public class Gui_FinishingAnvil extends GuiContainer break; case 4: - leftSelect = 0; - rightButtonPosY = 2; + leftSelect = 0 + leftButtonPosX; + rightButtonPosY = 0 + (leftButtonPosX * 3); break; case 5: - leftSelect = 1; - rightButtonPosY = 3; + leftSelect = 1 + leftButtonPosX; + rightButtonPosY = 3 + (leftButtonPosX * 3); break; case 6: - leftSelect = 2; - rightButtonPosY = 4; + leftSelect = 2 + leftButtonPosX; + rightButtonPosY = 6 + (leftButtonPosX * 3); break; case 7: if(this.rightButtonPosX > 0) + { this.rightButtonPosX--; + } + else if(this.rightButtonPosY > (0 + this.leftSelect * 4)) + { + this.rightButtonPosY--; + this.rightButtonPosX = 15; + } break; case 8: this.rightButtonPosX++; + if(this.rightButtonPosX >= 16) + { + this.rightButtonPosY++; + this.rightButtonPosX = 0; + } 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("Render" + renders[leftSelect], bigCopy.getTagCompound().getCompoundTag("InfiTool").getInteger(renders[leftSelect]) + ((rightButtonPosX + ((rightButtonPosY % 3) * 16)) * TinkersDefense.config.MaterialIndex)); + if(rightButtonPosX + (rightButtonPosY * 16) > 0) tags.setInteger(renders[leftSelect] + "Color", TConstructRegistry.getMaterial(tags.getInteger(renders[leftSelect])).primaryColor()); else tags.removeTag(renders[leftSelect] + "Color"); @@ -134,7 +152,7 @@ public class Gui_FinishingAnvil extends GuiContainer 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("Render" + renders[leftSelect], bigCopy.getTagCompound().getCompoundTag("InfiTool").getInteger(renders[leftSelect]) + ((rightButtonPosX + 1 + ((rightButtonPosY % 3) * 16)) * TinkersDefense.config.MaterialIndex)); tags.setInteger(renders[leftSelect] + "Color", TConstructRegistry.getMaterial(tags.getInteger(renders[leftSelect])).primaryColor()); } break; @@ -142,14 +160,14 @@ public class Gui_FinishingAnvil extends GuiContainer 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("Render" + renders[leftSelect], bigCopy.getTagCompound().getCompoundTag("InfiTool").getInteger(renders[leftSelect]) + ((rightButtonPosX + 2 + ((rightButtonPosY % 3) * 16)) * 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) + public void drawScreen(int x, int y, float par3) { if(inventory.getStackInSlot(0) != null && isNull == true @@ -166,9 +184,10 @@ public class Gui_FinishingAnvil extends GuiContainer isNull = true; } - super.drawScreen(par1, par2, par3); - this.xSize_lo = (float) par1; - this.ySize_lo = (float) par2; + super.drawScreen(x, y, par3); + drawTooltip(x, y); + this.xSize_lo = (float) x; + this.ySize_lo = (float) y; } protected void drawGuiContainerForegroundLayer(int par1, int par2) @@ -207,11 +226,11 @@ public class Gui_FinishingAnvil extends GuiContainer this.yLIcon_three = 0; this.xRIcon_one = 0; - this.yRIcon_one = 0; + this.yRIcon_one = 32; this.xRIcon_two = 16; - this.yRIcon_two = 0; + this.yRIcon_two = 32; this.xRIcon_three = 32; - this.yRIcon_three = 0; + this.yRIcon_three = 32; } } @@ -224,8 +243,16 @@ public class Gui_FinishingAnvil extends GuiContainer 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); + + if(this.rightButtonPosX + 1 < 16) + this.drawTexturedModalRect(132, 32, this.xRIcon_two + (this.rightButtonPosX * 16), this.yRIcon_two + (this.rightButtonPosY * 16), 16, 16); + else + this.drawTexturedModalRect(132, 32, this.xRIcon_two + ((this.rightButtonPosX - 16) * 16), this.yRIcon_two + ((this.rightButtonPosY + 1) * 16), 16, 16); + + if(this.rightButtonPosX + 2 < 16) + this.drawTexturedModalRect(132, 52, this.xRIcon_three + (this.rightButtonPosX * 16), this.yRIcon_three + (this.rightButtonPosY * 16), 16, 16); + else + this.drawTexturedModalRect(132, 52, this.xRIcon_three + ((this.rightButtonPosX - 16) * 16), this.yRIcon_three + ((this.rightButtonPosY + 1) * 16), 16, 16); bigRender.renderItemAndEffectIntoGUI(fontRendererObj, this.mc.getTextureManager(), bigCopy, 23, 5); @@ -244,4 +271,41 @@ public class Gui_FinishingAnvil extends GuiContainer { } + + protected void drawTooltip(int x, int y) + { + int buttons[] = {4, 5, 6, 9, 10, 11}; + + for(int i = 0; i < buttons.length; i++) + { + GuiButtonExt button = ((GuiButtonExt) this.buttonList.get(buttons[i] - 1)); + boolean mousehover = x >= button.xPosition && y >= button.yPosition && x < button.xPosition + button.width && y < button.yPosition + button.height; + int test = button.getHoverState(mousehover); + if(test == 2) + { + if(bigCopy != null) + { + ToolCore tool = (ToolCore) bigCopy.getItem(); + ToolCoreTip tt = ((Injector) TinkersDefense.tcInject).tools.get(tool.getToolName()); + List<String> list = new ArrayList(); + + switch(i) + { + case 0: list.add(tt.getPart(1 + this.leftButtonPosX)); break; + case 1: list.add(tt.getPart(3 + this.leftButtonPosX)); break; + case 2: list.add(tt.getPart(2 + this.leftButtonPosX)); break; + + case 3: list.add(tt.getPartName(this.leftSelect + 1, (rightButtonPosX + ((rightButtonPosY % 3) * 16)))); break; + case 4: list.add(tt.getPartName(this.leftSelect + 1, (rightButtonPosX + 1 + ((rightButtonPosY % 3) * 16)))); break; + case 5: list.add(tt.getPartName(this.leftSelect + 1, (rightButtonPosX + 2 + ((rightButtonPosY % 3) * 16)))); break; + } + + if(list.get(0).contains("Metallurgy")) + list.add(" -by Shadowclaimer"); + func_146283_a(list, x, y); + + } + } + } + } } diff --git a/src/main/java/lance5057/tDefense/finishingAnvil/utilities/Injector.java b/src/main/java/lance5057/tDefense/finishingAnvil/utilities/Injector.java index da9b672..84cd4de 100644 --- a/src/main/java/lance5057/tDefense/finishingAnvil/utilities/Injector.java +++ b/src/main/java/lance5057/tDefense/finishingAnvil/utilities/Injector.java @@ -1,6 +1,7 @@ package lance5057.tDefense.finishingAnvil.utilities; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -8,145 +9,87 @@ import lance5057.tDefense.TinkersDefense; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; +import tconstruct.library.TConstructRegistry; import tconstruct.library.crafting.PatternBuilder; import tconstruct.library.crafting.PatternBuilder.MaterialSet; import tconstruct.library.tools.ToolCore; public class Injector extends ToolCore { + List<String> heads = new ArrayList<String>(); + List<String> accessories = new ArrayList<String>(); + List<String> handles = new ArrayList<String>(); + List<String> extras = new ArrayList<String>(); - ToolCore tool; + public HashMap<String, ToolCoreTip> tools = new HashMap<String, ToolCoreTip>(); - InjectorLocations injectLoc; - - List<String> heads = new ArrayList<String>(); - List<String> accessorys = new ArrayList<String>(); - List<String> handles = new ArrayList<String>(); - List<String> extras = new ArrayList<String>(); - - public Injector(int baseDamage, ToolCore tool, InjectorLocations injLoc) + public Injector(int baseDamage) { super(0); - this.tool = tool; - - injectLoc = injLoc; - - List<String> temp = injectLoc.getList(tool.getUnlocalizedName().substring(tool.getUnlocalizedName().lastIndexOf('.') + 1, tool.getUnlocalizedName().length())); - - if(!temp.isEmpty()) - { - for(int i = 0; i < temp.size(); i++) - { - if(temp.get(i).contains("head")) - { - heads.add(temp.get(i)); - } - if(temp.get(i).contains("accessory")) - { - accessorys.add(temp.get(i)); - } - if(temp.get(i).contains("handle")) - { - handles.add(temp.get(i)); - } - if(temp.get(i).contains("extra")) - { - extras.add(temp.get(i)); - } - } - } } protected void loadHeads(IIconRegister iconRegister) { - IIcon origHead = tool.headIcons.get(-1); - IIcon origAccessory = tool.accessoryIcons.get(-1); - IIcon origHandle = tool.handleIcons.get(-1); - IIcon origExtra = tool.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 < heads.size(); i++) + int toolLength = TConstructRegistry.tools.size(); + for(int i = 0; i < toolLength; i++) { - PatternBuilder pb = PatternBuilder.instance; - for(Map.Entry<String, MaterialSet> entry : pb.materialSets.entrySet()) - { - String icon = "tinkersdefense:"; - icon += tool.getDefaultFolder() + "/" + entry.getKey().toLowerCase() + "/" + heads.get(i); - //toolIcons[i] = icon; - headStrings.put(entry.getValue().materialID + (TinkersDefense.config.MaterialIndex * (i + 1)), icon); - } - - addIcons(tool.headStrings, headIcons, iconRegister, heads.get(i), false); - - for(int j = (i + 1) * TinkersDefense.config.MaterialIndex; j < TinkersDefense.config.MaterialIndex + ((i + 1) * TinkersDefense.config.MaterialIndex); j++) - { - if(!headIcons.containsKey(j)) - { - headIcons.put(j, headIcons.get(-1)); - } - } + heads.clear(); + accessories.clear(); + handles.clear(); + extras.clear(); + + this.headStrings.clear(); + this.headIcons.clear(); + this.accessoryStrings.clear(); + this.accessoryIcons.clear(); + this.handleStrings.clear(); + this.handleIcons.clear(); + this.extraStrings.clear(); + this.extraIcons.clear(); + + ToolCore tool = TConstructRegistry.tools.get(i); + + IIcon origHead = tool.headIcons.get(-1); + IIcon origAccessory = tool.accessoryIcons.get(-1); + IIcon origHandle = tool.handleIcons.get(-1); + IIcon origExtra = tool.extraIcons.get(-1); + + if(tool.getToolName().equals("Battleaxe")) + BattleAxe(); + if(tool.getToolName().equals("Arrow")) + Arrow(); + if(tool.getToolName().equals("Broadsword")) + Broadsword(); + if(tool.getToolName().equals("Battlesign")) + Battlesign(); + if(tool.getToolName().equals("Hatchet")) + Axe(); + if(tool.getToolName().equals("Mattock")) + Mattock(); + if(tool.getToolName().equals("Longbow")) + Longbow(); + setupIcons(tool, iconRegister, heads, this.headStrings, this.headIcons); + setupIcons(tool, iconRegister, accessories, this.accessoryStrings, this.accessoryIcons); + setupIcons(tool, iconRegister, handles, this.handleStrings, this.handleIcons); + setupIcons(tool, iconRegister, extras, this.extraStrings, this.extraIcons); tool.headStrings.putAll(headStrings); tool.headIcons.putAll(headIcons); - } - - for(int i = 0; i < accessorys.size(); i++) - { - PatternBuilder pb = PatternBuilder.instance; - for(Map.Entry<String, MaterialSet> entry : pb.materialSets.entrySet()) - { - String icon = "tinkersdefense:"; - icon += tool.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 < TinkersDefense.config.MaterialIndex + ((i + 1) * TinkersDefense.config.MaterialIndex); j++) - { - if(!accessoryIcons.containsKey(j)) - { - accessoryIcons.put(j, accessoryIcons.get(-1)); - } - } tool.accessoryStrings.putAll(accessoryStrings); tool.accessoryIcons.putAll(accessoryIcons); - } - - for(int i = 0; i < handles.size(); i++) - { - PatternBuilder pb = PatternBuilder.instance; - for(Map.Entry<String, MaterialSet> entry : pb.materialSets.entrySet()) - { - String icon = "tinkersdefense:"; - icon += tool.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 < TinkersDefense.config.MaterialIndex + ((i + 1) * TinkersDefense.config.MaterialIndex); j++) - { - if(!handleIcons.containsKey(j)) - { - handleIcons.put(j, handleIcons.get(-1)); - } - } tool.handleStrings.putAll(handleStrings); tool.handleIcons.putAll(handleIcons); - } - tool.headIcons.put(-1, origHead); - tool.accessoryIcons.put(-1, origAccessory); - tool.handleIcons.put(-1, origHandle); + tool.extraStrings.putAll(extraStrings); + tool.extraIcons.putAll(extraIcons); + + tool.headIcons.put(-1, origHead); + tool.accessoryIcons.put(-1, origAccessory); + tool.handleIcons.put(-1, origHandle); + tool.extraIcons.put(-1, origExtra); + } } @Override @@ -172,8 +115,7 @@ public class Injector extends ToolCore public String getDefaultFolder() { // TODO Auto-generated method stub - String s = tool.getDefaultFolder(); - return s; + return null; } @Override @@ -203,4 +145,323 @@ public class Injector extends ToolCore // TODO Auto-generated method stub return null; } + + public void setupIcons(ToolCore tool, IIconRegister iconRegister, List<String> newList, HashMap<Integer, String> toolStrings, HashMap<Integer, IIcon> toolIcons) + { + for(int i = 0; i < newList.size(); i++) + { + PatternBuilder pb = PatternBuilder.instance; + for(Map.Entry<String, MaterialSet> entry : pb.materialSets.entrySet()) + { + String icon = "tinkersdefense:"; + icon += tool.getDefaultFolder() + "/" + newList.get(i); + //toolIcons[i] = icon; + toolStrings.put(entry.getValue().materialID + (TinkersDefense.config.MaterialIndex * (i + 1)), icon); + } + } + + addIcons(toolStrings, toolIcons, iconRegister, null, false); + } + + void BattleAxe() + { + ToolCoreTip tt = new ToolCoreTip(); + + tt.accessory = "Front Head"; + tt.head = "Back Head"; + tt.handle = "Handle"; + tt.extra = "Binding"; + + heads.add("_halbard_head"); + heads.add("_magic_head"); + heads.add("_scythe_head"); + + tt.headTT.add("Halbard Backhead"); + tt.headTT.add("Magic Backhead"); + tt.headTT.add("Scythe Backhead"); + + extras.add("_magic_extra"); + extras.add("_scythe_extra"); + extras.add("_halbard_extra"); + extras.add("_ornate_extra"); + + tt.extraTT.add("Halbard Head"); + tt.extraTT.add("Magic Head"); + tt.extraTT.add("Scythe Head"); + tt.extraTT.add("Ornate Head"); + + accessories.add("_magic_accessory"); + accessories.add("_halbard_accessory"); + accessories.add("_knob_accessory"); + + //Metallurgy 5 + + tools.put("Battleaxe", tt); + } + + void Axe() + { + ToolCoreTip tt = new ToolCoreTip(); + + tt.head = "Head"; + tt.handle = "Handle"; + + heads.add("_thin_head"); + tt.headTT.add("Thin Head"); + heads.add("_minecraft_head"); + tt.headTT.add("Vanilla Head"); + heads.add("_m5zinc_head"); + tt.headTT.add("Metallurgy 5 Zinc Head"); + heads.add("_m5whitegold_head"); + tt.headTT.add("Metallurgy 5 WhiteGold Head"); + heads.add("_m5tin_head"); + tt.headTT.add("Metallurgy 5 Tin Head"); + heads.add("_m5silver_head"); + tt.headTT.add("Metallurgy 5 Silver Head"); + heads.add("_m5rosegold_head"); + tt.headTT.add("Metallurgy 5 RoseGold Head"); + heads.add("_m5platinum_head"); + tt.headTT.add("Metallurgy 5 Platinum Head"); + heads.add("_m5pewter_head"); + tt.headTT.add("Metallurgy 5 Pewter Head"); + heads.add("_m5nickelsteel_head"); + tt.headTT.add("Metallurgy 5 NickelSteel Head"); + heads.add("_m5nickel_head"); + tt.headTT.add("Metallurgy 5 Nickel Head"); + heads.add("_m5monel_head"); + tt.headTT.add("Metallurgy 5 Monel Head"); + heads.add("_m5molybdochalkos_head"); + tt.headTT.add("Metallurgy 5 Molybdochalkos Head"); + heads.add("_m5manganesesteel_head"); + tt.headTT.add("Metallurgy 5 ManganeseSteel Head"); + heads.add("_m5manganese_head"); + tt.headTT.add("Metallurgy 5 Manganese Head"); + heads.add("_m5lead_head"); + tt.headTT.add("Metallurgy 5 Lead Head"); + heads.add("_m5iron_head"); + tt.headTT.add("Metallurgy 5 Iron Head"); + heads.add("_m5ignatius_head"); + tt.headTT.add("Metallurgy 5 Ignatius Head"); + heads.add("_m5hepatizon_head"); + tt.headTT.add("Metallurgy 5 Hepatizon Head"); + heads.add("_m5heavysteel_head"); + tt.headTT.add("Metallurgy 5 HeavySteel Head"); + heads.add("_m5gold_head"); + tt.headTT.add("Metallurgy 5 Gold Head"); + heads.add("_m5fungalsteel_head"); + tt.headTT.add("Metallurgy 5 FungalSteel Head"); + heads.add("_m5electrum_head"); + tt.headTT.add("Metallurgy 5 Electrum Head"); + heads.add("_m5diamond_head"); + tt.headTT.add("Metallurgy 5 Diamond Head"); + heads.add("_m5damascussteel_head"); + tt.headTT.add("Metallurgy 5 DamascusSteel Head"); + heads.add("_m5cupronickel_head"); + tt.headTT.add("Metallurgy 5 Cupronickel Head"); + heads.add("_m5crowngold_head"); + tt.headTT.add("Metallurgy 5 CrownGold Head"); + heads.add("_m5copper_head"); + tt.headTT.add("Metallurgy 5 Copper Head"); + heads.add("_m5bronze_head"); + tt.headTT.add("Metallurgy 5 Bronze Head"); + heads.add("_m5brass_head"); + tt.headTT.add("Metallurgy 5 Brass Head"); + heads.add("_m5angmallen_head"); + tt.headTT.add("Metallurgy 5 Angmallen Head"); + heads.add("_broad_head"); + tt.headTT.add("Broad Head"); + heads.add("_bearded_head"); + tt.headTT.add("Bearded Head"); + + handles.add("_long_handle"); + tt.handleTT.add("Long Handle"); + handles.add("_ornate_handle"); + tt.handleTT.add("Ornate Handle"); + handles.add("_longornate_handle"); + tt.handleTT.add("Long Ornate Handle"); + handles.add("_offset_handle"); + tt.handleTT.add("Offset Handle"); + handles.add("_offsetlong_handle"); + tt.handleTT.add("Offset Long Handle"); + handles.add("_offsetornate_handle"); + tt.handleTT.add("Offset Ornate Handle"); + handles.add("_offsetlongornate_handle"); + tt.handleTT.add("Offset Long Ornate Handle"); + + tools.put("Hatchet", tt); + } + + void Battlesign() + { + handles.add("_small_handle"); + handles.add("_smalllong_handle"); + + heads.add("_arrow_head"); + heads.add("_caution_head"); + heads.add("_noentry_head"); + heads.add("_railroad_head"); + heads.add("_stop_head"); + heads.add("_X_head"); + } + + void Arrow() + { + heads.add("_broad_head"); + heads.add("_elven_head"); + heads.add("_horned_head"); + heads.add("_trident_head"); + heads.add("_winged_head"); + + handles.add("_bulbous_handle"); + handles.add("_natural_handle"); + + accessories.add("_matted_accessory"); + accessories.add("_magic_accessory"); + accessories.add("_pixie_accessory"); + accessories.add("_small_accessory"); + } + + void Broadsword() + { + ToolCoreTip tt = new ToolCoreTip(); + + tt.head = "Blade"; + tt.accessory = "Guard"; + tt.handle = "Handle"; + + tt.headTT.add("Standard Blade"); + heads.add("_tapered_head"); + tt.headTT.add("Tapered Blade"); + heads.add("_dull_head"); + tt.headTT.add("Dull Blade"); + heads.add("_glass_head"); + tt.headTT.add("Glass Blade"); + heads.add("_plumed_head"); + tt.headTT.add("Plumed Blade"); + heads.add("_spiked_head"); + tt.headTT.add("Spiked Blade"); + heads.add("_widebase_head"); + tt.headTT.add("Widebase Blade"); + heads.add("_mace_head"); + tt.headTT.add("Mace \"Blade\""); + heads.add("_elusive_head"); + tt.headTT.add("Elusive Blade"); + heads.add("_repulsive_head"); + tt.headTT.add("Repulsive Blade"); + heads.add("_falchion_head"); + tt.headTT.add("Falchion Blade"); + heads.add("_big_head"); + tt.headTT.add("Big Blade"); + heads.add("_nofuller_head"); + tt.headTT.add("No Fuller Blade"); + heads.add("_segmented_head"); + tt.headTT.add("Segmented Blade"); + heads.add("_hourglass_head"); + tt.headTT.add("Hourglass Blade"); + heads.add("_flat_head"); + tt.headTT.add("Flat Tip Blade"); + + heads.add("_m5zinc_head"); + tt.headTT.add("Metallurgy 5 Zinc Blade"); + heads.add("_m5whitegold_head"); + tt.headTT.add("Metallurgy 5 WhiteGold Blade"); + heads.add("_m5tin_head"); + tt.headTT.add("Metallurgy 5 Tin Blade"); + heads.add("_m5silver_head"); + tt.headTT.add("Metallurgy 5 Silver Blade"); + heads.add("_m5rosegold_head"); + tt.headTT.add("Metallurgy 5 RoseGold Blade"); + heads.add("_m5platinum_head"); + tt.headTT.add("Metallurgy 5 Platinum Blade"); + heads.add("_m5pewter_head"); + tt.headTT.add("Metallurgy 5 Pewter Blade"); + heads.add("_m5nickelsteel_head"); + tt.headTT.add("Metallurgy 5 NickelSteel Blade"); + heads.add("_m5nickel_head"); + tt.headTT.add("Metallurgy 5 Nickel Blade"); + heads.add("_m5monel_head"); + tt.headTT.add("Metallurgy 5 Monel Blade"); + heads.add("_m5molybdochalkos_head"); + tt.headTT.add("Metallurgy 5 Molybdochalkos Blade"); + heads.add("_m5manganesesteel_head"); + tt.headTT.add("Metallurgy 5 ManganeseSteel Blade"); + heads.add("_m5manganese_head"); + tt.headTT.add("Metallurgy 5 Manganese Blade"); + heads.add("_m5lead_head"); + tt.headTT.add("Metallurgy 5 Lead Blade"); + heads.add("_m5iron_head"); + tt.headTT.add("Metallurgy 5 Iron Blade"); + heads.add("_m5ignatius_head"); + tt.headTT.add("Metallurgy 5 Ignatius Blade"); + heads.add("_m5hepatizon_head"); + tt.headTT.add("Metallurgy 5 Hepatizon Blade"); + heads.add("_m5heavysteel_head"); + tt.headTT.add("Metallurgy 5 HeavySteel Blade"); + heads.add("_m5gold_head"); + tt.headTT.add("Metallurgy 5 Gold Blade"); + heads.add("_m5fungalsteel_head"); + tt.headTT.add("Metallurgy 5 FungalSteel Blade"); + heads.add("_m5electrum_head"); + tt.headTT.add("Metallurgy 5 Electrum Blade"); + heads.add("_m5diamond_head"); + tt.headTT.add("Metallurgy 5 Diamond Blade"); + heads.add("_m5damascussteel_head"); + tt.headTT.add("Metallurgy 5 DamascusSteel Blade"); + heads.add("_m5cupronickel_head"); + tt.headTT.add("Metallurgy 5 Cupronickel Blade"); + heads.add("_m5crowngold_head"); + tt.headTT.add("Metallurgy 5 CrownGold Blade"); + heads.add("_m5copper_head"); + tt.headTT.add("Metallurgy 5 Copper Blade"); + heads.add("_m5bronze_head"); + tt.headTT.add("Metallurgy 5 Bronze Blade"); + heads.add("_m5brass_head"); + tt.headTT.add("Metallurgy 5 Brass Blade"); + heads.add("_m5angmallen_head"); + tt.headTT.add("Metallurgy 5 Angmallen Blade"); + + accessories.add("_basket_accessory"); + accessories.add("_curved_accessory"); + accessories.add("_elusive_accessory"); + accessories.add("_extended_accessory"); + accessories.add("_legendary_accessory"); + accessories.add("_no_accessory"); + accessories.add("_basket_accessory"); + accessories.add("_repulsive_accessory"); + accessories.add("_square_accessory"); + accessories.add("_straight_accessory"); + accessories.add("_straight_accessory"); + accessories.add("_bulbous_accessory"); + accessories.add("_sun_accessory"); + accessories.add("_lamenting_accessory"); + accessories.add("_pixie_accessory"); + accessories.add("_forked_accessory"); + + handles.add("_ornate_handle"); + handles.add("_thick_handle"); + handles.add("_short_handle"); + + tools.put("Broadsword", tt); + } + + void Mattock() + { + heads.add("_head_bearded"); + heads.add("_head_magic"); + heads.add("_head_scythe"); + heads.add("head_wide"); + + accessories.add("_back_straight"); + + heads.add("_m5copper_head"); + accessories.add("_m5copper_accessory"); + } + + void Longbow() + { + heads.add("_m5copper_head"); + accessories.add("_m5copper_accessory"); + handles.add("_m5copper_handle"); + extras.add("_m5copper_extra"); + } } diff --git a/src/main/java/lance5057/tDefense/finishingAnvil/utilities/InjectorLocations.java b/src/main/java/lance5057/tDefense/finishingAnvil/utilities/InjectorLocations.java deleted file mode 100644 index f3693c1..0000000 --- a/src/main/java/lance5057/tDefense/finishingAnvil/utilities/InjectorLocations.java +++ /dev/null @@ -1,115 +0,0 @@ -package lance5057.tDefense.finishingAnvil.utilities; - -import java.util.ArrayList; -import java.util.List; - -public class InjectorLocations -{ - List<String> list; - - public InjectorLocations() - { - list = new ArrayList<String>(); - - //BroadSword - list.add("broadsword_dull_head"); - list.add("broadsword_elusive_head"); - list.add("broadsword_glass_head"); - list.add("broadsword_mace_head"); - list.add("broadsword_plumed_head"); - list.add("broadsword_repulsive_head"); - list.add("broadsword_spiked_head"); - list.add("broadsword_tapered_head"); - list.add("broadsword_widebase_head"); - list.add("broadsword_falchion_head"); - list.add("broadsword_big_head"); - list.add("broadsword_segmented_head"); - list.add("broadsword_nofuller_head"); - list.add("broadsword_hourglass_head"); - list.add("broadsword_flat_head"); - - list.add("broadsword_basket_accessory"); - list.add("broadsword_curved_accessory"); - list.add("broadsword_elusive_accessory"); - list.add("broadsword_extended_accessory"); - list.add("broadsword_legendary_accessory"); - list.add("broadsword_no_accessory"); - list.add("broadsword_basket_accessory"); - list.add("broadsword_repulsive_accessory"); - list.add("broadsword_square_accessory"); - list.add("broadsword_straight_accessory"); - list.add("broadsword_straight_accessory"); - list.add("broadsword_bulbous_accessory"); - list.add("broadsword_sun_accessory"); - list.add("broadsword_lamenting_accessory"); - list.add("broadsword_pixie_accessory"); - list.add("broadsword_forked_accessory"); - - list.add("broadsword_ornate_handle"); - list.add("broadsword_thick_handle"); - list.add("broadsword_short_handle"); - - //Arrow - list.add("arrow_broad_head"); - list.add("arrow_elven_head"); - list.add("arrow_horned_head"); - list.add("arrow_trident_head"); - list.add("arrow_winged_head"); - - list.add("arrow_bulbous_handle"); - list.add("arrow_natural_handle"); - - list.add("arrow_matted_accessory"); - list.add("arrow_magic_accessory"); - list.add("arrow_pixie_accessory"); - list.add("arrow_small_accessory"); - - //Axe - list.add("axe_bearded_head"); - list.add("axe_broad_head"); - list.add("axe_minecraft_head"); - list.add("axe_thin_head"); - - //Battleaxe - list.add("battleaxe_halbard_head"); - list.add("battleaxe_magic_head"); - list.add("battleaxe_scythe_head"); - - list.add("battleaxe_magic_extra"); - list.add("battleaxe_scythe_extra"); - list.add("battleaxe_halbard_extra"); - - list.add("battleaxe_magic_accessory"); - list.add("battleaxe_halbard_accessory"); - list.add("battleaxe_knob_accessory"); - - //Battlesign - list.add("battlesign_small_handle"); - list.add("battlesign_smalllong_handle"); - - list.add("battlesign_arrow_head"); - list.add("battlesign_caution_head"); - list.add("battlesign_noentry_head"); - list.add("battlesign_railroad_head"); - list.add("battlesign_stop_head"); - list.add("battlesign_X_head"); - } - - public List getList(String part) - { - List<String> request = new ArrayList<String>(); - - if(!list.isEmpty()) - { - for(int i = 0; i < list.size(); i++) - { - if(list.get(i).contains(part.toLowerCase())) - { - request.add(list.get(i).substring(part.length(), list.get(i).length())); - } - } - } - - return request; - } -} diff --git a/src/main/java/lance5057/tDefense/finishingAnvil/utilities/ToolCoreTip.java b/src/main/java/lance5057/tDefense/finishingAnvil/utilities/ToolCoreTip.java new file mode 100644 index 0000000..1948779 --- /dev/null +++ b/src/main/java/lance5057/tDefense/finishingAnvil/utilities/ToolCoreTip.java @@ -0,0 +1,45 @@ +package lance5057.tDefense.finishingAnvil.utilities; + +import java.util.ArrayList; +import java.util.List; + +public class ToolCoreTip +{ + String head; + String handle; + String accessory; + String extra; + + List<String> headTT = new ArrayList<String>(); + List<String> accessoryTT = new ArrayList<String>(); + List<String> handleTT = new ArrayList<String>(); + List<String> extraTT = new ArrayList<String>(); + + public ToolCoreTip() + { + } + + public String getPart(int id /*1-4*/) + { + switch(id) + { + case 1: return head; + case 2: return handle; + case 3: return accessory; + case 4: return extra; + default: return ""; + } + } + + public String getPartName(int partId /*1-4*/, int id) + { + switch(partId) + { + case 1: return headTT.get(id); + case 2: return handleTT.get(id); + case 3: return accessoryTT.get(id); + case 4: return extraTT.get(id); + default: return ""; + } + } +} diff --git a/src/main/java/lance5057/tDefense/proxy/ClientProxy.java b/src/main/java/lance5057/tDefense/proxy/ClientProxy.java index 2e57daa..9358e69 100644 --- a/src/main/java/lance5057/tDefense/proxy/ClientProxy.java +++ b/src/main/java/lance5057/tDefense/proxy/ClientProxy.java @@ -2,10 +2,19 @@ package lance5057.tDefense.proxy; import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.renderers.ModelMask; +import lance5057.tDefense.armor.renderers.ModelSheath; +import lance5057.tDefense.armor.renderers.cloth.ModelTinkersHood; +import lance5057.tDefense.armor.renderers.cloth.ModelTinkersRobe; +import lance5057.tDefense.armor.renderers.cloth.ModelTinkersShawl; import lance5057.tDefense.armor.renderers.heavy.ModelTinkersBreastplate; +import lance5057.tDefense.armor.renderers.heavy.ModelTinkersGauntlets; import lance5057.tDefense.armor.renderers.heavy.ModelTinkersGrieves; import lance5057.tDefense.armor.renderers.heavy.ModelTinkersHelm; import lance5057.tDefense.armor.renderers.heavy.ModelTinkersSabatons; +import lance5057.tDefense.armor.renderers.light.ModelTinkersBoots; +import lance5057.tDefense.armor.renderers.light.ModelTinkersChausses; +import lance5057.tDefense.armor.renderers.light.ModelTinkersCoif; +import lance5057.tDefense.armor.renderers.light.ModelTinkersHalberd; import lance5057.tDefense.core.blocks.crestMount.Renderer_CrestMount; import lance5057.tDefense.core.blocks.crestMount.TileEntity_CrestMount; import lance5057.tDefense.core.renderer.BigFlexibleToolRenderer; @@ -13,7 +22,6 @@ import lance5057.tDefense.finishingAnvil.blocks.finishingAnvil.Renderer_Finishin import lance5057.tDefense.finishingAnvil.blocks.finishingAnvil.TileEntity_FinishingAnvil; import lance5057.tDefense.models.Renderer_JewelersBench; import lance5057.tDefense.tileentities.TileEntity_JewelersBench; -import net.minecraft.client.model.ModelBiped; import net.minecraftforge.client.MinecraftForgeClient; import tconstruct.client.FlexibleToolRenderer; import cpw.mods.fml.client.registry.ClientRegistry; @@ -22,12 +30,24 @@ public class ClientProxy extends CommonProxy { //public static final ModelSheath sheath = new ModelSheath(); - public static final ModelMask mask = new ModelMask(null); + public static ModelMask mask = new ModelMask(null); + public static ModelSheath sheath = new ModelSheath(); - public static final ModelTinkersHelm helm = new ModelTinkersHelm(); - public static final ModelTinkersBreastplate breastplate = new ModelTinkersBreastplate(); - public static final ModelTinkersGrieves grieves = new ModelTinkersGrieves(); - public static final ModelTinkersSabatons sabatons = new ModelTinkersSabatons(); + public static ModelTinkersHelm helm = new ModelTinkersHelm(); + public static ModelTinkersBreastplate breastplate = new ModelTinkersBreastplate(); + public static ModelTinkersGrieves grieves = new ModelTinkersGrieves(); + public static ModelTinkersSabatons sabatons = new ModelTinkersSabatons(); + public static ModelTinkersGauntlets gauntlets = new ModelTinkersGauntlets(); + + public static ModelTinkersHood hood = new ModelTinkersHood(); + public static ModelTinkersShawl shawl = new ModelTinkersShawl(); + public static ModelTinkersRobe robe = new ModelTinkersRobe(); + public static ModelTinkersBoots shoes = new ModelTinkersBoots(); + + public static ModelTinkersCoif coif = new ModelTinkersCoif(); + public static ModelTinkersHalberd halberd = new ModelTinkersHalberd(); + public static ModelTinkersChausses chausses = new ModelTinkersChausses(); + public static ModelTinkersBoots boots = new ModelTinkersBoots(); @Override public void registerRenderers() @@ -39,10 +59,14 @@ public class ClientProxy extends CommonProxy MinecraftForgeClient.registerItemRenderer(TinkersDefense.tool_wrench, renderer); MinecraftForgeClient.registerItemRenderer(TinkersDefense.tool_shears, renderer); MinecraftForgeClient.registerItemRenderer(TinkersDefense.tool_zweihander, bigrenderer); + MinecraftForgeClient.registerItemRenderer(TinkersDefense.tool_sheath, renderer); + MinecraftForgeClient.registerItemRenderer(TinkersDefense.armor_TinkerHelm, renderer); MinecraftForgeClient.registerItemRenderer(TinkersDefense.armor_TinkerBreastplate, renderer); MinecraftForgeClient.registerItemRenderer(TinkersDefense.armor_TinkerGrieves, renderer); MinecraftForgeClient.registerItemRenderer(TinkersDefense.armor_TinkerSabatons, renderer); + MinecraftForgeClient.registerItemRenderer(TinkersDefense.armor_TinkerGauntlets, renderer); + MinecraftForgeClient.registerItemRenderer(TinkersDefense.armor_TinkerRobe, renderer); MinecraftForgeClient.registerItemRenderer(TinkersDefense.armor_TinkerShawl, renderer); MinecraftForgeClient.registerItemRenderer(TinkersDefense.armor_TinkerHood, renderer); @@ -56,12 +80,5 @@ public class ClientProxy extends CommonProxy ClientRegistry.bindTileEntitySpecialRenderer(TileEntity_CrestMount.class, new Renderer_CrestMount()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntity_FinishingAnvil.class, new Renderer_FinishingAnvil()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntity_JewelersBench.class, new Renderer_JewelersBench()); - - } - - @Override - public ModelBiped getArmorModel(int id) - { - return null; } } |
