diff options
| author | Lance5057 <Lance5057@gmail.com> | 2016-07-29 08:52:49 -0500 |
|---|---|---|
| committer | Lance5057 <Lance5057@gmail.com> | 2016-07-29 08:52:49 -0500 |
| commit | ff41fd97eb377dd1ebd78b4b56e81c59ca786667 (patch) | |
| tree | 9cf346cfaaeec383e46dcc946e1259115741b22b /src/main/java/lance5057/tDefense/armor | |
| parent | 3add1e694184471c0d788b6c04c8801d680eda11 (diff) | |
Prelaunch backup
Diffstat (limited to 'src/main/java/lance5057/tDefense/armor')
45 files changed, 3097 insertions, 2061 deletions
diff --git a/src/main/java/lance5057/tDefense/armor/ArmorCore.java b/src/main/java/lance5057/tDefense/armor/ArmorCore.java index e56535a..56645ac 100644 --- a/src/main/java/lance5057/tDefense/armor/ArmorCore.java +++ b/src/main/java/lance5057/tDefense/armor/ArmorCore.java @@ -1,9 +1,9 @@ package lance5057.tDefense.armor; -import org.lwjgl.opengl.GL11; - import lance5057.tDefense.TDIntegration; import lance5057.tDefense.TinkersDefense; +import lance5057.tDefense.armor.parts.ClothMaterial; +import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -15,21 +15,32 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; +import net.minecraftforge.common.MinecraftForge; + +import org.lwjgl.opengl.GL11; + +import tconstruct.library.TConstructRegistry; +import tconstruct.library.event.ToolCraftEvent.NormalTool; import tconstruct.library.tools.AbilityHelper; +import tconstruct.library.tools.CustomMaterial; import tconstruct.library.tools.ToolCore; import thaumcraft.api.IRunicArmor; +import vazkii.botania.api.item.IPixieSpawner; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IRunicArmor", striprefs = true)}) -public class ArmorCore extends ToolCore implements ISpecialArmor, IRunicArmor +public abstract class ArmorCore extends ToolCore implements ISpecialArmor, IRunicArmor, IPixieSpawner { int slot; public float reductionPercent = 0f; protected int maxReduction = 100; + public String[] renderParts; + //Thaumcraft boolean Charge = false; @@ -38,6 +49,8 @@ public class ArmorCore extends ToolCore implements ISpecialArmor, IRunicArmor super(baseProtection); this.slot = slot; + + MinecraftForge.EVENT_BUS.register(this); } @Override @@ -47,12 +60,14 @@ public class ArmorCore extends ToolCore implements ISpecialArmor, IRunicArmor if(!source.isUnblockable()) { armorp = new ArmorProperties(0, reductionPercent, maxReduction); // 0.04 - // per - // half - // shirt + // per + // half + // shirt } else + { armorp = new ArmorProperties(0, 0, 0); + } return armorp; } @@ -90,9 +105,69 @@ public class ArmorCore extends ToolCore implements ISpecialArmor, IRunicArmor @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + if(itemStack.getItem() instanceof ToolCore) + { + final String[] color = new String[10]; + final ToolCore tool = (ToolCore) itemStack.getItem(); + + for(int j = 0; j < 10; j++) + { + color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); + + switch(j) + { + case 0: + if(tool.getHandleItem() == TinkersDefense.partCloth) + { + final int ID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHandle"); + + final CustomMaterial newColor = TConstructRegistry.getCustomMaterial(ID, ClothMaterial.class); + color[j] = Integer.toHexString(newColor.color); + } + break; + + case 1: + if(tool.getHeadItem() == TinkersDefense.partCloth) + { + final int ID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHead"); + + final CustomMaterial newColor = TConstructRegistry.getCustomMaterial(ID, ClothMaterial.class); + color[j] = Integer.toHexString(newColor.color); + } + break; + + case 2: + if(tool.getAccessoryItem() != null && tool.getAccessoryItem() == TinkersDefense.partCloth) + { + final int ID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderAccessory"); + + final CustomMaterial newColor = TConstructRegistry.getCustomMaterial(ID, ClothMaterial.class); + color[j] = Integer.toHexString(newColor.color); + } + break; + + case 3: + if(tool.getExtraItem() != null && tool.getExtraItem() == TinkersDefense.partCloth) + { + final int ID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderExtra"); + + final CustomMaterial newColor = TConstructRegistry.getCustomMaterial(ID, ClothMaterial.class); + color[j] = Integer.toHexString(newColor.color); + } + break; + } + } + + final ArmorRenderer model = getRenderer(); + model.SetColors(color, getDefaultFolder(), itemStack); + return model; + } return null; } + @SideOnly(Side.CLIENT) + public abstract ArmorRenderer getRenderer(); + @Override public Item getAccessoryItem() { @@ -133,7 +208,7 @@ public class ArmorCore extends ToolCore implements ISpecialArmor, IRunicArmor public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - //TinkersDefense.mods.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")); } @Override @@ -148,10 +223,10 @@ public class ArmorCore extends ToolCore implements ISpecialArmor, IRunicArmor //Check if runic shielding level has changed if(TDIntegration.thaumcraft) { - NBTTagCompound tcTag = stack.getTagCompound(); - NBTTagCompound ticoTag = stack.getTagCompound().getCompoundTag("InfiTool"); + final NBTTagCompound tcTag = stack.getTagCompound(); + final NBTTagCompound ticoTag = stack.getTagCompound().getCompoundTag("InfiTool"); - byte rs = tcTag.getByte("RS.HARDEN"); + final byte rs = tcTag.getByte("RS.HARDEN"); if(!Charge && rs > 0) { if(ticoTag.getInteger("Modifiers") > 0) @@ -160,7 +235,9 @@ public class ArmorCore extends ToolCore implements ISpecialArmor, IRunicArmor Charge = true; } else - tcTag.setByte("RS.HARDEN", (byte) 0); + { + tcTag.removeTag("RS.HARDEN"); + } } } } @@ -168,43 +245,91 @@ public class ArmorCore extends ToolCore implements ISpecialArmor, IRunicArmor public void renderArmor(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, String[] colors, ItemStack stack, int pass) { - ResourceLocation rc = new ResourceLocation("tinkersdefense:textures/" + this.getDefaultFolder() + "/" + getTexture(pass, stack) + ".png"); + final ResourceLocation rc = new ResourceLocation( + "tinkersdefense:textures/" + getDefaultFolder() + "/" + getTexture(pass, stack) + ".png"); FMLClientHandler.instance().getClient().renderEngine.bindTexture(rc); - float size = 1.6f; + final float size = 1.6f; GL11.glScalef(1.0F / size, 1.0F / size, 1.0F / size); GL11.glTranslatef(0.0F, -0.01F, 0.0F); - int[] intColors = TinkersDefense.hexToRGB(colors[pass]); + final int[] intColors = TinkersDefense.hexToRGB(colors[pass]); GL11.glColor3d((float) intColors[0] / 255, (float) intColors[1] / 255, (float) intColors[2] / 255); } public String getTexture(int pass, ItemStack stack) { - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + final NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + String renderReturn = ""; switch(pass) { case 0: - return this.getIconSuffix(2); + renderReturn = handleStrings.get(tags.getInteger("RenderHandle")); + break; case 1: - return this.getIconSuffix(0); + renderReturn = headStrings.get(tags.getInteger("RenderHead")); + break; case 2: - return this.getIconSuffix(3); + renderReturn = accessoryStrings.get(tags.getInteger("RenderAccessory")); + break; case 3: - return this.getIconSuffix(4); + renderReturn = extraStrings.get(tags.getInteger("RenderExtra")); + break; default: - if(tags != null && tags.hasKey("Effect" + (1 + pass - getPartAmount()))) + if(tags != null && tags.hasKey("Effect" + (pass - getPartAmount()))) { - String effect = effectStrings.get(tags.getInteger("Effect" + (1 + pass - getPartAmount()))); + final String effect = effectStrings.get(tags.getInteger("Effect" + (pass - getPartAmount()))); if(effect != null) - return effect.substring(effect.lastIndexOf("/")); + return effect.substring(effect.lastIndexOf("/") + 1); else return ""; - + } } - return ""; + if(renderReturn != null && renderReturn != "") + { + renderReturn = renderReturn.substring(renderReturn.indexOf("_")); + } + else + { + renderReturn = ""; + } + + return renderReturn; + } + + @Override + public float getPixieChance(ItemStack stack) + { + final float chance = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("ElementiumCore") * 5 / 100f; + return chance; + } + + @SubscribeEvent + public void ToolCraftedEvent(NormalTool event) + { + if(event.tool instanceof ArmorCore) + { + final ArmorCore armor = (ArmorCore) event.tool; + final ArmorRenderer render = armor.getRenderer(); + final NBTTagCompound tooltags = event.toolTag; + final NBTTagCompound tags = render.defaultTags;//stack.setTagCompound(); + + // for(int i = 0; i < render.defaultTags.; i++) + // { + // final String rendertag = ((ModelRenderer) render.boxList.get(i)).boxName; + // if(rendertag != null) + // { + // tags.setBoolean(rendertag, ((ModelRenderer) render.boxList.get(i)).isHidden); + // } + // } + + if(!tags.hasNoTags()) + { + tooltags.setTag("ArmorRenderer", tags); + } + } } } diff --git a/src/main/java/lance5057/tDefense/armor/TDArmorAddon.java b/src/main/java/lance5057/tDefense/armor/TDArmorAddon.java new file mode 100644 index 0000000..a877515 --- /dev/null +++ b/src/main/java/lance5057/tDefense/armor/TDArmorAddon.java @@ -0,0 +1,187 @@ +package lance5057.tDefense.armor; + +import lance5057.tDefense.TinkersDefense; +import lance5057.tDefense.armor.blocks.GlowstoneCrumbs; +import lance5057.tDefense.armor.blocks.UnstableBlock; +import lance5057.tDefense.armor.blocks.UnstableItemBlock; +import lance5057.tDefense.armor.items.Sheath; +import lance5057.tDefense.armor.items.TinkersGauntlets; +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.TinkersGrieves; +import lance5057.tDefense.armor.items.heavy.TinkersHelm; +import lance5057.tDefense.armor.items.heavy.TinkersSabatons; +import lance5057.tDefense.armor.items.light.TinkersBoots; +import lance5057.tDefense.armor.items.light.TinkersChausses; +import lance5057.tDefense.armor.items.light.TinkersCoif; +import lance5057.tDefense.armor.items.light.TinkersHauberk; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.MinecraftForgeClient; +import tconstruct.client.FlexibleToolRenderer; +import tconstruct.library.TConstructRegistry; +import tconstruct.library.crafting.ToolBuilder; +import tconstruct.library.tools.ToolCore; +import tconstruct.tools.TinkerTools; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.registry.GameRegistry; + +public class TDArmorAddon +{ + public static CreativeTabs tabName; + + public static ToolCore armor_TinkerHood; + public static ToolCore armor_TinkerShawl; + public static ToolCore armor_TinkerRobe; + public static ToolCore armor_TinkerShoes; + + public static ToolCore armor_TinkerCoif; + public static ToolCore armor_TinkerHauberk; + public static ToolCore armor_TinkerChausses; + public static ToolCore armor_TinkerBoots; + + public static ToolCore armor_TinkerHelm; + public static ToolCore armor_TinkerBreastplate; + public static ToolCore armor_TinkerGrieves; + public static ToolCore armor_TinkerSabatons; + public static ToolCore armor_TinkerGauntlets; + + public static ToolCore accessory_sheath; + + public static Block block_Unstable; + public static Block block_GlowCrumbs; + + public void preInit(FMLPreInitializationEvent e) + { + tabName = new CreativeTabs("TabArmor") + { + + @Override + public Item getTabIconItem() + { + return ToolBuilder.instance.buildTool(new ItemStack( + TinkerTools.largePlate, 1, 2), new ItemStack( + TinkerTools.toughRod, 1, 2), new ItemStack( + TinkersDefense.partArmorplate, 1, 2), new ItemStack( + TinkersDefense.partChainmaille, 1, 2), "ArmorTab").getItem(); + } + + }; + + armor_TinkerHelm = new TinkersHelm(); + armor_TinkerBreastplate = new TinkersBreastplate(); + armor_TinkerGrieves = new TinkersGrieves(); + armor_TinkerSabatons = new TinkersSabatons(); + armor_TinkerGauntlets = new TinkersGauntlets(); + + armor_TinkerRobe = new TinkersRobe(); + armor_TinkerShawl = new TinkersShawl(); + armor_TinkerHood = new TinkersHood(); + armor_TinkerShoes = new TinkersShoes(); + + armor_TinkerCoif = new TinkersCoif(); + armor_TinkerHauberk = new TinkersHauberk(); + armor_TinkerChausses = new TinkersChausses(); + armor_TinkerBoots = new TinkersBoots(); + + accessory_sheath = new Sheath(); + + block_Unstable = new UnstableBlock(); + block_GlowCrumbs = new GlowstoneCrumbs(); + + GameRegistry.registerItem(armor_TinkerHelm, "tinkerhelm"); + 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_TinkerHauberk, "tinkerhauberk"); + GameRegistry.registerItem(armor_TinkerChausses, "tinkerchausses"); + GameRegistry.registerItem(armor_TinkerBoots, "tinkerboots"); + + GameRegistry.registerItem(armor_TinkerRobe, "tinkerrobe"); + GameRegistry.registerItem(armor_TinkerShawl, "tinkershawl"); + GameRegistry.registerItem(armor_TinkerHood, "tinkerhood"); + GameRegistry.registerItem(armor_TinkerShoes, "tinkershoes"); + + GameRegistry.registerItem(accessory_sheath, "Sheath"); + + GameRegistry.registerBlock(block_Unstable, UnstableItemBlock.class, "Unstable"); + GameRegistry.registerBlock(block_GlowCrumbs, "Block_GlowCrumbs"); + + TConstructRegistry.addItemToDirectory("tinkerhelm", armor_TinkerHelm); + 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("tinkerhauberk", armor_TinkerHauberk); + TConstructRegistry.addItemToDirectory("tinkerchausses", armor_TinkerChausses); + TConstructRegistry.addItemToDirectory("tinkerboots", armor_TinkerBoots); + + TConstructRegistry.addItemToDirectory("tinkerrobe", armor_TinkerRobe); + TConstructRegistry.addItemToDirectory("tinkershawl", armor_TinkerShawl); + TConstructRegistry.addItemToDirectory("tinkerhood", armor_TinkerHood); + TConstructRegistry.addItemToDirectory("tinkershoes", armor_TinkerShoes); + + TConstructRegistry.addItemToDirectory("Sheath", accessory_sheath); + } + + public void init(FMLInitializationEvent e) + { + + TConstructRegistry.addToolRecipe(armor_TinkerHelm, TinkerTools.frypanHead, TinkersDefense.partChainmaille, TinkersDefense.partArmorplate, TinkerTools.toughRod); + TConstructRegistry.addToolRecipe(armor_TinkerBreastplate, TinkerTools.largePlate, TinkerTools.toughRod, TinkersDefense.partArmorplate, TinkersDefense.partChainmaille); + TConstructRegistry.addToolRecipe(armor_TinkerGrieves, TinkersDefense.partArmorplate, TinkerTools.toughRod, TinkersDefense.partChainmaille, TinkersDefense.partCloth); + TConstructRegistry.addToolRecipe(armor_TinkerSabatons, TinkersDefense.partArmorplate, TinkerTools.toughRod, TinkersDefense.partArmorplate, TinkersDefense.partCloth); + TConstructRegistry.addToolRecipe(armor_TinkerGauntlets, TinkersDefense.partArmorplate, TinkerTools.toughRod, TinkersDefense.partRivet); + + TConstructRegistry.addToolRecipe(armor_TinkerRobe, TinkersDefense.partCloth, TinkersDefense.partClasp, TinkersDefense.partCloth); + TConstructRegistry.addToolRecipe(armor_TinkerShawl, TinkersDefense.partCloth, TinkersDefense.partArmorplate, TinkersDefense.partCloth); + TConstructRegistry.addToolRecipe(armor_TinkerHood, TinkersDefense.partCloth, TinkerTools.toolRod, TinkersDefense.partCloth); + TConstructRegistry.addToolRecipe(armor_TinkerShoes, TinkersDefense.partCloth, TinkersDefense.partRivet, TinkersDefense.partCloth); + + TConstructRegistry.addToolRecipe(armor_TinkerCoif, TinkersDefense.partChainmaille, TinkersDefense.partCloth, TinkerTools.toughRod); + TConstructRegistry.addToolRecipe(armor_TinkerHauberk, TinkersDefense.partChainmaille, TinkerTools.largePlate, TinkersDefense.partCloth); + TConstructRegistry.addToolRecipe(armor_TinkerChausses, TinkersDefense.partChainmaille, TinkersDefense.partArmorplate, TinkersDefense.partCloth); + TConstructRegistry.addToolRecipe(armor_TinkerBoots, TinkersDefense.partChainmaille, TinkersDefense.partCloth, TinkersDefense.partRivet); + + TConstructRegistry.addToolRecipe(accessory_sheath, TinkersDefense.partCloth, TinkersDefense.partCloth, TinkersDefense.partCloth); + + } + + public void postInit(FMLPostInitializationEvent e) + { + + } + + public static void clientProxy(FlexibleToolRenderer renderer) + { + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.accessory_sheath, renderer); + + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerHelm, renderer); + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerBreastplate, renderer); + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerGrieves, renderer); + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerSabatons, renderer); + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerGauntlets, renderer); + + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerRobe, renderer); + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerShawl, renderer); + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerHood, renderer); + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerShoes, renderer); + + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerCoif, renderer); + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerHauberk, renderer); + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerChausses, renderer); + MinecraftForgeClient.registerItemRenderer(TDArmorAddon.armor_TinkerBoots, renderer); + } +} diff --git a/src/main/java/lance5057/tDefense/armor/TDHelmet.java b/src/main/java/lance5057/tDefense/armor/TDHelmet.java new file mode 100644 index 0000000..89bfb44 --- /dev/null +++ b/src/main/java/lance5057/tDefense/armor/TDHelmet.java @@ -0,0 +1,49 @@ +package lance5057.tDefense.armor; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import thaumcraft.api.IGoggles; +import thaumcraft.api.nodes.IRevealer; +import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; +import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge; +import cpw.mods.fml.common.Optional; + +@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IGoggles", striprefs = true), @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.nodes.IRevealer", striprefs = true), @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IVisDiscountGear", striprefs = true), @Optional.Interface(modid = "Botania", iface = "vazkii.botania.api.mana.IManaDiscountArmor", striprefs = true), @Optional.Interface(modid = "Botania", iface = "vazkii.botania.api.wand.IWandHUD", striprefs = true), @Optional.Interface(modid = "AWWayofTime", iface = "WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge", striprefs = true), @Optional.Interface(modid = "AWWayofTime", iface = "WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles", striprefs = true)}) +public abstract class TDHelmet extends ArmorCore implements IRevealer, IGoggles, ILPGauge, IAlchemyGoggles +{ + + public TDHelmet(int baseProtection, int slot) + { + super(baseProtection, slot); + } + + @Override + @Optional.Method(modid = "Thaumcraft") + public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) + { + return itemstack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Revealing"); + } + + @Override + @Optional.Method(modid = "Thaumcraft") + public boolean showNodes(ItemStack itemstack, EntityLivingBase player) + { + return itemstack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Revealing"); + } + + @Override + @Optional.Method(modid = "AWWayofTime") + public boolean canSeeLPBar(ItemStack stack) + { + return stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Divination"); + } + + @Override + @Optional.Method(modid = "AWWayofTime") + public boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player) + { + return stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Divination"); + } +} diff --git a/src/main/java/lance5057/tDefense/armor/blocks/UnstableItemBlock.java b/src/main/java/lance5057/tDefense/armor/blocks/UnstableItemBlock.java index 0b1c18d..04770c4 100644 --- a/src/main/java/lance5057/tDefense/armor/blocks/UnstableItemBlock.java +++ b/src/main/java/lance5057/tDefense/armor/blocks/UnstableItemBlock.java @@ -1,6 +1,6 @@ package lance5057.tDefense.armor.blocks; -import lance5057.tDefense.TinkersDefense; +import lance5057.tDefense.armor.TDArmorAddon; import net.minecraft.block.Block; import net.minecraft.item.ItemBlockWithMetadata; import net.minecraft.item.ItemStack; @@ -16,6 +16,6 @@ public class UnstableItemBlock extends ItemBlockWithMetadata @Override public String getUnlocalizedName(ItemStack stack) { - return this.getUnlocalizedName() + "_" + ((UnstableBlock) TinkersDefense.block_Unstable).types[stack.getItemDamage()]; + return this.getUnlocalizedName() + "_" + ((UnstableBlock) TDArmorAddon.block_Unstable).types[stack.getItemDamage()]; } } diff --git a/src/main/java/lance5057/tDefense/armor/events/ArmorModEvents.java b/src/main/java/lance5057/tDefense/armor/events/ArmorModEvents.java index 90a3088..a548922 100644 --- a/src/main/java/lance5057/tDefense/armor/events/ArmorModEvents.java +++ b/src/main/java/lance5057/tDefense/armor/events/ArmorModEvents.java @@ -1,5 +1,6 @@ package lance5057.tDefense.armor.events; +import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.items.cloth.TinkersRobe; import lance5057.tDefense.armor.items.heavy.TinkersGrieves; @@ -59,8 +60,8 @@ public class ArmorModEvents float adjustedPerc = (float) (1f - (epf * 0.04)); event.ammount = adjustedPerc * event.ammount; - - if(event.entityLiving instanceof EntityPlayer) + + if(TinkersDefense.config.debug && event.entityLiving instanceof EntityPlayer) { ((EntityPlayer) event.entityLiving).addChatComponentMessage(new ChatComponentText(event.source.getDamageType() + " - Adjusted: " + Double.toString(event.ammount))); } diff --git a/src/main/java/lance5057/tDefense/armor/events/ArmorRenderEvent.java b/src/main/java/lance5057/tDefense/armor/events/ArmorRenderEvent.java index 99eedbe..adaf76a 100644 --- a/src/main/java/lance5057/tDefense/armor/events/ArmorRenderEvent.java +++ b/src/main/java/lance5057/tDefense/armor/events/ArmorRenderEvent.java @@ -2,6 +2,7 @@ package lance5057.tDefense.armor.events; import tconstruct.armor.ArmorProxyClient; import tconstruct.armor.player.ArmorExtended; +import tconstruct.library.tools.ToolCore; import lance5057.tDefense.armor.ArmorCore; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.player.EntityPlayer; @@ -26,7 +27,7 @@ public class ArmorRenderEvent ItemStack Armor = event.entityPlayer.inventory.armorItemInSlot(event.slot); - if(Armor != null) + if(Armor != null && Armor.getItem() instanceof ArmorCore) { ModelBiped armorModel = Armor.getItem().getArmorModel(event.entityLiving, Armor, event.slot); @@ -35,7 +36,7 @@ public class ArmorRenderEvent ItemStack Accessory = armorEx.getStackInSlot(event.slot); - if(Accessory != null) + if(Accessory != null && Accessory.getItem() instanceof ToolCore) { ModelBiped accessoryModel = Accessory.getItem().getArmorModel(event.entityLiving, Accessory, event.slot); diff --git a/src/main/java/lance5057/tDefense/armor/items/Mask.java b/src/main/java/lance5057/tDefense/armor/items/Mask.java deleted file mode 100644 index c9557a0..0000000 --- a/src/main/java/lance5057/tDefense/armor/items/Mask.java +++ /dev/null @@ -1,116 +0,0 @@ -package lance5057.tDefense.armor.items; - -import lance5057.tDefense.armor.renderers.ModelSheath; -import lance5057.tDefense.armor.renderers.ModelMask; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import tconstruct.library.accessory.IAccessory; -import tconstruct.library.accessory.IAccessoryModel; -import tconstruct.library.tools.ToolCore; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class Mask extends ToolCore implements IAccessoryModel, IAccessory -{ - - public Mask() - { - super(0); - } - - @Override - public boolean canEquipAccessory(ItemStack item, int slot) - { - return slot == 0; - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) - { - String color[] = new String[10]; - - for(int i = 0; i < 10; i++) - color[i] = Integer.toHexString(this.getColorFromItemStack(itemStack, i)); - - return new ModelMask(color); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) - { - return "tinkersdefense:textures/armor/Mask/_mask_face.png"; - } - - ResourceLocation texture = new ResourceLocation("tinkersdefense", "textures/armor/Mask/_mask_face.png"); - - @Override - @SideOnly(Side.CLIENT) - public ResourceLocation getWearbleTexture(Entity entity, ItemStack stack, int slot) - { - return texture; - } - - @Override - public Item getAccessoryItem() - { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getDefaultFolder() - { - // TODO Auto-generated method stub - return "Armor/Mask"; - } - - @Override - public String getEffectSuffix() - { - return "_mask_effect"; - } - - @Override - public Item getHeadItem() - { - // TODO Auto-generated method stub - return null; - } - - @SideOnly(Side.CLIENT) - @Override - public int getPartAmount() - { - return 3; - } - - @Override - public String getIconSuffix(int partType) - { - switch(partType) - { - case 0: - return "_mask_face"; - case 1: - return "hurdur"; //useless - case 2: - return "_mask_clasp"; - case 3: - return "_mask_strap"; - default: - return ""; - } - } - - @Override - public String[] getTraits() - { - return new String[] {"mask", "cosmetic"}; - } - -} diff --git a/src/main/java/lance5057/tDefense/armor/items/Sheath.java b/src/main/java/lance5057/tDefense/armor/items/Sheath.java index e9db2db..ca4b44e 100644 --- a/src/main/java/lance5057/tDefense/armor/items/Sheath.java +++ b/src/main/java/lance5057/tDefense/armor/items/Sheath.java @@ -2,13 +2,10 @@ package lance5057.tDefense.armor.items; import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; -import lance5057.tDefense.armor.parts.ClothMaterial; +import lance5057.tDefense.armor.renderers.ArmorRenderer; import lance5057.tDefense.proxy.ClientProxy; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import tconstruct.library.TConstructRegistry; import tconstruct.library.accessory.IAccessory; import tconstruct.tools.TinkerTools; import cpw.mods.fml.relauncher.Side; @@ -19,7 +16,7 @@ public class Sheath extends ArmorCore implements IAccessory public Sheath() { - super(0,-1); + super(0, -1); } @Override @@ -29,25 +26,6 @@ public class Sheath extends ArmorCore implements IAccessory } @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)); - - int HandleID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderExtra"); - - color[3] = Integer.toHexString(TConstructRegistry.getCustomMaterial(HandleID, ClothMaterial.class).color); - - //String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(4), this.getIconSuffix(3)}; - - ClientProxy.sheath.SetColors(color, this.getDefaultFolder(), itemStack); - return ClientProxy.sheath; - } - - @Override public Item getHeadItem() { return TinkersDefense.partArmorplate; @@ -62,15 +40,15 @@ public class Sheath extends ArmorCore implements IAccessory @Override public Item getAccessoryItem() { - return TinkersDefense.partClasp; - } - - @Override - public Item getExtraItem() - { return TinkersDefense.partCloth; } + // @Override + // public Item getExtraItem() + // { + // return TinkersDefense.partCloth; + // } + @Override public String getDefaultFolder() { @@ -88,7 +66,7 @@ public class Sheath extends ArmorCore implements IAccessory @Override public int getPartAmount() { - return 4; + return 3; } @Override @@ -97,15 +75,15 @@ public class Sheath extends ArmorCore implements IAccessory switch(partType) { case 0: - return "_sheath_base"; + return "_tabard_cloth"; case 1: return "_shield_base_broken"; //useless case 2: - return "_sheath_filigree"; + return "_tabard_trim"; case 3: - return "_sheath_belt"; - case 4: - return "_sheath_clasp"; + return "_tabard_filigree"; + // case 4: + // return "_sheath_clasp"; default: return ""; } @@ -117,4 +95,11 @@ public class Sheath extends ArmorCore implements IAccessory return new String[] {"sheath", "cosmetic"}; } + @Override + public ArmorRenderer getRenderer() + { + // TODO Auto-generated method stub + return ClientProxy.sheath; + } + } diff --git a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersGauntlets.java b/src/main/java/lance5057/tDefense/armor/items/TinkersGauntlets.java index 312d200..91f10f1 100644 --- a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersGauntlets.java +++ b/src/main/java/lance5057/tDefense/armor/items/TinkersGauntlets.java @@ -1,30 +1,21 @@ -package lance5057.tDefense.armor.items.heavy; +package lance5057.tDefense.armor.items; import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; +import lance5057.tDefense.armor.renderers.ArmorRenderer; 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 ArmorCore implements IAccessory { public TinkersGauntlets() { - super(0,-1); - this.setUnlocalizedName("tinkersgauntlets"); + super(0, -1); + setUnlocalizedName("tinkersgauntlets"); } @Override @@ -132,17 +123,8 @@ public class TinkersGauntlets extends ArmorCore implements IAccessory } @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + public ArmorRenderer getRenderer() { - 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(), itemStack); return ClientProxy.gauntlets; } } 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 aba5909..ec775a2 100644 --- a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersHood.java +++ b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersHood.java @@ -1,35 +1,26 @@ package lance5057.tDefense.armor.items.cloth; import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; -import lance5057.tDefense.armor.parts.ClothMaterial; +import lance5057.tDefense.armor.TDHelmet; +import lance5057.tDefense.armor.renderers.ArmorRenderer; 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; -import net.minecraft.nbt.NBTTagCompound; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.tools.CustomMaterial; -import thaumcraft.api.IGoggles; +import tconstruct.tools.TinkerTools; import thaumcraft.api.IVisDiscountGear; import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.nodes.IRevealer; +import vazkii.botania.api.mana.IManaDiscountArmor; import cpw.mods.fml.common.Optional; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IGoggles", striprefs = true), - @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.nodes.IRevealer", striprefs = true), - @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IVisDiscountGear", striprefs = true)}) -public class TinkersHood extends ArmorCore implements IRevealer, IGoggles, IVisDiscountGear +@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IVisDiscountGear", striprefs = true), @Optional.Interface(modid = "Botania", iface = "vazkii.botania.api.mana.IManaDiscountArmor", striprefs = true)}) +public class TinkersHood extends TDHelmet implements IVisDiscountGear, IManaDiscountArmor { public TinkersHood() { super(0, 0); - this.setUnlocalizedName("tinkershood"); + setUnlocalizedName("tinkershood"); } @Override @@ -41,13 +32,13 @@ public class TinkersHood extends ArmorCore implements IRevealer, IGoggles, IVisD @Override public Item getHandleItem() { - return TinkersDefense.partCloth; + return TinkerTools.toolRod; } @Override public Item getAccessoryItem() { - return TinkersDefense.partRivet; + return TinkersDefense.partCloth; } @Override @@ -90,9 +81,9 @@ public class TinkersHood extends ArmorCore implements IRevealer, IGoggles, IVisD case 1: return "_hood_cloth_broken"; case 2: - return "_hood_trim"; + return "_hood_metal"; case 3: - return "_hood_rivet"; + return "_hood_trim"; default: return ""; } @@ -130,29 +121,6 @@ public class TinkersHood extends ArmorCore implements IRevealer, IGoggles, IVisD } @Override - @SideOnly(Side.CLIENT) - 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)}; - - 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); - - newColor = TConstructRegistry.getCustomMaterial(HandleID, ClothMaterial.class); - color[0] = Integer.toHexString(newColor.color); - - ClientProxy.hood.SetColors(color, this.getDefaultFolder(), itemStack); - return ClientProxy.hood; - } - - @Override public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { return 0; @@ -160,22 +128,21 @@ public class TinkersHood extends ArmorCore implements IRevealer, IGoggles, IVisD @Override @Optional.Method(modid = "Thaumcraft") - public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return itemstack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Revealing"); + return stack.getTagCompound().getCompoundTag("InfiTool").getInteger("VisEmbroidery"); } @Override - @Optional.Method(modid = "Thaumcraft") - public boolean showNodes(ItemStack itemstack, EntityLivingBase player) + public ArmorRenderer getRenderer() { - return itemstack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Revealing"); + return ClientProxy.hood; } @Override - @Optional.Method(modid = "Thaumcraft") - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) + public float getDiscount(ItemStack stack, int arg1, EntityPlayer arg2) { - return stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Vis Embroidery"); + final float i = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("ManaEmbroidery") / 100f; + return i; } } 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 311d971..28027cd 100644 --- a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersRobe.java +++ b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersRobe.java @@ -1,32 +1,25 @@ package lance5057.tDefense.armor.items.cloth; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.tools.CustomMaterial; -import thaumcraft.api.IVisDiscountGear; -import thaumcraft.api.aspects.Aspect; 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.armor.renderers.ArmorRenderer; 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; -import net.minecraft.nbt.NBTTagCompound; +import thaumcraft.api.IVisDiscountGear; +import thaumcraft.api.aspects.Aspect; +import vazkii.botania.api.mana.IManaDiscountArmor; +import cpw.mods.fml.common.Optional; -@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IVisDiscountGear", striprefs = true)}) -public class TinkersRobe extends ArmorCore implements IVisDiscountGear +@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IVisDiscountGear", striprefs = true), @Optional.Interface(modid = "Botania", iface = "vazkii.botania.api.mana.IManaDiscountArmor", striprefs = true)}) +public class TinkersRobe extends ArmorCore implements IVisDiscountGear, IManaDiscountArmor { public TinkersRobe() { super(0, 2); - this.setUnlocalizedName("tinkerrobe"); + setUnlocalizedName("tinkerrobe"); } @Override @@ -38,6 +31,12 @@ public class TinkersRobe extends ArmorCore implements IVisDiscountGear @Override public Item getHandleItem() { + return TinkersDefense.partClasp; + } + + @Override + public Item getAccessoryItem() + { return TinkersDefense.partCloth; } @@ -68,7 +67,7 @@ public class TinkersRobe extends ArmorCore implements IVisDiscountGear @Override public int getPartAmount() { - return 2; + return 3; } @Override @@ -81,6 +80,8 @@ public class TinkersRobe extends ArmorCore implements IVisDiscountGear case 1: return "_robe_cloth_broken"; case 2: + return "_robe_metal"; + case 3: return "_robe_trim"; default: return ""; @@ -119,38 +120,29 @@ public class TinkersRobe extends ArmorCore implements IVisDiscountGear } @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - String[] color = new String[10]; - //String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; - - 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); - - newColor = TConstructRegistry.getCustomMaterial(HandleID, ClothMaterial.class); - color[0] = Integer.toHexString(newColor.color); + return 0; + } - ClientProxy.robe.SetColors(color, this.getDefaultFolder(), itemStack); - return ClientProxy.robe; + @Override + @Optional.Method(modid = "Thaumcraft") + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) + { + final int vis = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("VisEmbroidery"); + return vis; } @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) + public ArmorRenderer getRenderer() { - return 0; + return ClientProxy.robe; } @Override - @Optional.Method(modid = "Thaumcraft") - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) + public float getDiscount(ItemStack stack, int arg1, EntityPlayer arg2) { - return stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Vis Embroidery"); + final float i = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("ManaEmbroidery") / 100f; + return i; } } 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 4fa23d0..8df9b42 100644 --- a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShawl.java +++ b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShawl.java @@ -1,34 +1,25 @@ package lance5057.tDefense.armor.items.cloth; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import lance5057.tDefense.TinkersDefense; 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.armor.renderers.ArmorRenderer; 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; -import net.minecraft.nbt.NBTTagCompound; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.tools.CustomMaterial; -import tconstruct.tools.TinkerTools; import thaumcraft.api.IVisDiscountGear; import thaumcraft.api.aspects.Aspect; +import vazkii.botania.api.mana.IManaDiscountArmor; +import cpw.mods.fml.common.Optional; -@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IVisDiscountGear", striprefs = true)}) -public class TinkersShawl extends ArmorCore implements IVisDiscountGear +@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IVisDiscountGear", striprefs = true), @Optional.Interface(modid = "Botania", iface = "vazkii.botania.api.mana.IManaDiscountArmor", striprefs = true)}) +public class TinkersShawl extends ArmorCore implements IVisDiscountGear, IManaDiscountArmor { public TinkersShawl() { super(0, 1); - this.setUnlocalizedName("tinkersshawl"); + setUnlocalizedName("tinkersshawl"); } @Override @@ -40,13 +31,14 @@ public class TinkersShawl extends ArmorCore implements IVisDiscountGear @Override public Item getHandleItem() { - return TinkersDefense.partCloth; + return TinkersDefense.partArmorplate; } @Override public Item getAccessoryItem() { - return TinkersDefense.partClasp; + return TinkersDefense.partCloth; + } @Override @@ -89,9 +81,9 @@ public class TinkersShawl extends ArmorCore implements IVisDiscountGear case 1: return "_shawl_cloth_broken"; case 2: - return "_shawl_trim"; + return "_shawl_metal"; case 3: - return "_shawl_clasp"; + return "_shawl_trim"; default: return ""; } @@ -129,29 +121,6 @@ public class TinkersShawl extends ArmorCore implements IVisDiscountGear } @Override - @SideOnly(Side.CLIENT) - 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)}; - - 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); - - newColor = TConstructRegistry.getCustomMaterial(HandleID, ClothMaterial.class); - color[0] = Integer.toHexString(newColor.color); - - ClientProxy.shawl.SetColors(color, this.getDefaultFolder(), itemStack); - return ClientProxy.shawl; - } - - @Override public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { return 0; @@ -161,7 +130,21 @@ public class TinkersShawl extends ArmorCore implements IVisDiscountGear @Optional.Method(modid = "Thaumcraft") public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - int test = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("VisEmbroidery"); + final int test = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("VisEmbroidery"); return test; } + + @Override + public ArmorRenderer getRenderer() + { + // TODO Auto-generated method stub + return ClientProxy.shawl; + } + + @Override + public float getDiscount(ItemStack stack, int arg1, EntityPlayer arg2) + { + final float i = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("ManaEmbroidery") / 100f; + return i; + } } 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 95e6840..8f4f795 100644 --- a/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShoes.java +++ b/src/main/java/lance5057/tDefense/armor/items/cloth/TinkersShoes.java @@ -1,32 +1,25 @@ package lance5057.tDefense.armor.items.cloth; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; 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.armor.renderers.ArmorRenderer; 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; -import net.minecraft.nbt.NBTTagCompound; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.tools.CustomMaterial; import thaumcraft.api.IVisDiscountGear; import thaumcraft.api.aspects.Aspect; +import vazkii.botania.api.mana.IManaDiscountArmor; +import cpw.mods.fml.common.Optional; -@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IVisDiscountGear", striprefs = true)}) -public class TinkersShoes extends ArmorCore implements IVisDiscountGear +@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IVisDiscountGear", striprefs = true), @Optional.Interface(modid = "Botania", iface = "vazkii.botania.api.mana.IManaDiscountArmor", striprefs = true)}) +public class TinkersShoes extends ArmorCore implements IVisDiscountGear, IManaDiscountArmor { public TinkersShoes() { super(0, 3); - this.setUnlocalizedName("tinkersshoes"); + setUnlocalizedName("tinkersshoes"); } @Override @@ -38,13 +31,13 @@ public class TinkersShoes extends ArmorCore implements IVisDiscountGear @Override public Item getHandleItem() { - return TinkersDefense.partClasp; + return TinkersDefense.partRivet; } @Override public Item getAccessoryItem() { - return TinkersDefense.partRivet; + return TinkersDefense.partCloth; } @Override @@ -87,9 +80,9 @@ public class TinkersShoes extends ArmorCore implements IVisDiscountGear case 1: return "_shoes_cloth_broken"; case 2: - return "_shoes_clasp"; + return "_shoes_metal"; case 3: - return "_shoes_rivet"; + return "_shoes_sole"; default: return ""; } @@ -127,34 +120,28 @@ public class TinkersShoes extends ArmorCore implements IVisDiscountGear } @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - String[] color = new String[10]; - //String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; - - 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 0; + } - ClientProxy.shoes.SetColors(color, this.getDefaultFolder(), itemStack); - return ClientProxy.shoes; + @Override + @Optional.Method(modid = "Thaumcraft") + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) + { + return stack.getTagCompound().getCompoundTag("InfiTool").getInteger("VisEmbroidery"); } @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) + public ArmorRenderer getRenderer() { - return 0; + return ClientProxy.shoes; } @Override - @Optional.Method(modid = "Thaumcraft") - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) + public float getDiscount(ItemStack stack, int arg1, EntityPlayer arg2) { - return stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Vis Embroidery"); + final float i = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("ManaEmbroidery") / 100f; + return i; } } diff --git a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersBreastplate.java b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersBreastplate.java index e378619..fa1c2e5 100644 --- a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersBreastplate.java +++ b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersBreastplate.java @@ -1,22 +1,12 @@ package lance5057.tDefense.armor.items.heavy; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; -import lance5057.tDefense.armor.renderers.heavy.ModelTinkersBreastplate; -import lance5057.tDefense.armor.renderers.heavy.ModelTinkersHelm; +import lance5057.tDefense.armor.renderers.ArmorRenderer; 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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import net.minecraftforge.common.ISpecialArmor.ArmorProperties; import tconstruct.tools.TinkerTools; public class TinkersBreastplate extends ArmorCore @@ -24,8 +14,8 @@ public class TinkersBreastplate extends ArmorCore public TinkersBreastplate() { super(2, 1); - this.setUnlocalizedName("tinkersbreastplate"); - this.maxReduction = 100; + setUnlocalizedName("tinkersbreastplate"); + maxReduction = 100; reductionPercent = 8 * 0.04f; } @@ -115,14 +105,6 @@ public class TinkersBreastplate extends ArmorCore return "armor/breastplate"; } - // @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) { @@ -136,16 +118,8 @@ public class TinkersBreastplate extends ArmorCore } @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + public ArmorRenderer getRenderer() { - 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), this.getIconSuffix(4)}; - ClientProxy.breastplate.SetColors(color, this.getDefaultFolder(), itemStack); return ClientProxy.breastplate; } } diff --git a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersGrieves.java b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersGrieves.java index 6bfb8d1..7bfa98c 100644 --- a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersGrieves.java +++ b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersGrieves.java @@ -1,21 +1,12 @@ package lance5057.tDefense.armor.items.heavy; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; -import lance5057.tDefense.armor.renderers.heavy.ModelTinkersGrieves; +import lance5057.tDefense.armor.renderers.ArmorRenderer; 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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import net.minecraftforge.common.ISpecialArmor.ArmorProperties; import tconstruct.tools.TinkerTools; public class TinkersGrieves extends ArmorCore @@ -23,8 +14,8 @@ public class TinkersGrieves extends ArmorCore public TinkersGrieves() { super(2, 2); - this.setUnlocalizedName("tinkergrieves"); - this.maxReduction = 100; + setUnlocalizedName("tinkergrieves"); + maxReduction = 100; reductionPercent = 6 * 0.04f; } @@ -49,7 +40,7 @@ public class TinkersGrieves extends ArmorCore @Override public Item getExtraItem() { - return TinkersDefense.partArmorplate; + return TinkersDefense.partCloth; } @Override @@ -96,7 +87,7 @@ public class TinkersGrieves extends ArmorCore case 3: return "_grieves_chain"; case 4: - return "_grieves_cod"; + return "_grieves_cloth"; default: return ""; } @@ -134,16 +125,8 @@ public class TinkersGrieves extends ArmorCore } @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + public ArmorRenderer getRenderer() { - 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), this.getIconSuffix(4)}; - ClientProxy.grieves.SetColors(color, this.getDefaultFolder(), itemStack); return ClientProxy.grieves; } } 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 135e948..143cab0 100644 --- a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersHelm.java +++ b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersHelm.java @@ -1,28 +1,21 @@ package lance5057.tDefense.armor.items.heavy; import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; +import lance5057.tDefense.armor.TDHelmet; +import lance5057.tDefense.armor.renderers.ArmorRenderer; 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 tconstruct.tools.TinkerTools; -import thaumcraft.api.IGoggles; -import thaumcraft.api.nodes.IRevealer; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IGoggles", striprefs = true), @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.nodes.IRevealer", striprefs = true)}) -public class TinkersHelm extends ArmorCore implements IRevealer, IGoggles + +public class TinkersHelm extends TDHelmet { public TinkersHelm() { super(2, 0); - this.setUnlocalizedName("tinkershelm"); - this.maxReduction = 100; + setUnlocalizedName("tinkershelm"); + maxReduction = 100; reductionPercent = 3 * 0.04f; } @@ -35,7 +28,7 @@ public class TinkersHelm extends ArmorCore implements IRevealer, IGoggles @Override public Item getHandleItem() { - return TinkerTools.toughRod; + return TinkersDefense.partChainmaille; } @Override @@ -45,6 +38,12 @@ public class TinkersHelm extends ArmorCore implements IRevealer, IGoggles } @Override + public Item getExtraItem() + { + return TinkerTools.toughRod; + } + + @Override public int durabilityTypeAccessory() { return 2; @@ -71,7 +70,7 @@ public class TinkersHelm extends ArmorCore implements IRevealer, IGoggles @Override public int getPartAmount() { - return 3; + return 4; } @Override @@ -84,9 +83,11 @@ public class TinkersHelm extends ArmorCore implements IRevealer, IGoggles case 1: return "_helm_top_broken"; case 2: - return "_helm_visor"; - case 3: return "_helm_chain"; + case 3: + return "_helm_plate"; + case 4: + return "_helm_visor"; default: return ""; } @@ -124,30 +125,8 @@ public class TinkersHelm extends ArmorCore implements IRevealer, IGoggles } @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + public ArmorRenderer getRenderer() { - 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), this.getIconSuffix(4)}; - ClientProxy.helm.SetColors(color, this.getDefaultFolder(), itemStack); return ClientProxy.helm; } - - @Override - @Optional.Method(modid = "Thaumcraft") - public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) - { - return itemstack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Revealing"); - } - - @Override - @Optional.Method(modid = "Thaumcraft") - public boolean showNodes(ItemStack itemstack, EntityLivingBase player) - { - return itemstack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Revealing"); - } } diff --git a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersSabatons.java b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersSabatons.java index 64447b2..35a3348 100644 --- a/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersSabatons.java +++ b/src/main/java/lance5057/tDefense/armor/items/heavy/TinkersSabatons.java @@ -1,24 +1,12 @@ package lance5057.tDefense.armor.items.heavy; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; -import lance5057.tDefense.armor.parts.ClothMaterial; -import lance5057.tDefense.armor.renderers.heavy.ModelTinkersSabatons; +import lance5057.tDefense.armor.renderers.ArmorRenderer; 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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.DamageSource; -import net.minecraftforge.common.ISpecialArmor.ArmorProperties; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.tools.CustomMaterial; import tconstruct.tools.TinkerTools; public class TinkersSabatons extends ArmorCore @@ -26,8 +14,8 @@ public class TinkersSabatons extends ArmorCore public TinkersSabatons() { super(2, 3); - this.setUnlocalizedName("tinkersabatons"); - this.maxReduction = 100; + setUnlocalizedName("tinkersabatons"); + maxReduction = 100; reductionPercent = 3 * 0.04f; } @@ -137,21 +125,8 @@ public class TinkersSabatons extends ArmorCore } @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + public ArmorRenderer getRenderer() { - String[] color = new String[10]; - - for(int j = 0; j < 10; j++) - color[j] = Integer.toHexString(itemStack.getItem().getColorFromItemStack(itemStack, j)); - - int ExtraID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderExtra"); - - CustomMaterial newColor = TConstructRegistry.getCustomMaterial(ExtraID, ClothMaterial.class); - color[3] = Integer.toHexString(newColor.color); - - //String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3), this.getIconSuffix(4)}; - ClientProxy.sabatons.SetColors(color, this.getDefaultFolder(), itemStack); return ClientProxy.sabatons; } } 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 ce81f83..f84bc3e 100644 --- a/src/main/java/lance5057/tDefense/armor/items/light/TinkersBoots.java +++ b/src/main/java/lance5057/tDefense/armor/items/light/TinkersBoots.java @@ -1,33 +1,22 @@ package lance5057.tDefense.armor.items.light; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; 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.armor.renderers.light.ModelTinkersBoots; +import lance5057.tDefense.armor.renderers.ArmorRenderer; 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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraftforge.common.ISpecialArmor.ArmorProperties; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.tools.CustomMaterial; public class TinkersBoots extends ArmorCore { public TinkersBoots() { super(1, 3); - this.setUnlocalizedName("tinkersboots"); - this.maxReduction = 100; - this.reductionPercent = 0.08f; + setUnlocalizedName("tinkersboots"); + maxReduction = 100; + reductionPercent = 0.08f; } @Override @@ -128,27 +117,14 @@ public class TinkersBoots extends ArmorCore } @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - String[] color = new String[10]; - - 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(AccessoryID, ClothMaterial.class); - color[0] = Integer.toHexString(newColor.color); - - //String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; - ClientProxy.boots.SetColors(color, this.getDefaultFolder(), itemStack); - return ClientProxy.boots; + return 2; } @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) + public ArmorRenderer getRenderer() { - return 2; + return ClientProxy.boots; } } 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 852f95f..a088f54 100644 --- a/src/main/java/lance5057/tDefense/armor/items/light/TinkersChausses.java +++ b/src/main/java/lance5057/tDefense/armor/items/light/TinkersChausses.java @@ -1,32 +1,24 @@ package lance5057.tDefense.armor.items.light; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; 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.armor.renderers.ArmorRenderer; 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; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; -import net.minecraftforge.common.ISpecialArmor.ArmorProperties; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.tools.CustomMaterial; public class TinkersChausses extends ArmorCore { public TinkersChausses() { super(1, 2); - this.setUnlocalizedName("tinkerschausses"); - this.maxReduction = 100; - this.reductionPercent = 0.2f; + setUnlocalizedName("tinkerschausses"); + maxReduction = 100; + reductionPercent = 0.2f; } @Override @@ -42,6 +34,12 @@ public class TinkersChausses extends ArmorCore } @Override + public Item getAccessoryItem() + { + return TinkersDefense.partCloth; + } + + @Override public int durabilityTypeAccessory() { return 1; @@ -68,7 +66,7 @@ public class TinkersChausses extends ArmorCore @Override public int getPartAmount() { - return 2; + return 3; } @Override @@ -82,6 +80,8 @@ public class TinkersChausses extends ArmorCore return "_chausses_chain_broken"; case 2: return "_chausses_plate"; + case 3: + return "_chausses_cloth"; default: return ""; } @@ -119,20 +119,6 @@ public class TinkersChausses extends ArmorCore } @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)}; - ClientProxy.chausses.SetColors(color, this.getDefaultFolder(), itemStack); - return ClientProxy.chausses; - } - - @Override public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { return 5; @@ -141,8 +127,14 @@ public class TinkersChausses extends ArmorCore @Override public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - ArmorProperties armorp = new ArmorProperties(0, 0.2, 100); //0.04 per half shirt + final ArmorProperties armorp = new ArmorProperties(0, 0.2, 100); //0.04 per half shirt //((EntityPlayer)player).addChatComponentMessage(new ChatComponentText(Double.toString(damage))); return armorp; } + + @Override + public ArmorRenderer getRenderer() + { + return ClientProxy.chausses; + } } 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 ba0db3d..71b0199 100644 --- a/src/main/java/lance5057/tDefense/armor/items/light/TinkersCoif.java +++ b/src/main/java/lance5057/tDefense/armor/items/light/TinkersCoif.java @@ -1,34 +1,25 @@ package lance5057.tDefense.armor.items.light; import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; -import lance5057.tDefense.armor.parts.ClothMaterial; +import lance5057.tDefense.armor.TDHelmet; +import lance5057.tDefense.armor.renderers.ArmorRenderer; 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; import net.minecraft.util.DamageSource; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.tools.CustomMaterial; import tconstruct.tools.TinkerTools; -import thaumcraft.api.IGoggles; -import thaumcraft.api.nodes.IRevealer; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@Optional.InterfaceList({@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IGoggles", striprefs = true), @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.nodes.IRevealer", striprefs = true)}) -public class TinkersCoif extends ArmorCore implements IRevealer, IGoggles + +public class TinkersCoif extends TDHelmet { public TinkersCoif() { super(1, 0); - this.setUnlocalizedName("tinkerscoif"); - this.maxReduction = 100; - this.reductionPercent = 0.08f; + setUnlocalizedName("tinkerscoif"); + maxReduction = 100; + reductionPercent = 0.08f; } @Override @@ -129,25 +120,6 @@ public class TinkersCoif extends ArmorCore implements IRevealer, IGoggles } @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)); - - int AccessoryID = itemStack.getTagCompound().getCompoundTag("InfiTool").getInteger("RenderHandle"); - - CustomMaterial newColor = TConstructRegistry.getCustomMaterial(AccessoryID, ClothMaterial.class); - color[0] = Integer.toHexString(newColor.color); - - //String[] textures = {this.getIconSuffix(2), this.getIconSuffix(0), this.getIconSuffix(3)}; - ClientProxy.coif.SetColors(color, this.getDefaultFolder(), itemStack); - return ClientProxy.coif; - } - - @Override public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { return 2; @@ -156,22 +128,15 @@ public class TinkersCoif extends ArmorCore implements IRevealer, IGoggles @Override public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - ArmorProperties armorp = new ArmorProperties(0, 0.08, 100); //0.04 per half shirt + final ArmorProperties armorp = new ArmorProperties(0, 0.08, 100); //0.04 per half shirt //((EntityPlayer)player).addChatComponentMessage(new ChatComponentText(Double.toString(damage))); return armorp; } @Override - @Optional.Method(modid = "Thaumcraft") - public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) + public ArmorRenderer getRenderer() { - return itemstack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Revealing"); - } - - @Override - @Optional.Method(modid = "Thaumcraft") - public boolean showNodes(ItemStack itemstack, EntityLivingBase player) - { - return itemstack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Revealing"); + // TODO Auto-generated method stub + return ClientProxy.coif; } } diff --git a/src/main/java/lance5057/tDefense/armor/items/light/TinkersHauberk.java b/src/main/java/lance5057/tDefense/armor/items/light/TinkersHauberk.java index 9e071a7..490e649 100644 --- a/src/main/java/lance5057/tDefense/armor/items/light/TinkersHauberk.java +++ b/src/main/java/lance5057/tDefense/armor/items/light/TinkersHauberk.java @@ -2,24 +2,22 @@ package lance5057.tDefense.armor.items.light; import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; +import lance5057.tDefense.armor.renderers.ArmorRenderer; 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; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import tconstruct.tools.TinkerTools; public class TinkersHauberk extends ArmorCore { public TinkersHauberk() { super(1, 1); - this.setUnlocalizedName("tinkershauberk"); - this.maxReduction = 100; - this.reductionPercent = 0.24f; + setUnlocalizedName("tinkershauberk"); + maxReduction = 100; + reductionPercent = 0.24f; } @Override @@ -31,13 +29,13 @@ public class TinkersHauberk extends ArmorCore @Override public Item getHandleItem() { - return TinkersDefense.partArmorplate; + return TinkerTools.largePlate; } @Override public Item getAccessoryItem() { - return TinkersDefense.partRivet; + return TinkersDefense.partCloth; } @Override @@ -82,7 +80,7 @@ public class TinkersHauberk extends ArmorCore case 2: return "_hauberk_plate"; case 3: - return "_hauberk_rivet"; + return "_hauberk_cloth"; default: return ""; } @@ -120,22 +118,14 @@ public class TinkersHauberk extends ArmorCore } @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - 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.hauberk.SetColors(color, this.getDefaultFolder(), itemStack); - return ClientProxy.hauberk; + return 6; } @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) + public ArmorRenderer getRenderer() { - return 6; + return ClientProxy.hauberk; } } diff --git a/src/main/java/lance5057/tDefense/armor/modifiers/ArmorMods.java b/src/main/java/lance5057/tDefense/armor/modifiers/ArmorMods.java index de0fc88..bbd6ad3 100644 --- a/src/main/java/lance5057/tDefense/armor/modifiers/ArmorMods.java +++ b/src/main/java/lance5057/tDefense/armor/modifiers/ArmorMods.java @@ -1,13 +1,18 @@ package lance5057.tDefense.armor.modifiers; -import lance5057.tDefense.Reference; import lance5057.tDefense.TDIntegration; import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.ArmorCore; +import lance5057.tDefense.armor.TDArmorAddon; import lance5057.tDefense.armor.items.cloth.TinkersRobe; import lance5057.tDefense.armor.items.heavy.TinkersGrieves; import lance5057.tDefense.armor.items.light.TinkersChausses; +import lance5057.tDefense.armor.modifiers.BloodMagic.BloodArmorMods; +import lance5057.tDefense.armor.modifiers.Botania.BotaniaArmorMods; import lance5057.tDefense.armor.modifiers.Thaumcraft.ThaumArmorMods; +import lance5057.tDefense.core.tools.modifiers.ModifierBoolExclusive; +import lance5057.tDefense.core.tools.modifiers.ModifierIntExclusive; +import lance5057.tDefense.core.tools.modifiers.ModifiersBase; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; @@ -22,7 +27,6 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import tconstruct.library.TConstructRegistry; import tconstruct.library.client.TConstructClientRegistry; @@ -34,111 +38,179 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.registry.GameRegistry; -public class ArmorMods +public class ArmorMods extends ModifiersBase { - ThaumArmorMods tcmods; - - Item item_Canister; - Item item_Emptycanister; - Item item_Rebreather; - Item item_NightvisionGoggles; - - Item item_Glowsole; - Item item_Firesole; - Item item_Icesole; - Item item_Feathersole; - Item item_Flippers; + ThaumArmorMods tcmods; + BotaniaArmorMods botmods; + BloodArmorMods bloodmods; + + // Item item_Canister; + // Item item_Emptycanister; + // Item item_Rebreather; + // Item item_NightvisionGoggles; + // + // Item item_Glowsole; + // Item item_Firesole; + // Item item_Icesole; + // Item item_Feathersole; + // Item item_Flippers; public ArmorMods() { + super(new String[] {"Canister", "EmptyCanister", "Rebreather", "NightvisionGoggles", "Glowstep", "Firewalker", "Frostwalker", "FeatherFall", "Flippers"}, "modItemsArmor"); FMLCommonHandler.instance().bus().register(this); - MinecraftForge.EVENT_BUS.register(this); - - LoadItems(); - } - - public void LoadItems() - { - //Head - 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_NightvisionGoggles = new Item().setCreativeTab(TinkersDefense.tabName).setMaxStackSize(1).setUnlocalizedName("NightvisionGoggles").setTextureName(Reference.MOD_ID + ":NightvisionGoggles"); - - //Feet - 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_NightvisionGoggles, "NightvisionGoggles"); - - 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"); if(TDIntegration.thaumcraft) { tcmods = new ThaumArmorMods(); - tcmods.LoadItems(); } - + if(TDIntegration.botania) + { + botmods = new BotaniaArmorMods(); + } + if(TDIntegration.bloodMagic) + { + bloodmods = new BloodArmorMods(); + } } + @Override public void RegisterRecipes() { - 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, 4)}); - GameRegistry.addShapedRecipe(new ItemStack(item_NightvisionGoggles), new Object[] {"-s-", "eie", "-d-", 's', new ItemStack(Items.potionitem, 1, Potion.nightVision.id), 'e', new ItemStack(Blocks.glass_pane, 1, 0), 'i', new ItemStack(Items.iron_ingot, 1, 0), 'd', new ItemStack(Items.dye, 1, 2)}); - - 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)}); + GameRegistry.addShapedRecipe(new ItemStack(modItems, 1, 0), new Object[] {"-c-", "ses", "-s-", 'c', new ItemStack( + Items.coal, 1, 1), 's', new ItemStack(Blocks.sapling, 1), 'e', new ItemStack( + modItems, 1, 1)}); + GameRegistry.addShapedRecipe(new ItemStack(modItems, 1, 1), 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(modItems, 1, 2), new Object[] {"-s-", "eie", "-d-", 's', new ItemStack( + Items.slime_ball, 1, 0), 'e', new ItemStack(modItems, 1, 1), 'i', new ItemStack( + TinkersDefense.partArmorplate, 1, 2), 'd', new ItemStack( + Items.dye, 1, 4)}); + GameRegistry.addShapedRecipe(new ItemStack(modItems, 1, 3), new Object[] {"-s-", "eie", "-d-", 's', new ItemStack( + Items.potionitem, 1, 8262), 'e', new ItemStack( + Blocks.glass_pane, 1, 0), 'i', new ItemStack(Items.iron_ingot, + 1, 0), 'd', new ItemStack(Items.dye, 1, 2)}); + + GameRegistry.addShapedRecipe(new ItemStack(modItems, 1, 4), 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(modItems, 1, 5), new Object[] {"lol", "oao", "lol", 'o', new ItemStack( + Blocks.obsidian, 1, 0), 'a', TConstructRegistry.getItemStack("ingotArdite"), 'l', TConstructRegistry.getItemStack("lavaCrystal")}); + GameRegistry.addShapedRecipe(new ItemStack(modItems, 1, 7), new Object[] {"fgf", 'g', new ItemStack( + Items.gold_nugget, 1, 0), 'f', new ItemStack(Items.feather, 1, + 0)}); + GameRegistry.addShapedRecipe(new ItemStack(modItems, 1, 6), 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(modItems, 1, 8), 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)}); if(TDIntegration.thaumcraft) { tcmods.RegisterRecipes(); } + if(TDIntegration.botania) + { + botmods.RegisterRecipes(); + } + if(TDIntegration.bloodMagic) + { + bloodmods.RegisterRecipes(); + } } + @Override public void RegisterModifiers() { //Head only - ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_Rebreather, 1, 0)}, TinkersDefense.config.ArmorRebreatherID, "Rebreather", EnumChatFormatting.GOLD.toString(), "Rebreather", new String[] {"head"}, 1, null)); - ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_NightvisionGoggles, 1, 0)}, TinkersDefense.config.ArmorNightvisionID, "Nightvision", EnumChatFormatting.GREEN.toString(), "Nightvision", new String[] {"head"}, 1, null)); - ModifyBuilder.registerModifier(new modifierIntExclusive(new ItemStack[] {new ItemStack(Items.ghast_tear, 1, 0)}, TinkersDefense.config.ArmorAntiBlindnessID, "AntiBlindness", 1, EnumChatFormatting.AQUA.toString(), "AntiBlindness", new String[] {"head"}, 1, null)); + ModifyBuilder.registerModifier(new ModifierBoolExclusive( + new ItemStack[] {new ItemStack(modItems, 1, 2)}, + TinkersDefense.config.ArmorRebreatherID, "Rebreather", + EnumChatFormatting.GOLD.toString(), "Rebreather", + new String[] {"head"}, 1, null)); + ModifyBuilder.registerModifier(new ModifierBoolExclusive( + new ItemStack[] {new ItemStack(modItems, 1, 3)}, + TinkersDefense.config.ArmorNightvisionID, "Nightvision", + EnumChatFormatting.GREEN.toString(), "Nightvision", + new String[] {"head"}, 1, null)); + ModifyBuilder.registerModifier(new ModifierIntExclusive( + new ItemStack[] {new ItemStack(Items.ghast_tear, 1, 0)}, + TinkersDefense.config.ArmorAntiBlindnessID, "AntiBlindness", 1, + EnumChatFormatting.AQUA.toString(), "AntiBlindness", + new String[] {"head"}, 1, null)); //ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(Blocks.pumpkin, 1, 0)}, TinkersDefense.config.ArmorPumpkinID, "Pumpkin", EnumChatFormatting.GOLD.toString(), "Pumpkin", new String[] {"head"}, 1, null)); //Legs only - ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(Blocks.sticky_piston, 1, 0)}, TinkersDefense.config.ArmorHighstepID, "Highstep", EnumChatFormatting.LIGHT_PURPLE.toString(), "Highstep", new String[] {"pants"}, 1, null)); - ModifyBuilder.registerModifier(new modifierIntExclusive(new ItemStack[] {new ItemStack(Blocks.redstone_block, 1, 0)}, TinkersDefense.config.ArmorSpeedID, "Speed", 1, EnumChatFormatting.DARK_RED.toString(), "Haste", new String[] {"pants"}, 1, null)); - ModifyBuilder.registerModifier(new modifierIntExclusive(new ItemStack[] {new ItemStack(Blocks.piston, 1, 0)}, TinkersDefense.config.ArmorJumpboostID, "Jump", 1, EnumChatFormatting.WHITE.toString(), "Jump Boost", new String[] {"pants"}, 1, null)); + ModifyBuilder.registerModifier(new ModifierBoolExclusive( + new ItemStack[] {new ItemStack(Blocks.sticky_piston, 1, 0)}, + TinkersDefense.config.ArmorHighstepID, "Highstep", + EnumChatFormatting.LIGHT_PURPLE.toString(), "Highstep", + new String[] {"pants"}, 1, null)); + ModifyBuilder.registerModifier(new ModifierIntExclusive( + new ItemStack[] {new ItemStack(Blocks.redstone_block, 1, 0)}, + TinkersDefense.config.ArmorSpeedID, "Speed", 1, + EnumChatFormatting.DARK_RED.toString(), "Haste", + new String[] {"pants"}, 1, null)); + ModifyBuilder.registerModifier(new ModifierIntExclusive( + new ItemStack[] {new ItemStack(Blocks.piston, 1, 0)}, + TinkersDefense.config.ArmorJumpboostID, "Jump", 1, + EnumChatFormatting.WHITE.toString(), "Jump Boost", + new String[] {"pants"}, 1, null)); //Excluding Cloth - ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(TinkersDefense.partArmorplate, 1, 2)}, TinkersDefense.config.ArmorProtectionID, 1, EnumChatFormatting.DARK_GRAY.toString(), "Protection")); - ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(Items.magma_cream, 1)}, TinkersDefense.config.ArmorFireProtectionID, 1, EnumChatFormatting.RED.toString(), "Fire Protection")); - ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(Blocks.wool, 1)}, TinkersDefense.config.ArmorBlastProtectionID, 1, EnumChatFormatting.DARK_GREEN.toString(), "Blast Protection")); - ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(TinkersDefense.partRivet, 1, 2)}, TinkersDefense.config.ArmorProjectileProtectionID, 1, EnumChatFormatting.GRAY.toString(), "Projectile Protection")); - ModifyBuilder.registerModifier(new modifierProtection(new ItemStack[] {new ItemStack(item_Feathersole, 1, 0)}, TinkersDefense.config.ArmorFeatherfallID, 1, EnumChatFormatting.WHITE.toString(), "Featherfall")); - ModifyBuilder.registerModifier(new modifierIntExclusive(new ItemStack[] {TConstructRegistry.getItemStack("canisterRedHeart")}, TinkersDefense.config.ArmorAbsorptionID, "HealthBoost", 1, EnumChatFormatting.DARK_RED.toString(), "HealthBoost", new String[] {"heavy", "light"}, 1, null)); + ModifyBuilder.registerModifier(new modifierProtection( + new ItemStack[] {new ItemStack(TinkersDefense.partArmorplate, + 1, 2)}, TinkersDefense.config.ArmorProtectionID, 1, + EnumChatFormatting.DARK_GRAY.toString(), "Protection")); + ModifyBuilder.registerModifier(new modifierProtection( + new ItemStack[] {new ItemStack(Items.magma_cream, 1)}, + TinkersDefense.config.ArmorFireProtectionID, 1, + EnumChatFormatting.RED.toString(), "Fire Protection")); + ModifyBuilder.registerModifier(new modifierProtection( + new ItemStack[] {new ItemStack(Blocks.wool, 1)}, + TinkersDefense.config.ArmorBlastProtectionID, 1, + EnumChatFormatting.DARK_GREEN.toString(), "Blast Protection")); + ModifyBuilder.registerModifier(new modifierProtection( + new ItemStack[] {new ItemStack(TinkersDefense.partRivet, 1, 2)}, + TinkersDefense.config.ArmorProjectileProtectionID, 1, + EnumChatFormatting.GRAY.toString(), "Projectile Protection")); + ModifyBuilder.registerModifier(new modifierProtection( + new ItemStack[] {new ItemStack(modItems, 1, 7)}, + TinkersDefense.config.ArmorFeatherfallID, 1, + EnumChatFormatting.WHITE.toString(), "Featherfall")); + ModifyBuilder.registerModifier(new ModifierIntExclusive( + new ItemStack[] {TConstructRegistry.getItemStack("canisterRedHeart")}, + TinkersDefense.config.ArmorAbsorptionID, "HealthBoost", 1, + EnumChatFormatting.DARK_RED.toString(), "HealthBoost", + new String[] {"heavy", "light"}, 1, null)); //Feet only - ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_Glowsole, 1, 0)}, TinkersDefense.config.ArmorGlowstepID, "GlowStep", EnumChatFormatting.YELLOW.toString(), "GlowStep", new String[] {"feet"}, 1, null)); - ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_Firesole, 1, 0)}, TinkersDefense.config.ArmorFirewalkerID, "Firewalker", EnumChatFormatting.RED.toString(), "Firewalker", new String[] {"feet"}, 1, new String[] {"Frostwalker"})); - ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_Icesole, 1, 0)}, TinkersDefense.config.ArmorFrostwalkerID, "Frostwalker", EnumChatFormatting.BLUE.toString(), "Frostwalker", new String[] {"feet"}, 1, new String[] {"Firewalker"})); - ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {new ItemStack(item_Flippers, 1, 0)}, TinkersDefense.config.ArmorDepthstriderID, "Depthstrider", EnumChatFormatting.DARK_BLUE.toString(), "Depthstrider", new String[] {"feet"}, 1, new String[] {"Frostwalker", "Firewalker"})); - - for(ToolCore tool : TConstructRegistry.getToolMapping()) + ModifyBuilder.registerModifier(new ModifierBoolExclusive( + new ItemStack[] {new ItemStack(modItems, 1, 4)}, + TinkersDefense.config.ArmorGlowstepID, "GlowStep", + EnumChatFormatting.YELLOW.toString(), "GlowStep", + new String[] {"feet"}, 1, null)); + ModifyBuilder.registerModifier(new ModifierBoolExclusive( + new ItemStack[] {new ItemStack(modItems, 1, 5)}, + TinkersDefense.config.ArmorFirewalkerID, "Firewalker", + EnumChatFormatting.RED.toString(), "Firewalker", + new String[] {"feet"}, 1, new String[] {"Frostwalker"})); + ModifyBuilder.registerModifier(new ModifierBoolExclusive( + new ItemStack[] {new ItemStack(modItems, 1, 6)}, + TinkersDefense.config.ArmorFrostwalkerID, "Frostwalker", + EnumChatFormatting.BLUE.toString(), "Frostwalker", + new String[] {"feet"}, 1, new String[] {"Firewalker"})); + ModifyBuilder.registerModifier(new ModifierBoolExclusive( + new ItemStack[] {new ItemStack(modItems, 1, 8)}, + TinkersDefense.config.ArmorDepthstriderID, "Depthstrider", + EnumChatFormatting.DARK_BLUE.toString(), "Depthstrider", + new String[] {"feet"}, 1, + new String[] {"Frostwalker", "Firewalker"})); + + for(final ToolCore tool : TConstructRegistry.getToolMapping()) { TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorRebreatherID, "tinker", "rebreather", true); @@ -147,6 +219,7 @@ public class ArmorMods TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorBlastProtectionID, "tinker", "blastprotection", true); TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorProjectileProtectionID, "tinker", "projprotection", true); TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorFeatherfallID, "tinker", "featherfall", true); + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorAbsorptionID, "tinker", "healthboost", true); TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorGlowstepID, "tinker", "glowstep", true); TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorFirewalkerID, "tinker", "firewalk", true); @@ -159,54 +232,90 @@ public class ArmorMods { tcmods.RegisterModifiers(); } + if(TDIntegration.botania) + { + botmods.RegisterModifiers(); + } + if(TDIntegration.bloodMagic) + { + bloodmods.RegisterModifiers(); + } } + @Override public void UpdateAll(ToolCore tool, ItemStack stack, World world, Entity entity, NBTTagCompound tags) { if(!world.isRemote) { if(tags.hasKey("Frostwalker")) - UpdateWalker(tool, stack, world, entity, Material.water, TinkersDefense.block_Unstable, 0); + { + UpdateWalker(tool, stack, world, entity, Material.water, TDArmorAddon.block_Unstable, 0); + } if(tags.hasKey("Firewalker")) - UpdateWalker(tool, stack, world, entity, Material.lava, TinkersDefense.block_Unstable, 1); + { + UpdateWalker(tool, stack, world, entity, Material.lava, TDArmorAddon.block_Unstable, 1); + } if(tags.hasKey("GlowStep")) + { UpdateGlowstep(tool, stack, world, entity); + } if(tags.hasKey("Rebreather")) + { UpdateRebreather(tool, stack, world, entity); + } if(tags.hasKey("Nightvision")) + { UpdateNightvision(tool, stack, world, entity); + } if(tags.hasKey("AntiBlindness")) + { UpdateAntiBlind(tool, stack, world, entity); + } if(tags.hasKey("HealthBoost")) + { UpdateHealthBoost(tool, stack, world, entity, tags); - //UpdateHighstep(tool, stack, world, entity); + //UpdateHighstep(tool, stack, world, entity); + } } else { if(tags.hasKey("Depthstrider")) + { UpdateFlippers(tool, stack, world, entity); + } if(tags.hasKey("Speed")) + { UpdateSpeed(tool, stack, world, entity, tags); -// if(tags.hasKey("Jump")) -// UpdateJump(tool, stack, world, entity, tags); + // if(tags.hasKey("Jump")) + // UpdateJump(tool, stack, world, entity, tags); + } } if(TDIntegration.thaumcraft) { tcmods.UpdateAll(tool, stack, world, entity, tags); } + if(TDIntegration.botania) + { + botmods.UpdateAll(tool, stack, world, entity, tags); + } + if(TDIntegration.bloodMagic) + { + bloodmods.UpdateAll(tool, stack, world, entity, tags); + } } public void UpdateWalker(ToolCore tool, ItemStack stack, World world, Entity entity, Material mat, Block replacement, int meta) { - int x = (int) Math.floor(entity.posX); - int y = (int) (entity.posY - entity.getYOffset()); - int z = (int) Math.floor(entity.posZ); + final int x = (int) Math.floor(entity.posX); + final int y = (int) (entity.posY - entity.getYOffset()); + final int z = (int) Math.floor(entity.posZ); Block block; for(int i = 0; i < 5; i++) + { for(int j = 0; j < 5; j++) { block = world.getBlock(x + (i - 2), y - 1, z + (j - 2)); @@ -219,6 +328,7 @@ public class ArmorMods } } } + } } int glowTimer = 8; @@ -227,15 +337,15 @@ public class ArmorMods public void UpdateGlowstep(ToolCore tool, ItemStack stack, World world, Entity entity) { - int x = (int) Math.floor(entity.posX); - int y = (int) (entity.posY - entity.getYOffset()); - int z = (int) Math.floor(entity.posZ); + final int x = (int) Math.floor(entity.posX); + final int y = (int) (entity.posY - entity.getYOffset()); + final int z = (int) Math.floor(entity.posZ); if(glowTimer == 0) { if(world.getBlock(x, y, z) == Blocks.air && world.getBlock(x, y - 1, z).isNormalCube()) { - world.setBlock(x, y, z, TinkersDefense.block_GlowCrumbs, 0, 3); + world.setBlock(x, y, z, TDArmorAddon.block_GlowCrumbs, 0, 3); //world.notifyBlocksOfNeighborChange(x + (i - 2), y - 1, z + (j - 2), world.getBlock(x + (i - 2), y - 1, z + (j - 2))); } glowTimer = 8; @@ -261,20 +371,35 @@ public class ArmorMods public void UpdateRebreather(ToolCore tool, ItemStack stack, World world, Entity entity) { - EntityPlayer player = (EntityPlayer) entity; + final 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)) + ItemStack canStack; + int i; + int used = 0; + + for(i = 0; i < player.inventory.getSizeInventory(); i++) { - player.inventory.consumeInventoryItem(item_Canister); - player.inventory.addItemStackToInventory(new ItemStack(item_Emptycanister, 1, 0)); - player.setAir(300); + if(player.inventory.getStackInSlot(i) != null && player.inventory.getStackInSlot(i).getItem() == modItems && player.inventory.getStackInSlot(i).getItemDamage() == 0) + { + canStack = player.inventory.getStackInSlot(i); + if(used < 2 && canStack.stackSize == 1) + { + player.inventory.decrStackSize(i, 1); + player.inventory.addItemStackToInventory(new ItemStack( + modItems, 1, 1)); + player.setAir(150); + used++; + } + if(used == 0 && canStack.stackSize >= 2) + { + player.inventory.decrStackSize(i, 2); + player.inventory.addItemStackToInventory(new ItemStack( + modItems, 2, 1)); + player.setAir(300); + break; + } + } } } } @@ -282,18 +407,21 @@ public class ArmorMods public void UpdateNightvision(ToolCore tool, ItemStack stack, World world, Entity entity) { if(!((EntityPlayer) entity).isPotionActive(Potion.nightVision) || ((EntityPlayer) entity).getActivePotionEffect(Potion.nightVision).getDuration() < 1000) - ((EntityPlayer) entity).addPotionEffect(new PotionEffect(Potion.nightVision.id, 1000, 1, true)); + { + ((EntityPlayer) entity).addPotionEffect(new PotionEffect( + Potion.nightVision.id, 1000, 1, true)); + } } boolean isBlind = false; public void UpdateAntiBlind(ToolCore tool, ItemStack stack, World world, Entity entity) { - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + final NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); if(((EntityPlayer) entity).isPotionActive(Potion.blindness) && !isBlind) { - int roll = world.rand.nextInt(100); - int antiLevel = tags.getInteger("AntiBlindness"); + final int roll = world.rand.nextInt(100); + final int antiLevel = tags.getInteger("AntiBlindness"); if(roll < antiLevel * 10) { ((EntityPlayer) entity).removePotionEffect(Potion.blindness.id); @@ -311,10 +439,10 @@ public class ArmorMods public void UpdateSpeed(ToolCore tool, ItemStack stack, World world, Entity entity, NBTTagCompound tags) { - EntityPlayer ent = (EntityPlayer) entity; + final EntityPlayer ent = (EntityPlayer) entity; if(!entity.isInWater() && !ent.isSneaking() && ent.moveForward > 0.0) { - float speed = (float) (tags.getInteger("Speed") * 0.05); + final float speed = (float) (tags.getInteger("Speed") * 0.05); if(entity.onGround) { ent.moveFlying(0.0f, 1.0f, speed); @@ -325,43 +453,50 @@ public class ArmorMods } } } - - PotionEffect hb; + + PotionEffect hb; + public void UpdateHealthBoost(ToolCore tool, ItemStack stack, World world, Entity entity, NBTTagCompound tags) { if(!((EntityPlayer) entity).isPotionActive(21)) - ((EntityPlayer) entity).addPotionEffect(new PotionEffect(21, 100, tags.getInteger("HealthBoost")-1, true)); - else if (((EntityPlayer) entity).getActivePotionEffect(Potion.potionTypes[21]).getDuration() < 10) - ((EntityPlayer) entity).getActivePotionEffect(Potion.potionTypes[21]).combine(new PotionEffect(21, 100, tags.getInteger("HealthBoost")-1, true)); + { + ((EntityPlayer) entity).addPotionEffect(new PotionEffect(21, 100, + tags.getInteger("HealthBoost") - 1, true)); + } + else if(((EntityPlayer) entity).getActivePotionEffect(Potion.potionTypes[21]).getDuration() < 10) + { + ((EntityPlayer) entity).getActivePotionEffect(Potion.potionTypes[21]).combine(new PotionEffect( + 21, 100, tags.getInteger("HealthBoost") - 1, true)); + } } -// public void UpdateJump(ToolCore tool, ItemStack stack, World world, Entity entity, NBTTagCompound tags) -// { -// EntityPlayer ent = (EntityPlayer) entity; -// if(!entity.isInWater() && !ent.isSneaking() && ent.motionY > 0.0) -// { -// float speed = (float) (tags.getInteger("Jump") * 0.15); -// -// ent.jumpMovementFactor = speed; -// -// } -// } + // public void UpdateJump(ToolCore tool, ItemStack stack, World world, Entity entity, NBTTagCompound tags) + // { + // EntityPlayer ent = (EntityPlayer) entity; + // if(!entity.isInWater() && !ent.isSneaking() && ent.motionY > 0.0) + // { + // float speed = (float) (tags.getInteger("Jump") * 0.15); + // + // ent.jumpMovementFactor = speed; + // + // } + // } @SubscribeEvent public void Jump(LivingJumpEvent event) { if(event.entityLiving instanceof EntityPlayer) { - EntityPlayer player = (EntityPlayer) event.entityLiving; - if(player.getCurrentArmor(1) != null) + final EntityPlayer player = (EntityPlayer) event.entityLiving; + if(player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem() instanceof ArmorCore) { - ItemStack legs = player.getCurrentArmor(1); - Item armor = legs.getItem(); - NBTTagCompound tags = legs.getTagCompound().getCompoundTag("InfiTool"); - + final ItemStack legs = player.getCurrentArmor(1); + final Item armor = legs.getItem(); + final NBTTagCompound tags = legs.getTagCompound().getCompoundTag("InfiTool"); + if((armor instanceof TinkersRobe || armor instanceof TinkersChausses || armor instanceof TinkersGrieves) && tags.hasKey("Jump")) { - double speed = tags.getInteger("Jump") * 0.1; + final double speed = tags.getInteger("Jump") * 0.1; player.setVelocity(0, 0.4 + speed, 0); player.velocityChanged = true; } @@ -373,11 +508,11 @@ public class ArmorMods public void Highstep(TickEvent.PlayerTickEvent event) { event.player.stepHeight = 0.5f; - if(event.player.getCurrentArmor(1) != null) + if(event.player.getCurrentArmor(1) != null && event.player.getCurrentArmor(1).getItem() instanceof ArmorCore) { - ItemStack legs = event.player.getCurrentArmor(1); - Item armor = legs.getItem(); - NBTTagCompound tags = legs.getTagCompound().getCompoundTag("InfiTool"); + final ItemStack legs = event.player.getCurrentArmor(1); + final Item armor = legs.getItem(); + final NBTTagCompound tags = legs.getTagCompound().getCompoundTag("InfiTool"); if((armor instanceof TinkersRobe || armor instanceof TinkersChausses || armor instanceof TinkersGrieves) && tags.hasKey("Highstep") && !event.player.isSneaking()) { diff --git a/src/main/java/lance5057/tDefense/armor/modifiers/BloodMagic/BloodArmorMods.java b/src/main/java/lance5057/tDefense/armor/modifiers/BloodMagic/BloodArmorMods.java new file mode 100644 index 0000000..fca26a0 --- /dev/null +++ b/src/main/java/lance5057/tDefense/armor/modifiers/BloodMagic/BloodArmorMods.java @@ -0,0 +1,56 @@ +package lance5057.tDefense.armor.modifiers.BloodMagic; + +import lance5057.tDefense.TinkersDefense; +import lance5057.tDefense.core.tools.modifiers.ModifierBoolExclusive; +import lance5057.tDefense.core.tools.modifiers.ModifiersBase; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import tconstruct.library.TConstructRegistry; +import tconstruct.library.client.TConstructClientRegistry; +import tconstruct.library.crafting.ModifyBuilder; +import tconstruct.library.tools.ToolCore; +import WayofTime.alchemicalWizardry.ModItems; + +public class BloodArmorMods extends ModifiersBase +{ + public BloodArmorMods() + { + super(new String[] {}, "modItemsBloodArmor"); + // TODO Auto-generated constructor stub + } + + @Override + public void LoadItems() + { + } + + @Override + public void RegisterRecipes() + { + } + + @Override + public void RegisterModifiers() + { + ModifyBuilder.registerModifier(new ModifierBoolExclusive( + new ItemStack[] {new ItemStack(ModItems.divinationSigil, 1, 0)}, + TinkersDefense.config.DivinationModID, "Divination", + EnumChatFormatting.DARK_RED.toString(), "Divination", + new String[] {"head"}, 0, new String[] {})); + + for(final ToolCore tool : TConstructRegistry.getToolMapping()) + { + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.DivinationModID, "tinker", "divination", true); + //TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.VisDiscountModID, "tinker", "visembroidery", true); + + } + } + + @Override + public void UpdateAll(ToolCore tool, ItemStack stack, World world, Entity entity, NBTTagCompound tags) + { + } +} diff --git a/src/main/java/lance5057/tDefense/armor/modifiers/Botania/BotaniaArmorMods.java b/src/main/java/lance5057/tDefense/armor/modifiers/Botania/BotaniaArmorMods.java new file mode 100644 index 0000000..d81d05f --- /dev/null +++ b/src/main/java/lance5057/tDefense/armor/modifiers/Botania/BotaniaArmorMods.java @@ -0,0 +1,50 @@ +package lance5057.tDefense.armor.modifiers.Botania; + +import lance5057.tDefense.TinkersDefense; +import lance5057.tDefense.core.tools.modifiers.ModifierIntExclusive; +import lance5057.tDefense.core.tools.modifiers.ModifiersBase; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import tconstruct.library.TConstructRegistry; +import tconstruct.library.client.TConstructClientRegistry; +import tconstruct.library.crafting.ModifyBuilder; +import tconstruct.library.tools.ToolCore; +import vazkii.botania.common.item.ModItems; + +public class BotaniaArmorMods extends ModifiersBase +{ + public BotaniaArmorMods() + { + super(null, "modItemsBotaniaArmor"); + } + + @Override + public void RegisterRecipes() + { + + } + + @Override + public void RegisterModifiers() + { + ModifyBuilder.registerModifier(new ModifierIntExclusive( + new ItemStack[] {new ItemStack(ModItems.manaResource, 1, 22)}, + TinkersDefense.config.ArmorManaDiscountModID, "ManaEmbroidery", + 1, EnumChatFormatting.AQUA.toString(), "Mana Embroidery", + new String[] {"cloth"}, 1, new String[] {})); + + for(final ToolCore tool : TConstructRegistry.getToolMapping()) + { + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.ArmorManaDiscountModID, "tinker", "manaembroidery", true); + + } + } + + @Override + public void UpdateAll(ToolCore tool, ItemStack stack, World world, Entity entity, NBTTagCompound tags) + { + } +} diff --git a/src/main/java/lance5057/tDefense/armor/modifiers/Thaumcraft/ThaumArmorMods.java b/src/main/java/lance5057/tDefense/armor/modifiers/Thaumcraft/ThaumArmorMods.java index 96ce0c9..9b91556 100644 --- a/src/main/java/lance5057/tDefense/armor/modifiers/Thaumcraft/ThaumArmorMods.java +++ b/src/main/java/lance5057/tDefense/armor/modifiers/Thaumcraft/ThaumArmorMods.java @@ -1,15 +1,10 @@ package lance5057.tDefense.armor.modifiers.Thaumcraft; -import lance5057.tDefense.Reference; import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.modifiers.modifierBoolExclusive; -import lance5057.tDefense.armor.modifiers.modifierIntExclusive; -import lance5057.tDefense.armor.modifiers.modifierProtection; -import net.minecraft.block.material.Material; +import lance5057.tDefense.core.tools.modifiers.ModifierBoolExclusive; +import lance5057.tDefense.core.tools.modifiers.ModifierIntExclusive; +import lance5057.tDefense.core.tools.modifiers.ModifiersBase; import net.minecraft.entity.Entity; -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; @@ -17,38 +12,47 @@ import tconstruct.library.TConstructRegistry; import tconstruct.library.client.TConstructClientRegistry; import tconstruct.library.crafting.ModifyBuilder; import tconstruct.library.tools.ToolCore; -import tconstruct.modifiers.tools.ModInteger; -import tconstruct.tools.TinkerTools; import thaumcraft.api.ItemApi; -import cpw.mods.fml.common.registry.GameRegistry; -public class ThaumArmorMods +public class ThaumArmorMods extends ModifiersBase { - + //Runic Shielding is handled in ArmorCore.java - - public void LoadItems() + + public ThaumArmorMods() { + super(new String[] {}, "modItemsThaumArmor"); + // TODO Auto-generated constructor stub } + @Override public void RegisterRecipes() { } + @Override public void RegisterModifiers() { - ModifyBuilder.registerModifier(new modifierBoolExclusive(new ItemStack[] {ItemApi.getItem("itemGoggles", 0)}, TinkersDefense.config.RevealingModID, "Revealing", "\u00A75", "Revealing", new String[] {"head"}, 0, null)); - - ModifyBuilder.registerModifier(new modifierIntExclusive(new ItemStack[] {ItemApi.getItem("itemResource", 7)}, TinkersDefense.config.VisDiscountModID, "VisEmbroidery", 1, "\u00A79", "Vis Embroidery", new String[] {"cloth"}, 1, new String[] {"ManaEmbroidery"})); - - for(ToolCore tool : TConstructRegistry.getToolMapping()) + ModifyBuilder.registerModifier(new ModifierBoolExclusive( + new ItemStack[] {ItemApi.getItem("itemGoggles", 0)}, + TinkersDefense.config.RevealingModID, "Revealing", "\u00A75", + "Revealing", new String[] {"head"}, 0, null)); + + ModifyBuilder.registerModifier(new ModifierIntExclusive( + new ItemStack[] {ItemApi.getItem("itemResource", 7)}, + TinkersDefense.config.VisDiscountModID, "VisEmbroidery", 1, + "\u00A79", "Vis Embroidery", new String[] {"cloth"}, 1, + new String[] {})); + + for(final ToolCore tool : TConstructRegistry.getToolMapping()) { TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.RevealingModID, "tinker", "revealing", true); - TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.VisDiscountModID, "tinker", "vis", true); + TConstructClientRegistry.addEffectRenderMapping(tool, TinkersDefense.config.VisDiscountModID, "tinker", "visembroidery", true); } } + @Override public void UpdateAll(ToolCore tool, ItemStack stack, World world, Entity entity, NBTTagCompound tags) { } diff --git a/src/main/java/lance5057/tDefense/armor/modifiers/modifierBoolExclusive.java b/src/main/java/lance5057/tDefense/armor/modifiers/modifierBoolExclusive.java deleted file mode 100644 index 0709dbf..0000000 --- a/src/main/java/lance5057/tDefense/armor/modifiers/modifierBoolExclusive.java +++ /dev/null @@ -1,76 +0,0 @@ -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; - int modsNeeded = 0; - String color; - String tooltipName; - String[] modExclusions; - - /* - * excludeMods: If these modifier keys are present this modifier wont take. - */ - public modifierBoolExclusive(ItemStack[] items, int effect, String tag, String c, String tip, String[] exclusive, int modsNeeded, String[] excludeMods) - { - super(items, effect, tag, c, tip); - this.exclusive = exclusive; - this.modsNeeded = modsNeeded; - this.color = c; - this.tooltipName = tip; - this.modExclusions = excludeMods; - } - - @Override - protected boolean canModify(ItemStack tool, ItemStack[] input) - { - List list = Arrays.asList(((ToolCore) tool.getItem()).getTraits()); - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - - boolean isExclusive = false; - boolean hasModRejection = false; - - for(int i = 0; i < exclusive.length; i++) - { - if(list.contains(exclusive[i])) - { - isExclusive = true; - } - } - - if(modExclusions != null) - { - for(int i = 0; i < modExclusions.length; i++) - { - if(tags.hasKey(modExclusions[i])) - { - hasModRejection = true; - } - } - } - - return isExclusive && !hasModRejection && !tags.hasKey(tooltipName); - } - - @Override - public void modify(ItemStack[] input, ItemStack tool) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - - tags.setBoolean(key, true); - - int modifiers = tags.getInteger("Modifiers"); - modifiers -= modsNeeded; - tags.setInteger("Modifiers", modifiers); - - addToolTip(tool, color + tooltipName, color + key); - } -} diff --git a/src/main/java/lance5057/tDefense/armor/modifiers/modifierIntExclusive.java b/src/main/java/lance5057/tDefense/armor/modifiers/modifierIntExclusive.java deleted file mode 100644 index 5ff652e..0000000 --- a/src/main/java/lance5057/tDefense/armor/modifiers/modifierIntExclusive.java +++ /dev/null @@ -1,96 +0,0 @@ -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.ModInteger; - -public class modifierIntExclusive extends ModInteger -{ - String[] exclusive; - int modsNeeded = 0; - String color; - String tooltipName; - int initialIncrease; - int secondaryIncrease; - int max = 5; - String[] modExclusions; - - public modifierIntExclusive(ItemStack[] items, int effect, String dataKey, int increase, String c, String tip, String[] exclusive, int modsNeeded, String[] excludeMods) - { - super(items, effect, dataKey, increase, c, tip); - this.exclusive = exclusive; - this.modsNeeded = modsNeeded; - initialIncrease = secondaryIncrease = increase; - color = c; - tooltipName = tip; - this.modExclusions = excludeMods; - } - - public modifierIntExclusive(ItemStack[] items, int effect, String dataKey, int increase, String c, String tip, String[] exclusive, int modsNeeded, int max) - { - super(items, effect, dataKey, increase, c, tip); - this.exclusive = exclusive; - this.modsNeeded = modsNeeded; - initialIncrease = secondaryIncrease = increase; - color = c; - tooltipName = tip; - this.max = max; - } - - @Override - protected boolean canModify(ItemStack tool, ItemStack[] input) - { - List list = Arrays.asList(((ToolCore) tool.getItem()).getTraits()); - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - - boolean isExclusive = false; - boolean hasModRejection = false; - - for(int i = 0; i < exclusive.length; i++) - { - if(list.contains(exclusive[i])) - { - isExclusive = true; - } - } - - if(modExclusions != null) - { - for(int i = 0; i < modExclusions.length; i++) - { - if(tags.hasKey(modExclusions[i])) - { - hasModRejection = true; - } - } - } - - return tags.getInteger(tooltipName) < max; - } - - @Override - public void modify(ItemStack[] input, ItemStack tool) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - if(tags.hasKey(key)) - { - int increase = tags.getInteger(key); - increase += secondaryIncrease; - tags.setInteger(key, increase); - } - else - { - tags.setInteger(key, initialIncrease); - } - - int modifiers = tags.getInteger("Modifiers"); - modifiers -= modsNeeded; - tags.setInteger("Modifiers", modifiers); - - addToolTip(tool, color + tooltipName, color + key); - } -} diff --git a/src/main/java/lance5057/tDefense/armor/renderers/ArmorRenderer.java b/src/main/java/lance5057/tDefense/armor/renderers/ArmorRenderer.java index fcafd47..6ffce2f 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/ArmorRenderer.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/ArmorRenderer.java @@ -1,25 +1,98 @@ package lance5057.tDefense.armor.renderers; +import java.util.ArrayList; +import java.util.List; + +import lance5057.tDefense.TinkersDefense; +import lance5057.tDefense.armor.ArmorCore; import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import org.lwjgl.opengl.GL11; public class ArmorRenderer extends ModelBiped { - public String[] colors; + public String[] colors; + + public ItemStack stack; + public String defaultFolder; + + private final int[] order = new int[] {1, 2, 3, 0, 4, 5, 6, 7, 8, 9}; + + public List<ModelRenderer> boxes = new ArrayList<ModelRenderer>(); - public ItemStack stack; - public String defaultFolder; + public NBTTagCompound defaultTags = new NBTTagCompound(); public ArmorRenderer(float a, float b, int c, int d) { super(a, b, c, d); } + public void init() + { + defaultTags.getCompoundTag("ArmorRenderer"); + + for(int i = 0; i < boxList.size(); i++) + { + final String rendertag = ((ModelRenderer) boxList.get(i)).boxName; + if(rendertag != null) + { + defaultTags.setBoolean(rendertag, ((ModelRenderer) boxList.get(i)).isHidden); + } + } + } + public void SetColors(String[] colors, String defaultFolder, ItemStack stack) { this.colors = colors; this.stack = stack; this.defaultFolder = defaultFolder; } + + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + { + GL11.glPushMatrix(); + + if(TinkersDefense.config.transparency) + { + GL11.glEnable(GL11.GL_BLEND); + } + + final NBTTagCompound tags = stack.getTagCompound().getCompoundTag("ArmorRenderer"); + + for(int j = 0; j < boxList.size(); j++) + { + final ModelRenderer box = (ModelRenderer) boxList.get(j); + if(tags.hasKey(box.boxName)) + { + box.isHidden = tags.getBoolean(box.boxName); + } + } + + for(int i = 0; i < 10; i++) + { + final String texture = ((ArmorCore) stack.getItem()).getTexture(order[i], stack); + if(texture != "") + { + GL11.glPushMatrix(); + + ((ArmorCore) stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, order[i]); + super.render(entity, f, f1, f2, f3, f4, f5); + + GL11.glPopMatrix(); + } + } + + if(TinkersDefense.config.transparency) + { + GL11.glDisable(GL11.GL_BLEND); + } + + GL11.glPopMatrix(); + GL11.glColor3d(1.0, 1.0, 1.0); + } } diff --git a/src/main/java/lance5057/tDefense/armor/renderers/ModelMask.java b/src/main/java/lance5057/tDefense/armor/renderers/ModelMask.java deleted file mode 100644 index aee3b9e..0000000 --- a/src/main/java/lance5057/tDefense/armor/renderers/ModelMask.java +++ /dev/null @@ -1,77 +0,0 @@ -package lance5057.tDefense.armor.renderers; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -/** - * HornedBand - Either Mojang or a mod author - * Created using Tabula 4.1.1 - */ -public class ModelMask extends ModelBiped -{ - public ModelRenderer Plate; - public ModelRenderer Band; - public ModelRenderer HornTipR; - public ModelRenderer HornTipL; - public ModelRenderer HornBaseR; - public ModelRenderer HornBaseL; - - String Color[]; - int rgbColors[]; - - public ModelMask(String color[] /*3*/) - { - this.textureWidth = 64; - this.textureHeight = 64; - this.HornBaseR = new ModelRenderer(this, 0, 35); - this.HornBaseR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.HornBaseR.addBox(-3.5F, -6.1F, -7.5F, 2, 2, 2, 0.0F); - this.setRotateAngle(HornBaseR, -0.17453292519943295F, 0.0F, 0.0F); - this.HornTipL = new ModelRenderer(this, 0, 39); - this.HornTipL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.HornTipL.addBox(2.0F, -0.5F, -10.8F, 1, 1, 2, 0.1F); - this.setRotateAngle(HornTipL, -0.7853981633974483F, 0.0F, 0.0F); - this.HornTipR = new ModelRenderer(this, 0, 39); - this.HornTipR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.HornTipR.addBox(-3.0F, -0.5F, -10.8F, 1, 1, 2, 0.1F); - this.setRotateAngle(HornTipR, -0.7853981633974483F, 0.0F, 0.0F); - this.Plate = new ModelRenderer(this, 0, 32); - this.Plate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Plate.addBox(-4.0F, -7.0F, -5.0F, 8, 2, 1, 0.0F); - this.Band = new ModelRenderer(this, 0, 39); - this.Band.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Band.addBox(-4.0F, -6.5F, -4.0F, 8, 1, 8, 0.1F); - this.HornBaseL = new ModelRenderer(this, 0, 35); - this.HornBaseL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.HornBaseL.addBox(1.5F, -6.1F, -7.5F, 2, 2, 2, 0.0F); - this.setRotateAngle(HornBaseL, -0.17453292519943295F, 0.0F, 0.0F); - this.Plate.addChild(this.HornBaseR); - this.Plate.addChild(this.HornBaseL); - - this.bipedHead.addChild(this.Plate); - this.bipedHead.addChild(this.HornTipL); - this.bipedHead.addChild(this.HornTipR); - this.bipedHead.addChild(this.Band); - - Color = color; - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) - { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/main/java/lance5057/tDefense/armor/renderers/ModelScarf.java b/src/main/java/lance5057/tDefense/armor/renderers/ModelScarf.java deleted file mode 100644 index 1158394..0000000 --- a/src/main/java/lance5057/tDefense/armor/renderers/ModelScarf.java +++ /dev/null @@ -1,52 +0,0 @@ -package lance5057.tDefense.armor.renderers; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -/** - * Scarf - Either Mojang or a mod author - * Created using Tabula 4.1.1 - */ -public class ModelScarf extends ModelBiped -{ - public ModelRenderer ScarfNeck; - public ModelRenderer ScarfExtra1; - public ModelRenderer ScarfExtra1_1; - - public ModelScarf() - { - this.textureWidth = 64; - this.textureHeight = 64; - this.ScarfExtra1_1 = new ModelRenderer(this, 0, 32); - this.ScarfExtra1_1.setRotationPoint(0.0F, 1.0F, 3.5F); - this.ScarfExtra1_1.addBox(-3.0F, 0.0F, 0.0F, 3, 11, 1, 0.0F); - this.setRotateAngle(ScarfExtra1_1, 0.0F, 0.0F, 0.17453292519943295F); - this.ScarfNeck = new ModelRenderer(this, 8, 32); - this.ScarfNeck.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ScarfNeck.addBox(-4.0F, -2.0F, -4.0F, 8, 3, 8, 0.6F); - this.ScarfExtra1 = new ModelRenderer(this, 8, 32); - this.ScarfExtra1.setRotationPoint(0.0F, 1.0F, 3.5F); - this.ScarfExtra1.addBox(-0.5F, 0.0F, 0.0F, 3, 7, 1, 0.0F); - this.setRotateAngle(ScarfExtra1, 0.0F, 0.0F, -0.17453292519943295F); - this.ScarfNeck.addChild(this.ScarfExtra1_1); - this.ScarfNeck.addChild(this.ScarfExtra1); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - this.ScarfNeck.render(f5); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) - { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/main/java/lance5057/tDefense/armor/renderers/ModelTinkersGauntlets.java b/src/main/java/lance5057/tDefense/armor/renderers/ModelTinkersGauntlets.java new file mode 100644 index 0000000..d40b416 --- /dev/null +++ b/src/main/java/lance5057/tDefense/armor/renderers/ModelTinkersGauntlets.java @@ -0,0 +1,214 @@ +package lance5057.tDefense.armor.renderers; + +import net.minecraft.client.model.ModelRenderer; + +/** + * ModelTinkersGauntlet - Either Mojang or a mod author + * Created using Tabula 4.1.1 + */ +public class ModelTinkersGauntlets extends ArmorRenderer +{ + public ModelRenderer GloveR; + public ModelRenderer VambraceR; + public ModelRenderer RebraceR; + public ModelRenderer BoltR; + public ModelRenderer KnuckleR; + public ModelRenderer SettingR; + public ModelRenderer GemR; + public ModelRenderer ArmSpikesR; + public ModelRenderer ArmSpikesBackR; + public ModelRenderer KnuckleSpikesL; + public ModelRenderer KnuckleSpikesR; + public ModelRenderer KnuckleSpikesMidR; + public ModelRenderer GloveL; + public ModelRenderer VambraceL; + public ModelRenderer RebraceL; + public ModelRenderer BoltL; + public ModelRenderer ArmSpikesL; + public ModelRenderer KnuckleSpikesBackR; + public ModelRenderer KnuckleSpikesBackL; + public ModelRenderer KnuckleSpikesMidL; + public ModelRenderer KnuckleL; + public ModelRenderer GemL; + public ModelRenderer SettingL; + public ModelRenderer ArmSpikesBackL; + + public ModelTinkersGauntlets() + { + super(1.0f, 0, 64, 64); + + textureWidth = 64; + textureHeight = 64; + + KnuckleSpikesL = new ModelRenderer(this, 56, 40); + KnuckleSpikesL.setRotationPoint(0.0F, 0.0F, 0.0F); + KnuckleSpikesL.addBox(3.0F, 6.0F, -0.5F, 4, 8, 0, 0.0F); + setRotateAngle(KnuckleSpikesL, 0.0F, 0.3490658503988659F, 0.0F); + bipedLeftArm.addChild(KnuckleSpikesL); + + KnuckleSpikesBackL = new ModelRenderer(this, 56, 40); + KnuckleSpikesBackL.setRotationPoint(0.0F, 0.0F, 0.0F); + KnuckleSpikesBackL.addBox(3.0F, 6.0F, 0.5F, 4, 8, 0, 0.0F); + setRotateAngle(KnuckleSpikesBackL, 0.0F, -0.3490658503988659F, 0.0F); + bipedLeftArm.addChild(KnuckleSpikesBackL); + + KnuckleL = new ModelRenderer(this, 0, 41); + KnuckleL.setRotationPoint(0.0F, 0.0F, 0.0F); + KnuckleL.addBox(0.1F, 6.8F, -2.0F, 3, 3, 4, 0.4F); + bipedLeftArm.addChild(KnuckleL); + + ArmSpikesR = new ModelRenderer(this, 56, 32); + ArmSpikesR.mirror = true; + ArmSpikesR.setRotationPoint(0.0F, 0.0F, 0.0F); + ArmSpikesR.addBox(-7.5F, 1.0F, 0.5F, 4, 8, 0, 0.0F); + setRotateAngle(ArmSpikesR, 0.0F, -0.3490658503988659F, 0.0F); + bipedRightArm.addChild(ArmSpikesR); + + RebraceL = new ModelRenderer(this, 14, 40); + RebraceL.setRotationPoint(0.0F, 0.0F, 0.0F); + RebraceL.addBox(-1.1F, 3.0F, -2.0F, 3, 5, 4, 0.2F); + bipedLeftArm.addChild(RebraceL); + + BoltL = new ModelRenderer(this, 16, 32); + BoltL.setRotationPoint(0.0F, 0.0F, 0.0F); + BoltL.addBox(-5.8F, 3.7F, -3.0F, 2, 2, 6, -0.3F); + setRotateAngle(BoltL, 0.0F, 0.0F, -0.7853981633974483F); + bipedLeftArm.addChild(BoltL); + + KnuckleSpikesBackR = new ModelRenderer(this, 56, 40); + KnuckleSpikesBackR.mirror = true; + KnuckleSpikesBackR.setRotationPoint(0.0F, 0.0F, 0.0F); + KnuckleSpikesBackR.addBox(-7.0F, 6.0F, 0.5F, 4, 8, 0, 0.0F); + setRotateAngle(KnuckleSpikesBackR, 0.0F, 0.3490658503988659F, 0.0F); + bipedRightArm.addChild(KnuckleSpikesBackR); + + GloveR = new ModelRenderer(this, 0, 32); + GloveR.mirror = true; + GloveR.setRotationPoint(0.0F, 0.0F, 0.0F); + GloveR.addBox(-3.0F, 5.0F, -2.0F, 4, 5, 4, 0.1F); + bipedRightArm.addChild(GloveR); + + BoltR = new ModelRenderer(this, 16, 32); + BoltR.mirror = true; + BoltR.setRotationPoint(0.0F, 0.0F, 0.0F); + BoltR.addBox(3.8F, 3.7F, -3.0F, 2, 2, 6, -0.3F); + setRotateAngle(BoltR, 0.0F, 0.0F, 0.7853981633974483F); + bipedRightArm.addChild(BoltR); + + KnuckleR = new ModelRenderer(this, 0, 41); + KnuckleR.mirror = true; + KnuckleR.setRotationPoint(0.0F, 0.0F, 0.0F); + KnuckleR.addBox(-2.9F, 6.8F, -2.0F, 3, 3, 4, 0.4F); + bipedRightArm.addChild(KnuckleR); + + KnuckleSpikesR = new ModelRenderer(this, 56, 40); + KnuckleSpikesR.mirror = true; + KnuckleSpikesR.setRotationPoint(0.0F, 0.0F, 0.0F); + KnuckleSpikesR.addBox(-7.0F, 6.0F, -0.5F, 4, 8, 0, 0.0F); + setRotateAngle(KnuckleSpikesR, 0.0F, -0.3490658503988659F, 0.0F); + bipedRightArm.addChild(KnuckleSpikesR); + + KnuckleSpikesMidL = new ModelRenderer(this, 54, 48); + KnuckleSpikesMidL.setRotationPoint(0.0F, 0.0F, 0.0F); + KnuckleSpikesMidL.addBox(3.0F, 1.0F, 0.0F, 5, 13, 0, 0.0F); + bipedLeftArm.addChild(KnuckleSpikesMidL); + + ArmSpikesBackL = new ModelRenderer(this, 56, 32); + ArmSpikesBackL.setRotationPoint(0.0F, 0.0F, 0.0F); + ArmSpikesBackL.addBox(3.5F, 1.0F, -0.5F, 4, 8, 0, 0.0F); + setRotateAngle(ArmSpikesBackL, 0.0F, -0.3490658503988659F, 0.0F); + bipedLeftArm.addChild(ArmSpikesBackL); + + ArmSpikesBackR = new ModelRenderer(this, 56, 32); + ArmSpikesBackR.mirror = true; + ArmSpikesBackR.setRotationPoint(0.0F, 0.0F, 0.0F); + ArmSpikesBackR.addBox(-7.5F, 1.0F, -0.5F, 4, 8, 0, 0.0F); + setRotateAngle(ArmSpikesBackR, 0.0F, 0.3490658503988659F, 0.0F); + bipedRightArm.addChild(ArmSpikesBackR); + + VambraceR = new ModelRenderer(this, 0, 56); + VambraceR.mirror = true; + VambraceR.setRotationPoint(0.0F, 0.0F, 0.0F); + VambraceR.addBox(-3.6F, 2.8F, -2.0F, 3, 4, 4, 0.3F); + setRotateAngle(VambraceR, 0.0F, 0.0F, -0.08726646259971647F); + bipedRightArm.addChild(VambraceR); + + GemR = new ModelRenderer(this, 0, 48); + GemR.mirror = true; + GemR.setRotationPoint(0.0F, 0.0F, 0.0F); + GemR.addBox(-4.2F, 5.0F, -2.0F, 2, 4, 4, -0.3F); + bipedRightArm.addChild(GemR); + + RebraceR = new ModelRenderer(this, 14, 40); + RebraceR.mirror = true; + RebraceR.setRotationPoint(0.0F, 0.0F, 0.0F); + RebraceR.addBox(-1.9F, 3.0F, -2.0F, 3, 5, 4, 0.2F); + bipedRightArm.addChild(RebraceR); + + SettingR = new ModelRenderer(this, 12, 49); + SettingR.mirror = true; + SettingR.setRotationPoint(0.0F, 0.0F, 0.0F); + SettingR.addBox(-3.7F, 5.0F, -2.0F, 1, 4, 4, 0.0F); + bipedRightArm.addChild(SettingR); + + GloveL = new ModelRenderer(this, 0, 32); + GloveL.setRotationPoint(0.0F, 0.0F, 0.0F); + GloveL.addBox(-1.0F, 5.0F, -2.0F, 4, 5, 4, 0.1F); + bipedLeftArm.addChild(GloveL); + + GemL = new ModelRenderer(this, 0, 48); + GemL.mirror = true; + GemL.setRotationPoint(0.0F, 0.0F, 0.0F); + GemL.addBox(2.4F, 5.0F, -2.0F, 2, 4, 4, -0.3F); + bipedLeftArm.addChild(GemL); + + VambraceL = new ModelRenderer(this, 0, 56); + VambraceL.setRotationPoint(0.0F, 0.0F, 0.0F); + VambraceL.addBox(0.8F, 2.8F, -2.0F, 3, 4, 4, 0.3F); + setRotateAngle(VambraceL, 0.0F, 0.0F, 0.08726646259971647F); + bipedLeftArm.addChild(VambraceL); + + KnuckleSpikesMidR = new ModelRenderer(this, 54, 48); + KnuckleSpikesMidR.mirror = true; + KnuckleSpikesMidR.setRotationPoint(0.0F, 0.0F, 0.0F); + KnuckleSpikesMidR.addBox(-8.0F, 1.0F, 0.0F, 5, 13, 0, 0.0F); + bipedRightArm.addChild(KnuckleSpikesMidR); + + SettingL = new ModelRenderer(this, 12, 49); + SettingL.mirror = true; + SettingL.setRotationPoint(0.0F, 0.0F, 0.0F); + SettingL.addBox(2.9F, 5.0F, -2.0F, 1, 4, 4, 0.0F); + bipedLeftArm.addChild(SettingL); + + ArmSpikesL = new ModelRenderer(this, 56, 32); + ArmSpikesL.setRotationPoint(0.0F, 0.0F, 0.0F); + ArmSpikesL.addBox(3.5F, 1.0F, 0.5F, 4, 8, 0, 0.0F); + setRotateAngle(ArmSpikesL, 0.0F, 0.3490658503988659F, 0.0F); + bipedLeftArm.addChild(ArmSpikesL); + + ArmSpikesBackL.isHidden = true; + ArmSpikesBackR.isHidden = true; + ArmSpikesL.isHidden = true; + ArmSpikesR.isHidden = true; + GemL.isHidden = true; + GemR.isHidden = true; + KnuckleSpikesBackL.isHidden = true; + KnuckleSpikesBackR.isHidden = true; + KnuckleSpikesL.isHidden = true; + KnuckleSpikesMidL.isHidden = true; + KnuckleSpikesMidR.isHidden = true; + KnuckleSpikesR.isHidden = true; + SettingL.isHidden = true; + SettingR.isHidden = true; + } + + /** + * 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/ModelTinkersTabard.java b/src/main/java/lance5057/tDefense/armor/renderers/ModelTinkersTabard.java new file mode 100644 index 0000000..fe92f2b --- /dev/null +++ b/src/main/java/lance5057/tDefense/armor/renderers/ModelTinkersTabard.java @@ -0,0 +1,73 @@ +package lance5057.tDefense.armor.renderers; + +import lance5057.tDefense.armor.ArmorCore; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +/** + * ModelBiped - Either Mojang or a mod author + * Created using Tabula 4.1.1 + */ +public class ModelTinkersTabard extends ArmorRenderer +{ + public ModelRenderer Tabard; + public ModelRenderer TabardBottomF; + public ModelRenderer TabardBottomB; + + public ModelTinkersTabard() + { + super(0.5f, 0, 64, 64); + + this.textureWidth = 64; + this.textureHeight = 64; + + this.Tabard = new ModelRenderer(this, 0, 32); + this.Tabard.setRotationPoint(0.0F, 0.0F, 0.0F); + this.Tabard.addBox(-4.0F, 0.0F, -2.5F, 8, 12, 5, 0.1F); + + this.TabardBottomF = new ModelRenderer(this, 26, 32); + this.TabardBottomF.setRotationPoint(0.0F, 12.0F, 0.0F); + this.TabardBottomF.addBox(-4.0F, 0.2F, -2.5F, 8, 8, 1, 0.1F); + this.TabardBottomB = new ModelRenderer(this, 26, 32); + this.TabardBottomB.mirror = true; + + this.TabardBottomB.setRotationPoint(0.0F, 12.0F, 0.0F); + this.TabardBottomB.addBox(-4.0F, 0.2F, 1.5F, 8, 8, 1, 0.1F); + } + + @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 < 10; i++) + { + String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); + if(texture != "") + { + + GL11.glPushMatrix(); + + ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); + 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/cloth/ModelTinkersHood.java b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersHood.java index 629d2c4..0fd14bd 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersHood.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersHood.java @@ -1,67 +1,144 @@ package lance5057.tDefense.armor.renderers.cloth; -import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; /** - * ModelBiped - Either Mojang or a mod author + * TinkersHood - Either Mojang or a mod author * Created using Tabula 4.1.1 */ public class ModelTinkersHood extends ArmorRenderer { - public ModelRenderer Hood; public ModelRenderer Flop; + public ModelRenderer Flop_1; + public ModelRenderer Flop_2; + public ModelRenderer ScarfNeck; + public ModelRenderer Band; + public ModelRenderer BandTilted; + public ModelRenderer Rim; + public ModelRenderer HatTop; + public ModelRenderer HatTopTall; + public ModelRenderer Tip; + public ModelRenderer Tip_1; + public ModelRenderer Tip_2; + public ModelRenderer ScarfExtra; + public ModelRenderer ScarfExtra_1; public ModelTinkersHood() { - super(1.0f, 0, 64, 64); - - this.textureWidth = 64; - this.textureHeight = 64; - - this.Hood = new ModelRenderer(this, 0, 44); - this.Hood.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Hood.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.5F); - this.bipedHead.addChild(this.Hood); - - this.Flop = new ModelRenderer(this, 0, 32); - this.Flop.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Flop.addBox(-4.0F, -9.6F, 0.3F, 8, 8, 4, 0.0F); - this.setRotateAngle(Flop, -0.4553564018453205F, 0.0F, 0.0F); - this.bipedHead.addChild(this.Flop); - - this.bipedHeadwear.isHidden = true; - } - - @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 < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { - - GL11.glPushMatrix(); - - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); - - GL11.glPopMatrix(); - } - } - - GL11.glPopMatrix(); + super(0.1f, 0, 128, 64); + + textureWidth = 128; + textureHeight = 64; + + bipedHeadwear = new ModelRenderer(this, "Headwear"); + bipedHeadwear.setTextureOffset(32, 0); + bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.1f + 0.5F); + bipedHeadwear.setRotationPoint(0.0F, 0.0F + 0, 0.0F); + + Flop = new ModelRenderer(this, "Flop"); + Flop.setTextureOffset(64, 0); + Flop.setRotationPoint(0.0F, 0.0F, 0.0F); + Flop.addBox(-3.0F, -7.6F, 1.0F, 6, 6, 3, 0.5F); + setRotateAngle(Flop, -0.3490658503988659F, 0.0F, 0.0F); + bipedHead.addChild(Flop); + + Flop_1 = new ModelRenderer(this, "Flop 1"); + Flop_1.setTextureOffset(82, 0); + Flop_1.setRotationPoint(0.0F, 0.0F, 0.0F); + Flop_1.addBox(-2.0F, -6.8F, -0.1F, 4, 4, 5, 0.5F); + setRotateAngle(Flop_1, -0.6981317007977318F, 0.0F, 0.0F); + bipedHead.addChild(Flop_1); + + Flop_2 = new ModelRenderer(this, "Flop 2"); + Flop_2.setTextureOffset(64, 25); + Flop_2.setRotationPoint(0.0F, 0.0F, 0.0F); + Flop_2.addBox(-1.0F, -6.6F, 2.0F, 2, 2, 4, 0.5F); + setRotateAngle(Flop_2, -1.0471975511965976F, 0.0F, 0.0F); + bipedHead.addChild(Flop_2); + + ScarfExtra = new ModelRenderer(this, "ScarfExtra"); + ScarfExtra.setTextureOffset(44, 32); + ScarfExtra.setRotationPoint(0.0F, 0.0F, 0.0F); + ScarfExtra.addBox(0.0F, 0.0F, 2.0F, 3, 7, 1, 0.0F); + setRotateAngle(ScarfExtra, 0.0F, 0.0F, -0.17453292519943295F); + bipedBody.addChild(ScarfExtra); + + ScarfExtra_1 = new ModelRenderer(this, "ScarfExtra 1"); + ScarfExtra_1.setTextureOffset(36, 32); + ScarfExtra_1.setRotationPoint(0.0F, 0.0F, 0.0F); + ScarfExtra_1.addBox(-3.0F, 0.0F, 2.0F, 3, 11, 1, 0.0F); + setRotateAngle(ScarfExtra_1, 0.0F, 0.0F, 0.17453292519943295F); + bipedBody.addChild(ScarfExtra_1); + + ScarfNeck = new ModelRenderer(this, "ScarfNeck"); + ScarfNeck.setTextureOffset(0, 32); + ScarfNeck.setRotationPoint(0.0F, 0.0F, 0.0F); + ScarfNeck.addBox(-4.5F, -2.0F, -4.5F, 9, 3, 9, 0.3F); + bipedHead.addChild(ScarfNeck); + + HatTop = new ModelRenderer(this, "HatTop"); + HatTop.setTextureOffset(52, 33); + HatTop.addBox(-4.0F, -8.0F, -4.0F, 8, 3, 8, 0.1f + 0.5F); + HatTop.setRotationPoint(0.0F, 0.0F + 0, 0.0F); + bipedHead.addChild(HatTop); + + HatTopTall = new ModelRenderer(this, "HatTopTall"); + HatTopTall.setTextureOffset(96, 4); + HatTopTall.setRotationPoint(0.0F, 0.0F, 0.0F); + HatTopTall.addBox(-4.0F, -14.0F, -4.0F, 8, 5, 8, 0.5F); + bipedHead.addChild(HatTopTall); + + Rim = new ModelRenderer(this, "Rim"); + Rim.setTextureOffset(64, 20); + Rim.setRotationPoint(0.0F, 0.0F, 0.0F); + Rim.addBox(-6.0F, -5.5F, -6.0F, 12, 1, 12, 0.1F); + bipedHead.addChild(Rim); + + BandTilted = new ModelRenderer(this, "BandTilted"); + BandTilted.setTextureOffset(64, 9); + BandTilted.setRotationPoint(0.0F, 0.0F, 0.0F); + BandTilted.addBox(-4.5F, -2.7F, -8.5F, 9, 2, 9, 0.0F); + setRotateAngle(BandTilted, -1.2f, 0.0F, 0.0F); + bipedHead.addChild(BandTilted); + + Band = new ModelRenderer(this, "Band"); + Band.setTextureOffset(64, 9); + Band.setRotationPoint(0.0F, 0.0F, 0.0F); + Band.addBox(-4.5F, -6.7F, -4.5F, 9, 2, 9, 0.2F); + bipedHead.addChild(Band); + + Tip = new ModelRenderer(this, "Tip"); + Tip.setTextureOffset(0, 44); + Tip.setRotationPoint(0.0F, 0.0F, 0.0F); + Tip.addBox(-3.0F, -10.8F, -5.0F, 6, 3, 6, 0.5F); + setRotateAngle(Tip, -0.2617993877991494F, 0.0F, 0.0F); + bipedHead.addChild(Tip); + + Tip_1 = new ModelRenderer(this, "Tip 1"); + Tip_1.setTextureOffset(0, 53); + Tip_1.setRotationPoint(0.0F, 0.0F, 0.0F); + Tip_1.addBox(-2.0F, -12.9F, -6.7F, 4, 3, 4, 0.5F); + setRotateAngle(Tip_1, -0.5235987755982988F, 0.0F, 0.0F); + bipedHead.addChild(Tip_1); + + Tip_2 = new ModelRenderer(this, "Tip 2"); + Tip_2.setTextureOffset(18, 45); + Tip_2.setRotationPoint(0.0F, 0.0F, 0.0F); + Tip_2.addBox(-1.0F, -14.6F, -8.8F, 2, 3, 2, 0.5F); + setRotateAngle(Tip_2, -0.7853981633974483F, 0.0F, 0.0F); + bipedHead.addChild(Tip_2); + + Rim.isHidden = true; + Band.isHidden = true; + HatTop.isHidden = true; + HatTopTall.isHidden = true; + BandTilted.isHidden = true; + Tip.isHidden = true; + Tip_1.isHidden = true; + Tip_2.isHidden = true; + + init(); } /** 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 80c32a8..aae1594 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersRobe.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersRobe.java @@ -1,112 +1,370 @@ package lance5057.tDefense.armor.renderers.cloth; -import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; /** - * ClothRobes - Undefined + * ModelBiped - Either Mojang or a mod author * Created using Tabula 4.1.1 */ public class ModelTinkersRobe extends ArmorRenderer { - public ModelRenderer Left; - public ModelRenderer Right; - public ModelRenderer RightBack; - public ModelRenderer LeftFront; - public ModelRenderer RightFront; - public ModelRenderer Belt; - public ModelRenderer LeftBack; + public ModelRenderer LeftFrontL; + public ModelRenderer LeftBackL; + public ModelRenderer CenterBackL; + public ModelRenderer RightFronL; + public ModelRenderer RightBackL; + public ModelRenderer CenterFrontL; + public ModelRenderer CenterFrontR; + public ModelRenderer CenterBackR; + public ModelRenderer FrontMidL; + public ModelRenderer FrontRightMid; + public ModelRenderer BackMidR; + public ModelRenderer BackRightMid; + public ModelRenderer FrontLeftMid; + public ModelRenderer UnderFrontLeftMid; + public ModelRenderer UnderBackRightMid; + public ModelRenderer UnderBackLeftMid; + public ModelRenderer UnderFrontRightMid; + public ModelRenderer UnderLeftMid; + public ModelRenderer UnderRightMid; + public ModelRenderer FrontMidR; + public ModelRenderer BackLeftMid; + public ModelRenderer BackMidL; + public ModelRenderer FrontLHigh; + public ModelRenderer UnderFrontRightHigh; + public ModelRenderer UnderBackRightHigh; + public ModelRenderer BackUnderHigh; + public ModelRenderer UnderBackLeftHigh; + public ModelRenderer RightHigh; + public ModelRenderer LeftHigh; + public ModelRenderer FrontRightHigh; + public ModelRenderer BackRightHigh; + public ModelRenderer UnderFrontHigh; + public ModelRenderer UnderFrontLeftHigh; + public ModelRenderer BackLHigh; + public ModelRenderer BeltLHip; + public ModelRenderer BeltStraight; + public ModelRenderer BeltRHip; + + //public ModelRenderer BeltStraightSmall; public ModelTinkersRobe() { - super(1f, 0, 64, 64); - - this.textureWidth = 64; - this.textureHeight = 64; - - this.Right = new ModelRenderer(this, 18, 41); - this.Right.mirror = true; - this.Right.setRotationPoint(0F, 0F, 0F); - this.Right.addBox(-2.5F, 0.0F, -2.5F, 6, 11, 5, 0.01F); - this.setRotateAngle(Right, 0.0F, 0.0F, 0.08726646259971647F); - this.bipedRightLeg.addChild(this.Right); - - this.RightBack = new ModelRenderer(this, 40, 43); - this.RightBack.mirror = true; - this.RightBack.setRotationPoint(0F, 0F, 0F); - this.RightBack.addBox(-2.5F, 0.27F, -0.6F, 6, 11, 3, 0.0F); - this.setRotateAngle(RightBack, 0.2617993877991494F, 0.0F, 0.08726646259971647F); - this.bipedRightLeg.addChild(this.RightBack); - - this.LeftBack = new ModelRenderer(this, 40, 43); - this.LeftBack.setRotationPoint(0F, 0F, 0F); - this.LeftBack.addBox(-3.5F, 0.27F, -0.6F, 6, 11, 3, 0.0F); - this.setRotateAngle(LeftBack, 0.2617993877991494F, 0.0F, -0.08726646259971647F); - this.bipedLeftLeg.addChild(this.LeftBack); - - this.Belt = new ModelRenderer(this, 0, 32); - this.Belt.setRotationPoint(0.0F, 0.0F, 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); - - this.Left = new ModelRenderer(this, 18, 41); - this.Left.setRotationPoint(0F, 0F, 0F); - this.Left.addBox(-3.5F, 0.0F, -2.5F, 6, 11, 5, 0.01F); - this.setRotateAngle(Left, 0.0F, 0.0F, -0.08726646259971647F); - this.bipedLeftLeg.addChild(this.Left); - - this.LeftFront = new ModelRenderer(this, 0, 43); - this.LeftFront.setRotationPoint(0F, 0F, 0F); - this.LeftFront.addBox(-3.5F, 0.27F, -2.4F, 6, 11, 3, 0.0F); - this.setRotateAngle(LeftFront, -0.2617993877991494F, 0.0F, -0.08726646259971647F); - this.bipedLeftLeg.addChild(this.LeftFront); - - this.RightFront = new ModelRenderer(this, 0, 43); - this.RightFront.mirror = true; - this.RightFront.setRotationPoint(0F, 0F, 0F); - this.RightFront.addBox(-2.5F, 0.27F, -2.4F, 6, 11, 3, 0.0F); - this.setRotateAngle(RightFront, -0.2617993877991494F, 0.0F, 0.08726646259971647F); - this.bipedRightLeg.addChild(this.RightFront); - - //this.bipedBody.isHidden = true; - this.bipedHead.isHidden = true; - this.bipedHeadwear.isHidden = true; - //this.bipedRightLeg.isHidden = true; - //this.bipedLeftLeg.isHidden = true; - this.bipedRightArm.isHidden = true; - this.bipedLeftArm.isHidden = true; - } + super(0.1f, 0, 64, 64); - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - GL11.glPushMatrix(); + textureWidth = 64; + textureHeight = 64; + + //High + + LeftHigh = new ModelRenderer(this, "Left Skirt"); + LeftHigh.setTextureOffset(52, 38); + LeftHigh.mirror = true; + LeftHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + LeftHigh.addBox(-7.5F, 8.0F, -2.0F, 2, 7, 4, -0.01F); + setRotateAngle(LeftHigh, 0.0F, 0.0F, -0.9599310885968813F); + bipedBody.addChild(LeftHigh); + + UnderBackLeftHigh = new ModelRenderer(this, "Underside BackLeft Skirt"); + UnderBackLeftHigh.setTextureOffset(8, 57); + UnderBackLeftHigh.mirror = true; + UnderBackLeftHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderBackLeftHigh.addBox(-0.2F, 8.5F, -7.5F, 4, 6, 1, 0.0F); + setRotateAngle(UnderBackLeftHigh, 0.9599310885968813F, 0.7853981633974483F, 0.0F); + bipedBody.addChild(UnderBackLeftHigh); + + FrontRightHigh = new ModelRenderer(this, "Front Right Skirt"); + FrontRightHigh.setTextureOffset(18, 55); + FrontRightHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + FrontRightHigh.addBox(-3.3F, 6.6F, 6.1F, 4, 7, 2, 0.0F); + setRotateAngle(FrontRightHigh, -0.9599310885968813F, 0.2617993877991494F, 0.0F); + bipedBody.addChild(FrontRightHigh); + + RightHigh = new ModelRenderer(this, "Right Skirt"); + RightHigh.setTextureOffset(52, 38); + RightHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + RightHigh.addBox(5.5F, 8.0F, -2.0F, 2, 7, 4, -0.01F); + setRotateAngle(RightHigh, 0.0F, 0.0F, 0.9599310885968813F); + bipedBody.addChild(RightHigh); + + BackUnderHigh = new ModelRenderer(this, "Underside Back Skirt"); + BackUnderHigh.setTextureOffset(8, 57); + BackUnderHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + BackUnderHigh.addBox(-2.0F, 8.0F, -8.0F, 4, 6, 1, 0.0F); + setRotateAngle(BackUnderHigh, 0.9599310885968813F, 0.0F, 0.0F); + bipedBody.addChild(BackUnderHigh); + + UnderFrontHigh = new ModelRenderer(this, "Underside Front Skirt"); + UnderFrontHigh.setTextureOffset(8, 57); + UnderFrontHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderFrontHigh.addBox(-2.0F, 8.0F, 7.0F, 4, 6, 1, 0.0F); + setRotateAngle(UnderFrontHigh, -0.9599310885968813F, 0.0F, 0.0F); + bipedBody.addChild(UnderFrontHigh); + + UnderBackRightHigh = new ModelRenderer(this, + "Underside BackRight Skirt"); + UnderBackRightHigh.setTextureOffset(8, 57); + UnderBackRightHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderBackRightHigh.addBox(-3.8F, 8.5F, -7.5F, 4, 6, 1, 0.0F); + setRotateAngle(UnderBackRightHigh, 0.9599310885968813F, -0.7853981633974483F, 0.0F); + bipedBody.addChild(UnderBackRightHigh); + + BackLHigh = new ModelRenderer(this, "Back Left Skirt"); + BackLHigh.setTextureOffset(18, 55); + BackLHigh.mirror = true; + BackLHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + BackLHigh.addBox(-0.7F, 6.6F, -8.1F, 4, 7, 2, 0.0F); + setRotateAngle(BackLHigh, 0.9599310885968813F, 0.2617993877991494F, 0.0F); + bipedBody.addChild(BackLHigh); + + BackRightHigh = new ModelRenderer(this, "Back Right Skirt"); + BackRightHigh.setTextureOffset(18, 55); + BackRightHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + BackRightHigh.addBox(-3.3F, 6.6F, -8.1F, 4, 7, 2, 0.0F); + setRotateAngle(BackRightHigh, 0.9599310885968813F, -0.2617993877991494F, 0.0F); + bipedBody.addChild(BackRightHigh); + + UnderFrontRightHigh = new ModelRenderer(this, + "Underside FrontRight Skirt"); + UnderFrontRightHigh.setTextureOffset(8, 57); + UnderFrontRightHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderFrontRightHigh.addBox(-3.8F, 8.5F, 6.5F, 4, 6, 1, 0.0F); + setRotateAngle(UnderFrontRightHigh, -0.9599310885968813F, 0.7853981633974483F, 0.0F); + bipedBody.addChild(UnderFrontRightHigh); + + FrontLHigh = new ModelRenderer(this, "Front Left Skirt"); + FrontLHigh.setTextureOffset(18, 55); + FrontLHigh.mirror = true; + FrontLHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + FrontLHigh.addBox(-0.7F, 6.6F, 6.1F, 4, 7, 2, 0.0F); + setRotateAngle(FrontLHigh, -0.9599310885968813F, -0.2617993877991494F, 0.0F); + bipedBody.addChild(FrontLHigh); + + UnderFrontLeftHigh = new ModelRenderer(this, "Under FrontLeft Skirt"); + UnderFrontLeftHigh.setTextureOffset(8, 57); + UnderFrontLeftHigh.mirror = true; + UnderFrontLeftHigh.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderFrontLeftHigh.addBox(-0.2F, 8.5F, 6.5F, 4, 6, 1, 0.0F); + setRotateAngle(UnderFrontLeftHigh, -0.9599310885968813F, -0.7853981633974483F, 0.0F); + bipedBody.addChild(UnderFrontLeftHigh); + + //Mid + FrontMidL = new ModelRenderer(this, "Front Left Dress"); + FrontMidL.setTextureOffset(16, 32); + FrontMidL.mirror = true; + FrontMidL.setRotationPoint(0.0F, 0.0F, 0.0F); + FrontMidL.addBox(-1.9F, -0.6F, -3.2F, 4, 8, 2, 0.0F); + setRotateAngle(FrontMidL, -0.4363323129985824F, 0.0F, 0.0F); + bipedLeftLeg.addChild(FrontMidL); + + UnderBackRightMid = new ModelRenderer(this, "Underside BackRight Dress"); + UnderBackRightMid.setTextureOffset(34, 42); + UnderBackRightMid.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderBackRightMid.addBox(-3.0F, 3.0F, 0.2F, 6, 8, 2, 0.0F); + setRotateAngle(UnderBackRightMid, 0.4363323129985824F, -0.3490658503988659F, 0.0F); + bipedRightLeg.addChild(UnderBackRightMid); + + BackMidR = new ModelRenderer(this, "BackRight Dress"); + BackMidR.setTextureOffset(28, 32); + BackMidR.setRotationPoint(0.0F, 0.0F, 0.0F); + BackMidR.addBox(-2.1F, -0.7F, 1.1F, 4, 8, 2, 0.0F); + setRotateAngle(BackMidR, 0.4363323129985824F, 0.0F, 0.0F); + bipedRightLeg.addChild(BackMidR); + + UnderLeftMid = new ModelRenderer(this, "Underside Left Dress"); + UnderLeftMid.setTextureOffset(18, 42); + UnderLeftMid.mirror = true; + UnderLeftMid.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderLeftMid.addBox(0.0F, 3.8F, -3.0F, 2, 7, 6, 0.0F); + setRotateAngle(UnderLeftMid, 0.0F, 0.0F, -0.4363323129985824F); + bipedLeftLeg.addChild(UnderLeftMid); + + UnderFrontLeftMid = new ModelRenderer(this, "Underside FrontLeft Dress"); + UnderFrontLeftMid.setTextureOffset(40, 32); + UnderFrontLeftMid.mirror = true; + UnderFrontLeftMid.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderFrontLeftMid.addBox(-3.0F, 3.0F, -2.3F, 6, 8, 2, 0.0F); + setRotateAngle(UnderFrontLeftMid, -0.4363323129985824F, -0.3490658503988659F, 0.0F); + bipedLeftLeg.addChild(UnderFrontLeftMid); + + BackLeftMid = new ModelRenderer(this, "Back Left Dress"); + BackLeftMid.setTextureOffset(8, 47); + BackLeftMid.mirror = true; + BackLeftMid.setRotationPoint(0.0F, 0.0F, 0.0F); + BackLeftMid.addBox(-1.3F, -0.4F, 1.5F, 3, 8, 2, 0.0F); + setRotateAngle(BackLeftMid, 0.4363323129985824F, 1.0471975511965976F, 0.0F); + bipedLeftLeg.addChild(BackLeftMid); + + UnderBackLeftMid = new ModelRenderer(this, "Underside BackLeft Dress"); + UnderBackLeftMid.setTextureOffset(34, 42); + UnderBackLeftMid.mirror = true; + UnderBackLeftMid.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderBackLeftMid.addBox(-3.0F, 3.0F, 0.2F, 6, 8, 2, 0.0F); + setRotateAngle(UnderBackLeftMid, 0.4363323129985824F, 0.3490658503988659F, 0.0F); + bipedLeftLeg.addChild(UnderBackLeftMid); + + UnderFrontRightMid = new ModelRenderer(this, + "Underside FrontRight Dress"); + UnderFrontRightMid.setTextureOffset(40, 32); + UnderFrontRightMid.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderFrontRightMid.addBox(-3.0F, 3.0F, -2.3F, 6, 8, 2, 0.0F); + setRotateAngle(UnderFrontRightMid, -0.4363323129985824F, 0.3490658503988659F, 0.0F); + bipedRightLeg.addChild(UnderFrontRightMid); + + FrontRightMid = new ModelRenderer(this, "Front Right Dress"); + FrontRightMid.setTextureOffset(8, 47); + FrontRightMid.setRotationPoint(0.0F, 0.0F, 0.0F); + FrontRightMid.addBox(-1.7F, -0.4F, -3.5F, 3, 8, 2, 0.0F); + setRotateAngle(FrontRightMid, -0.4363323129985824F, 1.0471975511965976F, 0.0F); + bipedRightLeg.addChild(FrontRightMid); + + FrontLeftMid = new ModelRenderer(this, "Front Left Dress"); + FrontLeftMid.setTextureOffset(8, 47); + FrontLeftMid.mirror = true; + FrontLeftMid.setRotationPoint(0.0F, 0.0F, 0.0F); + FrontLeftMid.addBox(-1.3F, -0.4F, -3.5F, 3, 8, 2, 0.0F); + setRotateAngle(FrontLeftMid, -0.4363323129985824F, -1.0471975511965976F, 0.0F); + bipedLeftLeg.addChild(FrontLeftMid); + + UnderRightMid = new ModelRenderer(this, "Under Right Dress"); + UnderRightMid.setTextureOffset(18, 42); + UnderRightMid.setRotationPoint(0.0F, 0.0F, 0.0F); + UnderRightMid.addBox(-2.0F, 3.8F, -3.0F, 2, 7, 6, 0.0F); + setRotateAngle(UnderRightMid, 0.0F, 0.0F, 0.4363323129985824F); + bipedRightLeg.addChild(UnderRightMid); + + BackRightMid = new ModelRenderer(this, "Back Right Dress"); + BackRightMid.setTextureOffset(8, 47); + BackRightMid.setRotationPoint(0.0F, 0.0F, 0.0F); + BackRightMid.addBox(-1.7F, -0.4F, 1.5F, 3, 8, 2, 0.0F); + setRotateAngle(BackRightMid, 0.4363323129985824F, -1.0471975511965976F, 0.0F); + bipedRightLeg.addChild(BackRightMid); + + FrontMidR = new ModelRenderer(this, "Front Right Dress"); + FrontMidR.setTextureOffset(16, 32); + FrontMidR.setRotationPoint(0.0F, 0.0F, 0.0F); + FrontMidR.addBox(-2.1F, -0.6F, -3.2F, 4, 8, 2, 0.0F); + setRotateAngle(FrontMidR, -0.4363323129985824F, 0.0F, 0.0F); + bipedRightLeg.addChild(FrontMidR); + + BackMidL = new ModelRenderer(this, "BackLeft Dress"); + BackMidL.setTextureOffset(28, 32); + BackMidL.mirror = true; + BackMidL.setRotationPoint(0.0F, 0.0F, 0.0F); + BackMidL.addBox(-1.9F, -0.7F, 1.1F, 4, 8, 2, 0.0F); + setRotateAngle(BackMidL, 0.4363323129985824F, 0.0F, 0.0F); + bipedLeftLeg.addChild(BackMidL); + + //Low + CenterBackL = new ModelRenderer(this, "Center BackLeft Robe"); + CenterBackL.setTextureOffset(0, 49); + CenterBackL.setRotationPoint(0.0F, 0.0F, 0.0F); + CenterBackL.addBox(-2.9F, -0.2F, 0.5F, 2, 11, 2, 0.0F); + setRotateAngle(CenterBackL, 0.08726646259971647F, 0.0F, 0.0F); + bipedLeftLeg.addChild(CenterBackL); + + CenterFrontR = new ModelRenderer(this, "Center FrontRight Robe"); + CenterFrontR.setTextureOffset(0, 49); + CenterFrontR.setRotationPoint(0.0F, 0.0F, 0.0F); + CenterFrontR.addBox(0.9F, -0.2F, -2.5F, 2, 11, 2, 0.0F); + setRotateAngle(CenterFrontR, -0.08726646259971647F, 0.0F, 0.0F); + bipedRightLeg.addChild(CenterFrontR); + + CenterFrontL = new ModelRenderer(this, "Center FrontLeft Robe"); + CenterFrontL.setTextureOffset(0, 49); + CenterFrontL.setRotationPoint(0.0F, 0.0F, 0.0F); + CenterFrontL.addBox(-2.9F, -0.2F, -2.5F, 2, 11, 2, 0.0F); + setRotateAngle(CenterFrontL, -0.08726646259971647F, 0.0F, 0.0F); + bipedLeftLeg.addChild(CenterFrontL); + + RightBackL = new ModelRenderer(this, "Right Back Robe"); + RightBackL.setTextureOffset(0, 32); + RightBackL.mirror = true; + RightBackL.setRotationPoint(0.0F, 0.0F, 0.0F); + RightBackL.addBox(-2.2F, -0.3F, -1.5F, 4, 11, 4, 0.0F); + setRotateAngle(RightBackL, 0.08726646259971647F, 0.0F, 0.08726646259971647F); + bipedRightLeg.addChild(RightBackL); + + CenterBackR = new ModelRenderer(this, "Center BackRight Robe"); + CenterBackR.setTextureOffset(0, 49); + CenterBackR.setRotationPoint(0.0F, 0.0F, 0.0F); + CenterBackR.addBox(0.9F, -0.2F, 0.5F, 2, 11, 2, 0.0F); + setRotateAngle(CenterBackR, 0.08726646259971647F, 0.0F, 0.0F); + bipedRightLeg.addChild(CenterBackR); + + LeftBackL = new ModelRenderer(this, "Left Back Robe"); + LeftBackL.setTextureOffset(0, 32); + LeftBackL.setRotationPoint(0.0F, 0.0F, 0.0F); + LeftBackL.addBox(-1.8F, -0.3F, -1.5F, 4, 11, 4, 0.0F); + setRotateAngle(LeftBackL, 0.08726646259971647F, 0.0F, -0.08726646259971647F); + bipedLeftLeg.addChild(LeftBackL); + + RightFronL = new ModelRenderer(this, "Right Front Robe"); + RightFronL.setTextureOffset(0, 32); + RightFronL.setRotationPoint(0.0F, 0.0F, 0.0F); + RightFronL.addBox(-2.2F, -0.3F, -2.5F, 4, 11, 4, 0.01F); + setRotateAngle(RightFronL, -0.08726646259971647F, 0.0F, 0.08726646259971647F); + bipedRightLeg.addChild(RightFronL); + + LeftFrontL = new ModelRenderer(this, "Left Front Robe"); + LeftFrontL.setTextureOffset(0, 32); + LeftFrontL.mirror = true; + LeftFrontL.setRotationPoint(0.0F, 0.0F, 0.0F); + LeftFrontL.addBox(-1.8F, -0.3F, -2.5F, 4, 11, 4, 0.01F); + setRotateAngle(LeftFrontL, -0.08726646259971647F, 0.0F, -0.08726646259971647F); + bipedLeftLeg.addChild(LeftFrontL); + + //Belts + BeltRHip = new ModelRenderer(this, "Belt Right Hip"); + BeltRHip.setTextureOffset(32, 55); + BeltRHip.setRotationPoint(0.0F, 0.0F, 0.0F); + BeltRHip.addBox(-3.3F, 0.0F, -3.0F, 10, 3, 6, -0.11F); + setRotateAngle(BeltRHip, 0.0F, 0.0F, -0.13962634015954636F); + bipedRightLeg.addChild(BeltRHip); - for(int i = 0; i < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { + BeltLHip = new ModelRenderer(this, "Belt Left Hip"); + BeltLHip.setTextureOffset(32, 55); + BeltLHip.setRotationPoint(0.0F, 0.0F, 0.0F); + BeltLHip.addBox(-6.7F, 0.0F, -3.0F, 10, 3, 6, -0.1F); + setRotateAngle(BeltLHip, 0.0F, 0.0F, 0.13962634015954636F); + bipedLeftLeg.addChild(BeltLHip); - GL11.glPushMatrix(); + BeltStraight = new ModelRenderer(this, "Belt Straight"); + BeltStraight.setTextureOffset(34, 55); + BeltStraight.setRotationPoint(0.0F, 0.0F, 0.0F); + BeltStraight.addBox(-4.5F, 10.5F, -3.0F, 9, 3, 6, -0.1F); + bipedBody.addChild(BeltStraight); - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); + BackLHigh.isHidden = true; + BackRightHigh.isHidden = true; + BackUnderHigh.isHidden = true; + FrontLHigh.isHidden = true; + FrontRightHigh.isHidden = true; + LeftHigh.isHidden = true; + RightHigh.isHidden = true; + UnderBackLeftHigh.isHidden = true; + UnderBackRightHigh.isHidden = true; + UnderFrontHigh.isHidden = true; + UnderFrontLeftHigh.isHidden = true; + UnderFrontRightHigh.isHidden = true; - GL11.glPopMatrix(); - } - } + BackLeftMid.isHidden = true; + BackMidL.isHidden = true; + BackMidR.isHidden = true; + BackRightMid.isHidden = true; + FrontLeftMid.isHidden = true; + FrontMidL.isHidden = true; + FrontMidR.isHidden = true; + FrontRightMid.isHidden = true; + UnderBackLeftMid.isHidden = true; + UnderBackRightMid.isHidden = true; + UnderFrontLeftMid.isHidden = true; + UnderFrontRightMid.isHidden = true; + UnderLeftMid.isHidden = true; + UnderRightMid.isHidden = true; - GL11.glPopMatrix(); + init(); } /** 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 387463e..20a6317 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersShawl.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersShawl.java @@ -1,125 +1,167 @@ package lance5057.tDefense.armor.renderers.cloth; -import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; /** - * ModelBiped - Either Mojang or a mod author + * ModelTinkersShawl - Either Mojang or a mod author * Created using Tabula 4.1.1 */ public class ModelTinkersShawl extends ArmorRenderer { - public ModelRenderer ShawlLeft1; - public ModelRenderer ShawlLeft2; - public ModelRenderer ShawlRight1; - public ModelRenderer ShawlRight2; public ModelRenderer Button; - public ModelRenderer TopLeft; - public ModelRenderer TopRight; - public ModelRenderer ArmLeft; - public ModelRenderer ArmRight; - public ModelRenderer Chest; + public ModelRenderer Zipper; + public ModelRenderer ArmTrimL; + public ModelRenderer ArmTrimR; + public ModelRenderer TrimNeck; + public ModelRenderer ButtonArmL; + public ModelRenderer ButtonArmR; + public ModelRenderer ShawlLeftShort; + public ModelRenderer ShawlRightShort; + public ModelRenderer ShawlLeftTrim; + public ModelRenderer TrimShawl; + public ModelRenderer ShawlRightTrim; + public ModelRenderer ZipperShort; + public ModelRenderer ShawlLeftLong; + public ModelRenderer ShawlLeftTrimLong; + public ModelRenderer ShawlRightLong; + public ModelRenderer ShawlRightTrimLong; public ModelTinkersShawl() { - super(1f, 0, 64, 64); - - this.textureWidth = 64; - this.textureHeight = 64; - - 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.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.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.02F); - this.bipedBody.addChild(this.Chest); - - this.TopRight = new ModelRenderer(this, 0, 52); - this.TopRight.mirror = true; - this.TopRight.setRotationPoint(0.0F, 0.0F, 0.0F); - this.TopRight.addBox(-3.5F, -2.3F, -3.0F, 9, 3, 6, -0.01F); - this.bipedRightArm.addChild(this.TopRight); - - this.Button = new ModelRenderer(this, 0, 61); - this.Button.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Button.addBox(0.0F, 0.0F, -3.5F, 2, 2, 1, 0.0F); - this.setRotateAngle(Button, 0.0F, 0.0F, 0.7853981633974483F); - this.bipedBody.addChild(this.Button); - - this.TopLeft = new ModelRenderer(this, 0, 52); - this.TopLeft.setRotationPoint(0.0F, 0.0F, 0.0F); - this.TopLeft.addBox(-5.5F, -2.3F, -3.0F, 9, 3, 6, -0.01F); - this.bipedLeftArm.addChild(this.TopLeft); - - this.ShawlRight1 = new ModelRenderer(this, 0, 32); - this.ShawlRight1.mirror = true; - this.ShawlRight1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ShawlRight1.addBox(-4.0F, -1.3F, -3.0F, 6, 5, 6, 0.0F); - this.setRotateAngle(ShawlRight1, 0.0F, 0.0F, 0.2617993877991494F); - this.bipedRightArm.addChild(this.ShawlRight1); - - this.ShawlRight2 = new ModelRenderer(this, 0, 43); - this.ShawlRight2.mirror = true; - this.ShawlRight2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ShawlRight2.addBox(-1.9F, 0.8F, -3.0F, 6, 3, 6, 0.01F); - this.setRotateAngle(ShawlRight2, 0.0F, 0.0F, -0.6981317007977318F); - this.bipedRightArm.addChild(this.ShawlRight2); - - this.ShawlLeft1 = new ModelRenderer(this, 0, 32); - this.ShawlLeft1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ShawlLeft1.addBox(-2.0F, -1.3F, -3.0F, 6, 5, 6, 0.0F); - this.setRotateAngle(ShawlLeft1, 0.0F, 0.0F, -0.2617993877991494F); - this.bipedLeftArm.addChild(this.ShawlLeft1); - - this.ShawlLeft2 = new ModelRenderer(this, 0, 43); - this.ShawlLeft2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ShawlLeft2.addBox(-4.1F, 0.8F, -3.0F, 6, 3, 6, 0.1F); - this.setRotateAngle(ShawlLeft2, 0.0F, 0.0F, 0.6981317007977318F); - this.bipedLeftArm.addChild(this.ShawlLeft2); - - this.bipedHead.isHidden = true; - this.bipedHeadwear.isHidden = true; - this.bipedCloak.isHidden = true; - } - - @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 < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { - - GL11.glPushMatrix(); - - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); - - GL11.glPopMatrix(); - } - } - - GL11.glPopMatrix(); + super(0.1f, 0, 64, 64); + + textureWidth = 64; + textureHeight = 64; + + TrimNeck = new ModelRenderer(this, "Collar"); + TrimNeck.setTextureOffset(20, 32); + TrimNeck.setRotationPoint(0.0F, 0.0F, 0.0F); + TrimNeck.addBox(-4.5F, -0.5F, -2.5F, 9, 2, 5, -0.3F); + bipedBody.addChild(TrimNeck); + + Button = new ModelRenderer(this, "Collar Button"); + Button.setTextureOffset(15, 32); + Button.setRotationPoint(0.0F, 0.0F, 0.0F); + Button.addBox(-1.5F, -0.5F, -2.5F, 2, 2, 1, -0.2F); + setRotateAngle(Button, 0.0F, 0.0F, -0.7853981633974483F); + bipedBody.addChild(Button); + + ButtonArmL = new ModelRenderer(this, "Button Arm Left"); + ButtonArmL.setTextureOffset(23, 39); + ButtonArmL.mirror = true; + ButtonArmL.setRotationPoint(0.0F, 0.0F, 0.0F); + ButtonArmL.addBox(2.5F, 3.0F, -5.0F, 1, 2, 2, -0.2F); + setRotateAngle(ButtonArmL, 0.7853981633974483F, 0.0F, 0.0F); + bipedLeftArm.addChild(ButtonArmL); + + ButtonArmR = new ModelRenderer(this, "Button Arm Right"); + ButtonArmR.setTextureOffset(23, 39); + ButtonArmR.setRotationPoint(0.0F, 0.0F, 0.0F); + ButtonArmR.addBox(-3.5F, 3.0F, -5.0F, 1, 2, 2, -0.2F); + setRotateAngle(ButtonArmR, 0.7853981633974483F, 0.0F, 0.0F); + bipedRightArm.addChild(ButtonArmR); + + ArmTrimR = new ModelRenderer(this, "Arm Trim Right"); + ArmTrimR.setTextureOffset(0, 32); + ArmTrimR.setRotationPoint(0.0F, 0.0F, 0.0F); + ArmTrimR.addBox(-3.5F, 5.0F, -2.5F, 5, 2, 5, -0.3F); + bipedRightArm.addChild(ArmTrimR); + + ArmTrimL = new ModelRenderer(this, "Arm Trim Left"); + ArmTrimL.setTextureOffset(0, 32); + ArmTrimL.mirror = true; + ArmTrimL.setRotationPoint(0.0F, 0.0F, 0.0F); + ArmTrimL.addBox(-1.5F, 5.0F, -2.5F, 5, 2, 5, -0.3F); + bipedLeftArm.addChild(ArmTrimL); + + ZipperShort = new ModelRenderer(this, "Zipper Bottom"); + ZipperShort.setTextureOffset(30, 53); + ZipperShort.setRotationPoint(0.0F, 0.0F, 0.0F); + ZipperShort.addBox(-1.0F, 6.3F, -2.5F, 2, 5, 1, -0.3F); + bipedBody.addChild(ZipperShort); + + Zipper = new ModelRenderer(this, "Zipper Top"); + Zipper.setTextureOffset(30, 52); + Zipper.setRotationPoint(0.0F, 0.0F, 0.0F); + Zipper.addBox(-1.0F, 0.2F, -2.5F, 2, 7, 1, -0.3F); + bipedBody.addChild(Zipper); + + ShawlLeftTrim = new ModelRenderer(this, "Shawl Left Trim"); + ShawlLeftTrim.setTextureOffset(28, 39); + ShawlLeftTrim.setRotationPoint(0.0F, 0.0F, 0.0F); + ShawlLeftTrim.addBox(-5.1F, 2.45F, -2.5F, 9, 2, 5, -0.29F); + setRotateAngle(ShawlLeftTrim, 0.0F, 0.0F, -0.2792526803190927F); + bipedLeftArm.addChild(ShawlLeftTrim); + + ShawlRightTrim = new ModelRenderer(this, "Shawl Right Trim Short"); + ShawlRightTrim.setTextureOffset(28, 39); + ShawlRightTrim.mirror = true; + ShawlRightTrim.setRotationPoint(0.0F, 0.0F, 0.0F); + ShawlRightTrim.addBox(-3.95F, 2.45F, -2.5F, 9, 2, 5, -0.29F); + setRotateAngle(ShawlRightTrim, 0.0F, 0.0F, 0.2792526803190927F); + bipedRightArm.addChild(ShawlRightTrim); + + ShawlRightTrimLong = new ModelRenderer(this, "Shawl Right Trim Long"); + ShawlRightTrimLong.setTextureOffset(0, 39); + ShawlRightTrimLong.mirror = true; + ShawlRightTrimLong.setRotationPoint(0.0F, 0.0F, 0.0F); + ShawlRightTrimLong.addBox(-3.95F, 7.85F, -2.5F, 9, 2, 5, -0.29F); + setRotateAngle(ShawlRightTrimLong, 0.0F, 0.0F, 0.2792526803190927F); + bipedRightArm.addChild(ShawlRightTrimLong); + + ShawlLeftTrimLong = new ModelRenderer(this, "Shawl Left Trim Long"); + ShawlLeftTrimLong.setTextureOffset(0, 39); + ShawlLeftTrimLong.setRotationPoint(0.0F, 0.0F, 0.0F); + ShawlLeftTrimLong.addBox(-5.1F, 7.85F, -2.5F, 9, 2, 5, -0.29F); + setRotateAngle(ShawlLeftTrimLong, 0.0F, 0.0F, -0.2792526803190927F); + bipedLeftArm.addChild(ShawlLeftTrimLong); + + ShawlLeftLong = new ModelRenderer(this, "Shawl Left Long"); + ShawlLeftLong.setTextureOffset(38, 50); + ShawlLeftLong.setRotationPoint(0.0F, 0.0F, 0.0F); + ShawlLeftLong.addBox(-4.55F, -1.05F, -2.0F, 8, 10, 4, 0.11F); + setRotateAngle(ShawlLeftLong, 0.0F, 0.0F, -0.2792526803190927F); + bipedLeftArm.addChild(ShawlLeftLong); + + ShawlRightLong = new ModelRenderer(this, "Shawl Right Long"); + ShawlRightLong.setTextureOffset(38, 50); + ShawlRightLong.mirror = true; + ShawlRightLong.setRotationPoint(0.0F, 0.0F, 0.0F); + ShawlRightLong.addBox(-3.45F, -1.05F, -2.0F, 8, 10, 4, 0.11F); + setRotateAngle(ShawlRightLong, 0.0F, 0.0F, 0.2792526803190927F); + bipedRightArm.addChild(ShawlRightLong); + + ShawlLeftShort = new ModelRenderer(this, "Shawl Left Short"); + ShawlLeftShort.setTextureOffset(38, 50); + ShawlLeftShort.setRotationPoint(0.0F, 0.0F, 0.0F); + ShawlLeftShort.addBox(-1.55F, -1.05F, -2.0F, 5, 5, 4, 0.01F); + setRotateAngle(ShawlLeftShort, 0.0F, 0.0F, -0.2792526803190927F); + bipedLeftArm.addChild(ShawlLeftShort); + + ShawlRightShort = new ModelRenderer(this, "Shawl Right Short"); + ShawlRightShort.setTextureOffset(38, 50); + ShawlRightShort.mirror = true; + ShawlRightShort.setRotationPoint(0.0F, 0.0F, 0.0F); + ShawlRightShort.addBox(-3.45F, -1.05F, -2.0F, 5, 5, 4, 0.01F); + setRotateAngle(ShawlRightShort, 0.0F, 0.0F, 0.2792526803190927F); + bipedRightArm.addChild(ShawlRightShort); + + TrimShawl = new ModelRenderer(this, "Trim Shawl Short"); + TrimShawl.setTextureOffset(20, 32); + TrimShawl.setRotationPoint(0.0F, 0.0F, 0.0F); + TrimShawl.addBox(-4.5F, 5.5F, -2.5F, 9, 2, 5, -0.31F); + bipedBody.addChild(TrimShawl); + + ArmTrimL.isHidden = true; + ArmTrimR.isHidden = true; + ShawlLeftTrim.isHidden = true; + ShawlRightTrim.isHidden = true; + TrimShawl.isHidden = true; + Zipper.isHidden = true; + ZipperShort.isHidden = true; + + init(); } /** diff --git a/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersShoes.java b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersShoes.java new file mode 100644 index 0000000..8bd6dc9 --- /dev/null +++ b/src/main/java/lance5057/tDefense/armor/renderers/cloth/ModelTinkersShoes.java @@ -0,0 +1,79 @@ +package lance5057.tDefense.armor.renderers.cloth; + +import lance5057.tDefense.armor.renderers.ArmorRenderer; +import net.minecraft.client.model.ModelRenderer; + +/** + * ModelTinkersShoes - Either Mojang or a mod author + * Created using Tabula 4.1.1 + */ +public class ModelTinkersShoes extends ArmorRenderer +{ + public ModelRenderer FootL; + public ModelRenderer FootR; + public ModelRenderer OverLegL; + public ModelRenderer OverLegR; + public ModelRenderer ShoeL; + public ModelRenderer ShoeR; + + public ModelTinkersShoes() + { + super(0.1f, 0, 64, 64); + + textureWidth = 64; + textureHeight = 64; + + FootL = new ModelRenderer(this, "Foot Left"); + FootL.setTextureOffset(16, 41); + FootL.setRotationPoint(0F, 0F, 0F); + FootL.addBox(-2F, 10.1F, -3.0F, 4, 2, 1, 0.2F); + bipedLeftLeg.addChild(FootL); + + FootR = new ModelRenderer(this, "Foot Right"); + FootR.setTextureOffset(16, 41); + FootR.setRotationPoint(0F, 0F, 0F); + FootR.addBox(-2F, 10.1F, -3.0F, 4, 2, 1, 0.2F); + bipedRightLeg.addChild(FootR); + + OverLegL = new ModelRenderer(this, "Over Leg Left"); + OverLegL.setTextureOffset(0, 32); + OverLegL.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.2F); + OverLegL.setRotationPoint(0F, 0F, 0F); + bipedLeftLeg.addChild(OverLegL); + + OverLegR = new ModelRenderer(this, "Over Leg Right"); + OverLegR.setTextureOffset(0, 32); + OverLegR.mirror = true; + OverLegR.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.2F); + OverLegR.setRotationPoint(0F, 0F, 0F); + bipedRightLeg.addChild(OverLegR); + + ShoeL = new ModelRenderer(this, "Shoe Left"); + ShoeL.setTextureOffset(16, 32); + ShoeL.addBox(-2.0F, 7.0F, -2.0F, 4, 5, 4, 0.21F); + ShoeL.setRotationPoint(0F, 0F, 0F); + bipedLeftLeg.addChild(ShoeL); + + ShoeR = new ModelRenderer(this, "Shoe Right"); + ShoeR.setTextureOffset(16, 32); + ShoeR.mirror = true; + ShoeR.addBox(-2.0F, 7.0F, -2.0F, 4, 5, 4, 0.21F); + ShoeR.setRotationPoint(0F, 0F, 0F); + bipedRightLeg.addChild(ShoeR); + + OverLegL.isHidden = true; + OverLegR.isHidden = true; + + init(); + } + + /** + * 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/heavy/ModelTinkersBreastplate.java b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersBreastplate.java index 1f04e13..24ba37a 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersBreastplate.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersBreastplate.java @@ -1,11 +1,7 @@ package lance5057.tDefense.armor.renderers.heavy; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -import org.lwjgl.opengl.GL11; /** * ModelBiped - Either Mojang or a mod author @@ -16,106 +12,156 @@ public class ModelTinkersBreastplate extends ArmorRenderer public ModelRenderer BackPlate; public ModelRenderer BreastPlate; public ModelRenderer Plackart; + public ModelRenderer WingR; + public ModelRenderer WingL; public ModelRenderer PauldronR; - public ModelRenderer ArmGuardR; public ModelRenderer PauldronL; - public ModelRenderer ArmGuardL; - public ModelRenderer ArmL; public ModelRenderer ArmR; - public ModelRenderer BreastPlateFront; + public ModelRenderer ArmL; + public ModelRenderer PauldronExtraR; + public ModelRenderer PauldronExtraL; + public ModelRenderer PauldronR_1; + public ModelRenderer ArmR_1; + public ModelRenderer PauldronL_1; + public ModelRenderer ArmL_1; public ModelTinkersBreastplate() { - super(1f, 0, 64, 64); - - this.textureWidth = 64; - this.textureHeight = 64; - - this.BreastPlate = new ModelRenderer(this, 0, 32); - this.BreastPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.BreastPlate.addBox(-4.0F, 0.1F, -3.6F, 8, 6, 4, 0.1F); - this.bipedBody.addChild(this.BreastPlate); - - this.BreastPlateFront = new ModelRenderer(this, 22, 56); - this.BreastPlateFront.setRotationPoint(0.0F, 0.0F, 0.0F); - this.BreastPlateFront.addBox(-3.0F, 0.5F, -4.2F, 6, 4, 4, 0.1F); - this.bipedBody.addChild(this.BreastPlateFront); - - 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.01F); - this.bipedBody.addChild(this.Plackart); - - this.ArmGuardR = new ModelRenderer(this, 28, 44); - this.ArmGuardR.mirror = true; - this.ArmGuardR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ArmGuardR.addBox(-4.0F, -2.0F, -3.0F, 5, 6, 6, 0.0F); - this.bipedRightArm.addChild(this.ArmGuardR); - - this.ArmGuardL = new ModelRenderer(this, 28, 44); - this.ArmGuardL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ArmGuardL.addBox(-1.0F, -2.0F, -3.0F, 5, 6, 6, 0.0F); - this.bipedLeftArm.addChild(this.ArmGuardL); - - this.PauldronR = new ModelRenderer(this, 24, 32); - this.PauldronR.mirror = true; - this.PauldronR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.PauldronR.addBox(-4.6F, -2.0F, -3.5F, 4, 5, 7, 0.0F); - this.setRotateAngle(PauldronR, 0.0F, -0.0F, 0.4363323129985824F); - this.bipedRightArm.addChild(this.PauldronR); - - this.ArmL = new ModelRenderer(this, 48, 34); - 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.1F); - this.setRotateAngle(ArmL, 0.0F, 0.0F, 0.0017453292519943296F); - this.bipedLeftArm.addChild(this.ArmL); - - this.ArmR = new ModelRenderer(this, 48, 34); - this.ArmR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ArmR.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.1F); - this.bipedRightArm.addChild(this.ArmR); - - this.BackPlate = new ModelRenderer(this, 0, 56); - this.BackPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.BackPlate.addBox(-4.0F, 0.0F, 1.0F, 8, 5, 3, 0.0F); - this.setRotateAngle(BackPlate, -0.08726646006107329F, -0.0F, 0.0F); - this.bipedBody.addChild(this.BackPlate); - - this.PauldronL = new ModelRenderer(this, 24, 32); - this.PauldronL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.PauldronL.addBox(0.5F, -2.0F, -3.5F, 4, 5, 7, 0.0F); - this.setRotateAngle(PauldronL, 0.0F, -0.0F, -0.4363323129985824F); - this.bipedLeftArm.addChild(this.PauldronL); - - // this.ArmR.offsetX = this.ArmR.offsetX + 0.04f; - - this.bipedHead.isHidden = true; - this.bipedHeadwear.isHidden = true; - this.bipedCloak.isHidden = true; - } - - @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 < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { - - GL11.glPushMatrix(); - - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); - - GL11.glPopMatrix(); - } - } - - GL11.glPopMatrix(); + super(0.1f, 0, 128, 64); + + textureWidth = 128; + textureHeight = 64; + + bipedBody = new ModelRenderer(this, "Body"); + bipedBody.setTextureOffset(16, 16); + bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.1f); + bipedBody.setRotationPoint(0.0F, 0.0F + 0, 0.0F); + + bipedRightArm = new ModelRenderer(this, "Right Arm"); + bipedRightArm.setTextureOffset(40, 16); + bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.1f); + bipedRightArm.setRotationPoint(-5.0F, 2.0F + 0, 0.0F); + + bipedLeftArm = new ModelRenderer(this, "Left Arm"); + bipedLeftArm.setTextureOffset(40, 16); + bipedLeftArm.mirror = true; + bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.1f); + bipedLeftArm.setRotationPoint(5.0F, 2.0F + 0, 0.0F); + + ArmR = new ModelRenderer(this, "Arm Right Overlay"); + ArmR.setTextureOffset(28, 44); + ArmR.mirror = true; + ArmR.setRotationPoint(0.0F, 0.0F, 0.0F); + ArmR.addBox(-4.0F, -2.2F, -3.0F, 5, 6, 6, 0.0F); + bipedRightArm.addChild(ArmR); + + ArmR_1 = new ModelRenderer(this, "Arm Overlay Right 2"); + ArmR_1.setTextureOffset(94, 0); + ArmR_1.mirror = true; + ArmR_1.setRotationPoint(-0.0F, 0.0F, 0.0F); + ArmR_1.addBox(-4.5F, -2.0F, -3.0F, 6, 7, 6, 0.1F); + setRotateAngle(ArmR_1, 0.0F, -0.0F, -0.17453292519943295F); + bipedRightArm.addChild(ArmR_1); + + ArmL = new ModelRenderer(this, "Arm Overlay Left"); + ArmL.setTextureOffset(28, 44); + ArmL.setRotationPoint(0.0F, 0.0F, 0.0F); + ArmL.addBox(-1.0F, -2.2F, -3.0F, 5, 6, 6, 0.0F); + bipedLeftArm.addChild(ArmL); + + ArmL_1 = new ModelRenderer(this, "Arm Left Overlay 2"); + ArmL_1.setTextureOffset(94, 0); + ArmL_1.setRotationPoint(0.0F, 0.0F, 0.0F); + ArmL_1.addBox(-1.0F, -2.0F, -3.0F, 6, 7, 6, 0.1F); + setRotateAngle(ArmL_1, 0.0F, -0.0F, 0.17453292519943295F); + bipedLeftArm.addChild(ArmL_1); + + PauldronL = new ModelRenderer(this, "Pauldron Left"); + PauldronL.setTextureOffset(24, 32); + PauldronL.setRotationPoint(0.0F, 0.0F, 0.0F); + PauldronL.addBox(0.6F, -2.0F, -3.5F, 4, 5, 7, 0.0F); + setRotateAngle(PauldronL, 0.0F, -0.0F, -0.4363323129985824F); + bipedLeftArm.addChild(PauldronL); + + PauldronR = new ModelRenderer(this, "Pauldron Right"); + PauldronR.setTextureOffset(24, 32); + PauldronR.mirror = true; + PauldronR.setRotationPoint(-0.0F, 0.0F, 0.0F); + PauldronR.addBox(-4.8F, -2.0F, -3.5F, 4, 5, 7, 0.0F); + setRotateAngle(PauldronR, 0.0F, -0.0F, 0.4363323129985824F); + bipedRightArm.addChild(PauldronR); + + PauldronExtraL = new ModelRenderer(this, "Pauldron Extra Left"); + PauldronExtraL.setTextureOffset(56, 19); + PauldronExtraL.setRotationPoint(0.0F, 0.0F, 0.0F); + PauldronExtraL.addBox(0.0F, -12.0F, 0.0F, 13, 18, 0, 0.0F); + bipedLeftArm.addChild(PauldronExtraL); + + PauldronExtraR = new ModelRenderer(this, "Pauldron Extra Right"); + PauldronExtraR.setTextureOffset(56, 19); + PauldronExtraR.mirror = true; + PauldronExtraR.setRotationPoint(0.0F, 0.0F, 0.0F); + PauldronExtraR.addBox(-12.0F, -12.0F, 0.0F, 13, 18, 0, 0.0F); + bipedRightArm.addChild(PauldronExtraR); + + PauldronR_1 = new ModelRenderer(this, "Pauldron Right 2"); + PauldronR_1.setTextureOffset(64, 0); + PauldronR_1.mirror = true; + PauldronR_1.setRotationPoint(-0.0F, 0.0F, 0.0F); + PauldronR_1.addBox(-5.5F, -8.0F, -4.0F, 7, 11, 8, 0.1F); + setRotateAngle(PauldronR_1, 0.0F, -0.0F, 0.2617993877991494F); + bipedRightArm.addChild(PauldronR_1); + + PauldronL_1 = new ModelRenderer(this, "Pauldron Left 2"); + PauldronL_1.setTextureOffset(64, 0); + PauldronL_1.setRotationPoint(0.0F, 0.0F, 0.0F); + PauldronL_1.addBox(-1.5F, -8.0F, -4.0F, 7, 11, 8, 0.1F); + setRotateAngle(PauldronL_1, 0.0F, -0.0F, -0.2617993877991494F); + bipedLeftArm.addChild(PauldronL_1); + + WingL = new ModelRenderer(this, "Wing Left"); + WingL.setTextureOffset(82, 5); + WingL.setRotationPoint(0.0F, 0.0F, 0.0F); + WingL.addBox(0.0F, -6.0F, 3.0F, 0, 28, 14, 0.0F); + setRotateAngle(WingL, 0.0F, -0.2617993877991494F, 0.0F); + bipedBody.addChild(WingL); + + WingR = new ModelRenderer(this, "Wing Right"); + WingR.setTextureOffset(82, 5); + WingR.setRotationPoint(0.0F, 0.0F, 0.0F); + WingR.addBox(0.0F, -6.0F, 3.0F, 0, 28, 14, 0.0F); + setRotateAngle(WingR, 0.0F, 0.2617993877991494F, 0.0F); + bipedBody.addChild(WingR); + + Plackart = new ModelRenderer(this, "Plackart"); + Plackart.setTextureOffset(0, 42); + Plackart.setRotationPoint(0.0F, 0.0F, 0.0F); + Plackart.addBox(-4.0F, 5.0F, -3.0F, 8, 7, 6, 0.0F); + bipedBody.addChild(Plackart); + + BreastPlate = new ModelRenderer(this, "BreastPlate"); + BreastPlate.setTextureOffset(0, 32); + BreastPlate.setRotationPoint(0.0F, 0.0F, 0.0F); + BreastPlate.addBox(-4.0F, 0.1F, -3.6F, 8, 6, 4, 0.1F); + bipedBody.addChild(BreastPlate); + + BackPlate = new ModelRenderer(this, "Back Plate"); + BackPlate.setTextureOffset(0, 56); + BackPlate.setRotationPoint(0.0F, 0.0F, 0.0F); + BackPlate.addBox(-4.0F, 0.0F, 1.0F, 8, 5, 3, 0.0F); + setRotateAngle(BackPlate, -0.08726646006107329F, -0.0F, 0.0F); + bipedBody.addChild(BackPlate); + + WingL.isHidden = true; + WingR.isHidden = true; + PauldronL_1.isHidden = true; + PauldronR_1.isHidden = true; + ArmL_1.isHidden = true; + ArmR_1.isHidden = true; + PauldronExtraL.isHidden = true; + PauldronExtraR.isHidden = true; + + init(); } /** diff --git a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersGauntlets.java b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersGauntlets.java deleted file mode 100644 index a63b402..0000000 --- a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersGauntlets.java +++ /dev/null @@ -1,104 +0,0 @@ -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.ArmorCore; -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 < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { - - GL11.glPushMatrix(); - - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - 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/heavy/ModelTinkersGrieves.java b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersGrieves.java index 58cd8cf..534f917 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersGrieves.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersGrieves.java @@ -1,15 +1,7 @@ package lance5057.tDefense.armor.renderers.heavy; -import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; /** * TinkersGrieves - Either Mojang or a mod author @@ -23,85 +15,180 @@ public class ModelTinkersGrieves extends ArmorRenderer public ModelRenderer LegPlateBackR; public ModelRenderer LegPlateR; public ModelRenderer Belt; - public ModelRenderer LeftLeg; - public ModelRenderer RightLeg; + public ModelRenderer BeltBuckle; + public ModelRenderer ThighR; + public ModelRenderer ThighL; + public ModelRenderer ThighRB; + public ModelRenderer ThighLB; + public ModelRenderer SecBeltR; + public ModelRenderer SecBeltL; + public ModelRenderer LeftFrontL; + public ModelRenderer LeftBackL; + public ModelRenderer CenterBackL; + public ModelRenderer CenterBackR; + public ModelRenderer RightFrontL; + public ModelRenderer RightBackL; + public ModelRenderer CenterFrontL; + public ModelRenderer CenterFrontR; public ModelTinkersGrieves() { - super(1f, 0, 64, 64); - - this.textureWidth = 64; - this.textureHeight = 64; - - this.LegPlateBackL = new ModelRenderer(this, 0, 43); - this.LegPlateBackL.mirror = true; - this.LegPlateBackL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.LegPlateBackL.addBox(-2.0F, 0.0F, 1.2F, 4, 5, 1, 0.1F); - this.setRotateAngle(LegPlateBackL, 0.2617993877991494F, 0.0F, 0.0F); - this.bipedLeftLeg.addChild(this.LegPlateBackL); - - this.LegPlateR = new ModelRenderer(this, 0, 32); - this.LegPlateR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.LegPlateR.addBox(1.1F, 0.0F, -1.9F, 1, 5, 4, 0.1F); - this.setRotateAngle(LegPlateR, 0.0F, 3.141592653589793F, 0.2617993877991494F); - this.bipedRightLeg.addChild(this.LegPlateR); - - this.LeftLeg = new ModelRenderer(this, 32, 32); - this.LeftLeg.mirror = true; - this.LeftLeg.setRotationPoint(0.0F, 0.0F, 0.0F); - this.LeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.05F); - this.bipedLeftLeg.addChild(this.LeftLeg); - - this.LegPlateL = new ModelRenderer(this, 0, 32); - this.LegPlateL.mirror = true; - this.LegPlateL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.LegPlateL.addBox(1.1F, 0.0F, -2.1F, 1, 5, 4, 0.1F); - this.setRotateAngle(LegPlateL, 0.0F, 0.0F, -0.2617993877991494F); - this.bipedLeftLeg.addChild(this.LegPlateL); - - this.CodPiece = new ModelRenderer(this, 0, 50); - this.CodPiece.setRotationPoint(0.0F, 0.0F, 0.0F); - this.CodPiece.addBox(-2.0F, 10.0F, -2.8F, 4, 4, 3, 0.2F); - this.bipedBody.addChild(this.CodPiece); - - this.LegPlateBackR = new ModelRenderer(this, 0, 43); - this.LegPlateBackR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.LegPlateBackR.addBox(-2.0F, 0.0F, 1.2F, 4, 5, 1, 0.1F); - this.setRotateAngle(LegPlateBackR, 0.2617993877991494F, 0.0F, 0.0F); - this.bipedRightLeg.addChild(this.LegPlateBackR); - - this.RightLeg = new ModelRenderer(this, 32, 32); - this.RightLeg.setRotationPoint(0.0F, 0.0F, 0.0F); - this.RightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.05F); - this.bipedRightLeg.addChild(this.RightLeg); - - this.Belt = new ModelRenderer(this, 8, 56); - this.Belt.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Belt.addBox(-4F, 10.0F, -3F, 8, 2, 6, 0.25F); - this.bipedBody.addChild(this.Belt); - } - - @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 < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { - - GL11.glPushMatrix(); - - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); - - GL11.glPopMatrix(); - } - } - - GL11.glPopMatrix(); + super(0.1f, 0, 64, 64); + + textureWidth = 64; + textureHeight = 64; + + SecBeltL = new ModelRenderer(this, "Hip Belt Left"); + SecBeltL.setTextureOffset(12, 56); + SecBeltL.setRotationPoint(0.0F, 0.0F, 0.0F); + SecBeltL.addBox(-1.0F, 11.5F, -2.8F, 9, 2, 6, 0.16F); + setRotateAngle(SecBeltL, 0.0F, 0.0F, 0.2617993877991494F); + bipedBody.addChild(SecBeltL); + + CodPiece = new ModelRenderer(this, "CodPiece"); + CodPiece.setTextureOffset(0, 49); + CodPiece.setRotationPoint(0.0F, 0.0F, 0.0F); + CodPiece.addBox(-2.5F, 11.0F, -3.2F, 5, 5, 3, -0.4F); + bipedBody.addChild(CodPiece); + + ThighL = new ModelRenderer(this, "Thigh Left Front"); + ThighL.setTextureOffset(12, 32); + ThighL.mirror = true; + ThighL.setRotationPoint(0.0F, 0.0F, 0.0F); + ThighL.addBox(-2.0F, 0.0F, -2.5F, 4, 6, 4, 0.2F); + setRotateAngle(ThighL, 0.08726646259971647F, 0.0F, 0.0F); + bipedLeftLeg.addChild(ThighL); + + ThighLB = new ModelRenderer(this, "Thigh Left Back"); + ThighLB.setTextureOffset(13, 42); + ThighLB.mirror = true; + ThighLB.setRotationPoint(0.0F, 0.0F, 0.0F); + ThighLB.addBox(-2.0F, 0.0F, -1.5F, 4, 6, 4, 0.1F); + setRotateAngle(ThighLB, -0.08726646259971647F, 0.0F, 0.0F); + bipedLeftLeg.addChild(ThighLB); + + SecBeltR = new ModelRenderer(this, "Hip Belt Right"); + SecBeltR.setTextureOffset(12, 56); + SecBeltR.setRotationPoint(0.0F, 0.0F, 0.0F); + SecBeltR.addBox(-8.0F, 11.5F, -2.8F, 9, 2, 6, 0.15F); + setRotateAngle(SecBeltR, 0.0F, 0.0F, -0.2617993877991494F); + bipedBody.addChild(SecBeltR); + + CenterFrontL = new ModelRenderer(this, "Center Front"); + CenterFrontL.setTextureOffset(29, 43); + CenterFrontL.setRotationPoint(0.0F, 0.0F, 0.0F); + CenterFrontL.addBox(-2.9F, -0.2F, -2.5F, 2, 11, 2, 0.0F); + setRotateAngle(CenterFrontL, -0.08726646259971647F, 0.0F, 0.0F); + bipedLeftLeg.addChild(CenterFrontL); + + CenterFrontR = new ModelRenderer(this, "Center Front"); + CenterFrontR.setTextureOffset(29, 43); + CenterFrontR.setRotationPoint(0.0F, 0.0F, 0.0F); + CenterFrontR.addBox(0.9F, -0.2F, -2.5F, 2, 11, 2, 0.0F); + setRotateAngle(CenterFrontR, -0.08726646259971647F, 0.0F, 0.0F); + bipedRightLeg.addChild(CenterFrontR); + + LegPlateBackR = new ModelRenderer(this, "Leg Plate Back Right"); + LegPlateBackR.setTextureOffset(0, 43); + LegPlateBackR.setRotationPoint(0.0F, 0.0F, 0.0F); + LegPlateBackR.addBox(-2.0F, 0.1F, 2.1F, 4, 5, 1, 0.0F); + setRotateAngle(LegPlateBackR, 0.2617993877991494F, 0.0F, 0.0F); + bipedRightLeg.addChild(LegPlateBackR); + + Belt = new ModelRenderer(this, "Belt"); + Belt.setTextureOffset(12, 56); + Belt.setRotationPoint(0.0F, 0.0F, 0.0F); + Belt.addBox(-4.5F, 10.0F, -2.8F, 9, 2, 6, 0.25F); + bipedBody.addChild(Belt); + + ThighR = new ModelRenderer(this, "Thigh Right"); + ThighR.setTextureOffset(12, 32); + ThighR.setRotationPoint(0.0F, 0.0F, 0.0F); + ThighR.addBox(-2.0F, 0.0F, -2.5F, 4, 6, 4, 0.2F); + setRotateAngle(ThighR, 0.08726646259971647F, 0.0F, 0.0F); + bipedRightLeg.addChild(ThighR); + + ThighRB = new ModelRenderer(this, "Thigh Right Back"); + ThighRB.setTextureOffset(13, 42); + ThighRB.setRotationPoint(0.0F, 0.0F, 0.0F); + ThighRB.addBox(-2.0F, 0.0F, -1.5F, 4, 6, 4, 0.1F); + setRotateAngle(ThighRB, -0.08726646259971647F, 0.0F, 0.0F); + bipedRightLeg.addChild(ThighRB); + + LegPlateL = new ModelRenderer(this, "Leg Plate Left"); + LegPlateL.setTextureOffset(0, 32); + LegPlateL.mirror = true; + LegPlateL.setRotationPoint(0.0F, 0.0F, 0.0F); + LegPlateL.addBox(1.6F, -0.1F, -2.5F, 1, 5, 5, 0.1F); + setRotateAngle(LegPlateL, 0.0F, 0.0F, -0.2617993877991494F); + bipedLeftLeg.addChild(LegPlateL); + + RightBackL = new ModelRenderer(this, "Right Back Left"); + RightBackL.setTextureOffset(42, 34); + RightBackL.setRotationPoint(0.0F, 0.0F, 0.0F); + RightBackL.addBox(-2.2F, -0.3F, -1.5F, 4, 11, 4, 0.0F); + setRotateAngle(RightBackL, 0.08726646259971647F, 0.0F, 0.08726646259971647F); + bipedRightLeg.addChild(RightBackL); + + LeftBackL = new ModelRenderer(this, "Left Back Left"); + LeftBackL.setTextureOffset(42, 34); + LeftBackL.mirror = true; + LeftBackL.setRotationPoint(0.0F, 0.0F, 0.0F); + LeftBackL.addBox(-1.8F, -0.3F, -1.5F, 4, 11, 4, 0.0F); + setRotateAngle(LeftBackL, 0.08726646259971647F, 0.0F, -0.08726646259971647F); + bipedLeftLeg.addChild(LeftBackL); + + LegPlateR = new ModelRenderer(this, "Leg Plate Right"); + LegPlateR.setTextureOffset(0, 32); + LegPlateR.setRotationPoint(0.0F, 0.0F, 0.0F); + LegPlateR.addBox(-2.6F, -0.1F, -2.5F, 1, 5, 5, 0.1F); + setRotateAngle(LegPlateR, 0.0F, 0.0F, 0.2617993877991494F); + bipedRightLeg.addChild(LegPlateR); + + RightFrontL = new ModelRenderer(this, "Right Front Left"); + RightFrontL.setTextureOffset(42, 49); + RightFrontL.setRotationPoint(0.0F, 0.0F, 0.0F); + RightFrontL.addBox(-2.2F, -0.3F, -2.5F, 4, 11, 4, 0.0F); + setRotateAngle(RightFrontL, -0.08726646259971647F, 0.0F, 0.08726646259971647F); + bipedRightLeg.addChild(RightFrontL); + + BeltBuckle = new ModelRenderer(this, "Belt Buckle"); + BeltBuckle.setTextureOffset(0, 58); + BeltBuckle.setRotationPoint(0.0F, 0.0F, 0.0F); + BeltBuckle.addBox(-2.0F, 9.0F, -3.5F, 4, 4, 2, -0.3F); + bipedBody.addChild(BeltBuckle); + + LegPlateBackL = new ModelRenderer(this, "Leg Plate Back Left"); + LegPlateBackL.setTextureOffset(0, 43); + LegPlateBackL.mirror = true; + LegPlateBackL.setRotationPoint(0.0F, 0.0F, 0.0F); + LegPlateBackL.addBox(-2.0F, 0.1F, 2.1F, 4, 5, 1, 0.0F); + setRotateAngle(LegPlateBackL, 0.2617993877991494F, 0.0F, 0.0F); + bipedLeftLeg.addChild(LegPlateBackL); + + LeftFrontL = new ModelRenderer(this, "Left Front Left"); + LeftFrontL.setTextureOffset(42, 49); + LeftFrontL.mirror = true; + LeftFrontL.setRotationPoint(0.0F, 0.0F, 0.0F); + LeftFrontL.addBox(-1.8F, -0.3F, -2.5F, 4, 11, 4, 0.0F); + setRotateAngle(LeftFrontL, -0.08726646259971647F, 0.0F, -0.08726646259971647F); + bipedLeftLeg.addChild(LeftFrontL); + + CenterBackL = new ModelRenderer(this, "Center Back Left"); + CenterBackL.setTextureOffset(29, 43); + CenterBackL.setRotationPoint(0.0F, 0.0F, 0.0F); + CenterBackL.addBox(-2.9F, -0.2F, 0.5F, 2, 11, 2, 0.0F); + setRotateAngle(CenterBackL, 0.08726646259971647F, 0.0F, 0.0F); + bipedLeftLeg.addChild(CenterBackL); + + CenterBackR = new ModelRenderer(this, "Center Back Right"); + CenterBackR.setTextureOffset(29, 43); + CenterBackR.setRotationPoint(0.0F, 0.0F, 0.0F); + CenterBackR.addBox(0.9F, -0.2F, 0.5F, 2, 11, 2, 0.0F); + setRotateAngle(CenterBackR, 0.08726646259971647F, 0.0F, 0.0F); + bipedRightLeg.addChild(CenterBackR); + + init(); } /** diff --git a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersHelm.java b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersHelm.java index 005b182..8e35b7c 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersHelm.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersHelm.java @@ -1,15 +1,7 @@ package lance5057.tDefense.armor.renderers.heavy; -import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; /** * TinkerHelm - Either Mojang or a mod author @@ -18,59 +10,201 @@ import cpw.mods.fml.client.FMLClientHandler; public class ModelTinkersHelm extends ArmorRenderer { public ModelRenderer Visor; + public ModelRenderer Helm2; + public ModelRenderer WingR; + public ModelRenderer WingL; public ModelRenderer Helm; public ModelRenderer Trim; + public ModelRenderer HornR; + public ModelRenderer HornL; + public ModelRenderer HornTipR; + public ModelRenderer HornTipL; + public ModelRenderer FeatherRod; + public ModelRenderer Feathers; + public ModelRenderer FeatherBase; + public ModelRenderer HornR_1; + public ModelRenderer HornL_1; + public ModelRenderer HornTipR_1; + public ModelRenderer HornTipL_1; + public ModelRenderer HornR_2; + public ModelRenderer HornL_2; + public ModelRenderer HornTipR_2; + public ModelRenderer HornTipL_2; + public ModelRenderer SpikeBase; + public ModelRenderer Spike2; + public ModelRenderer Spike1; public ModelTinkersHelm() { - super(1.5f, 0, 64, 64); - - this.textureWidth = 64; - this.textureHeight = 64; - this.Helm = new ModelRenderer(this, 0, 47); - this.Helm.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Helm.addBox(-4.0F, -8.0F, -4.0F, 8, 9, 8, 0.5F); - this.bipedHead.addChild(this.Helm); - - this.Visor = new ModelRenderer(this, 0, 32); - this.Visor.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Visor.addBox(-4.5F, -6.5F, -4.7F, 9, 5, 8, 0.1F); - this.bipedHead.addChild(this.Visor); - - this.Trim = new ModelRenderer(this, 44, 47); - this.Trim.setRotationPoint(0.0F, 0.0F, 0.0F); - this.Trim.addBox(-1.0F, -8.3F, -4.0F, 2, 9, 8, 0.7F); - this.bipedHead.addChild(this.Trim); - - this.bipedBody.isHidden = true; - this.bipedCloak.isHidden = true; - this.bipedLeftArm.isHidden = true; - this.bipedLeftLeg.isHidden = true; - this.bipedRightArm.isHidden = true; - this.bipedRightLeg.isHidden = true; - } - - @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 < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { - - GL11.glPushMatrix(); - - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); - - GL11.glPopMatrix(); - } - } - - GL11.glPopMatrix(); + super(0.1f, 0, 128, 64); + + textureWidth = 128; + textureHeight = 64; + + HornR = new ModelRenderer(this, "Horn Right"); + HornR.setTextureOffset(26, 32); + HornR.setRotationPoint(0.0F, -2.0F, 0.0F); + HornR.addBox(-1.0F, -10.0F, -1.0F, 2, 5, 2, 0.25F); + setRotateAngle(HornR, 0.0F, 0.0F, 0.7853981633974483F); + bipedHead.addChild(HornR); + + HornTipR = new ModelRenderer(this, "Horn Tip Right"); + HornTipR.setTextureOffset(26, 32); + HornTipR.setRotationPoint(0.0F, -10.0F, 0.0F); + HornTipR.addBox(-0.8F, -1.0F, -1.0F, 2, 6, 2, 0.0F); + setRotateAngle(HornTipR, 0.0F, 0.0F, 2.007128639793479F); + + HornR_1 = new ModelRenderer(this, "Horn Right 2"); + HornR_1.setTextureOffset(26, 32); + HornR_1.setRotationPoint(2.25F, -6.0F, 2.0F); + HornR_1.addBox(-1.0F, -10.0F, -1.0F, 2, 5, 2, 0.25F); + setRotateAngle(HornR_1, 1.3962634015954636F, 0.2617993877991494F, 1.5707963267948966F); + bipedHead.addChild(HornR_1); + + HornTipR_1 = new ModelRenderer(this, "Horn Tip Right 2"); + HornTipR_1.setTextureOffset(26, 32); + HornTipR_1.setRotationPoint(0.0F, -10.0F, 0.0F); + HornTipR_1.addBox(-0.8F, -1.0F, -1.0F, 2, 6, 2, 0.0F); + setRotateAngle(HornTipR_1, 0.0F, 0.0F, 2.007128639793479F); + + HornR_2 = new ModelRenderer(this, "Horn Right 3"); + HornR_2.setTextureOffset(26, 32); + HornR_2.setRotationPoint(1.75F, -3.0F, 4.0F); + HornR_2.addBox(-1.0F, -10.0F, -1.0F, 2, 5, 2, 0.25F); + setRotateAngle(HornR_2, 1.3962634015954636F, -0.2617993877991494F, 1.5707963267948966F); + bipedHead.addChild(HornR_2); + + HornTipR_2 = new ModelRenderer(this, "Horn Tip Right 3"); + HornTipR_2.setTextureOffset(26, 32); + HornTipR_2.setRotationPoint(0.0F, -10.0F, 0.0F); + HornTipR_2.addBox(-0.8F, -1.0F, -1.0F, 2, 6, 2, 0.0F); + setRotateAngle(HornTipR_2, 0.0F, 0.0F, 2.007128639793479F); + + HornL = new ModelRenderer(this, "Horn Left"); + HornL.setTextureOffset(26, 32); + HornL.setRotationPoint(0.0F, -2.0F, 0.0F); + HornL.addBox(-1.0F, -10.0F, -1.0F, 2, 5, 2, 0.25F); + setRotateAngle(HornL, 0.0F, 0.0F, -0.7853981633974483F); + bipedHead.addChild(HornL); + + HornTipL = new ModelRenderer(this, "Horn Tip Left"); + HornTipL.setTextureOffset(26, 32); + HornTipL.setRotationPoint(0.0F, -10.0F, 0.0F); + HornTipL.addBox(-1.2F, -1.0F, -1.0F, 2, 6, 2, 0.0F); + setRotateAngle(HornTipL, 0.0F, 0.0F, -2.007128639793479F); + + HornL_1 = new ModelRenderer(this, "Horn Left 2"); + HornL_1.setTextureOffset(26, 32); + HornL_1.setRotationPoint(-2.25F, -6.0F, 2.0F); + HornL_1.addBox(-1.0F, -10.0F, -1.0F, 2, 5, 2, 0.25F); + setRotateAngle(HornL_1, 1.3962634015954636F, -0.2617993877991494F, -1.5707963267948966F); + bipedHead.addChild(HornL_1); + + HornTipL_1 = new ModelRenderer(this, "Horn Tip Left 2"); + HornTipL_1.setTextureOffset(26, 32); + HornTipL_1.setRotationPoint(0.0F, -10.0F, 0.0F); + HornTipL_1.addBox(-1.2F, -1.0F, -1.0F, 2, 6, 2, 0.0F); + setRotateAngle(HornTipL_1, 0.0F, 0.0F, -2.007128639793479F); + + HornL_2 = new ModelRenderer(this, "Horn Left 3"); + HornL_2.setTextureOffset(26, 32); + HornL_2.setRotationPoint(-1.75F, -3.0F, 4.0F); + HornL_2.addBox(-1.0F, -10.0F, -1.0F, 2, 5, 2, 0.25F); + setRotateAngle(HornL_2, 1.3962634015954636F, 0.2617993877991494F, -1.5707963267948966F); + bipedHead.addChild(HornL_2); + + HornTipL_2 = new ModelRenderer(this, "Horn Tip Left 3"); + HornTipL_2.setTextureOffset(26, 32); + HornTipL_2.setRotationPoint(0.0F, -10.0F, 0.0F); + HornTipL_2.addBox(-1.2F, -1.0F, -1.0F, 2, 6, 2, 0.0F); + setRotateAngle(HornTipL_2, 0.0F, 0.0F, -2.007128639793479F); + + FeatherBase = new ModelRenderer(this, "Feather Base"); + FeatherBase.setTextureOffset(64, 13); + FeatherBase.setRotationPoint(0.0F, 0.0F, 0.0F); + FeatherBase.addBox(-2.0F, -10.0F, -5.3F, 4, 1, 9, 0.0F); + setRotateAngle(FeatherBase, -0.08726646259971647F, 0.0F, 0.0F); + bipedHead.addChild(FeatherBase); + + WingL = new ModelRenderer(this, "Wing Left"); + WingL.setTextureOffset(0, 44); + WingL.setRotationPoint(0.0F, 0.0F, 0.0F); + WingL.addBox(5.7F, -11.0F, -3.5F, 0, 12, 8, 0.0F); + setRotateAngle(WingL, 0.0F, 0.2617993877991494F, 0.0F); + bipedHead.addChild(WingL); + + Trim = new ModelRenderer(this, "Trim"); + Trim.setTextureOffset(64, 23); + Trim.setRotationPoint(0.0F, 0.0F, 0.0F); + Trim.addBox(-1.0F, -8.3F, -4.0F, 2, 9, 8, 0.7F); + bipedHead.addChild(Trim); + + Visor = new ModelRenderer(this, "Visor"); + Visor.setTextureOffset(0, 32); + Visor.setRotationPoint(0.0F, 0.0F, 0.0F); + Visor.addBox(-4.5F, -9.5F, -4.7F, 9, 12, 8, 0.1F); + bipedHead.addChild(Visor); + + Feathers = new ModelRenderer(this, "Feathers"); + Feathers.setTextureOffset(64, 0); + Feathers.setRotationPoint(0.0F, 0.0F, 0.0F); + Feathers.addBox(-2.0F, -12.7F, -6.1F, 4, 4, 9, -0.3F); + setRotateAngle(Feathers, -0.17453292519943295F, 0.0F, 0.0F); + bipedHead.addChild(Feathers); + + FeatherRod = new ModelRenderer(this, "Feather Rod"); + FeatherRod.setTextureOffset(0, 32); + FeatherRod.setRotationPoint(0.0F, 0.0F, 0.0F); + FeatherRod.addBox(-1.0F, -9.3F, -1.2F, 2, 1, 2, 0.2F); + bipedHead.addChild(FeatherRod); + + Helm2 = new ModelRenderer(this, "Heavy Visor"); + Helm2.setTextureOffset(34, 32); + Helm2.setRotationPoint(0.0F, 0.0F, 0.0F); + Helm2.addBox(-4.0F, -9.0F, -4.0F, 8, 10, 8, 0.6F); + bipedHead.addChild(Helm2); + + Spike1 = new ModelRenderer(this, "Spike"); + Spike1.setTextureOffset(16, 52); + Spike1.setRotationPoint(0.0F, 0.0F, 0.0F); + Spike1.addBox(-2.5F, -14.0F, 0.0F, 5, 5, 0, 0.0F); + bipedHead.addChild(Spike1); + + SpikeBase = new ModelRenderer(this, "Spike Base"); + SpikeBase.setTextureOffset(66, 40); + SpikeBase.setRotationPoint(0.0F, 0.0F, 0.0F); + SpikeBase.addBox(-2.0F, -8.6F, -2.0F, 4, 1, 4, 0.5F); + bipedHead.addChild(SpikeBase); + + Spike2 = new ModelRenderer(this, "Spike"); + Spike2.setTextureOffset(16, 47); + Spike2.setRotationPoint(0.0F, 0.0F, 0.0F); + Spike2.addBox(0.0F, -14.0F, -2.5F, 0, 5, 5, 0.0F); + bipedHead.addChild(Spike2); + + Helm = new ModelRenderer(this, "Helm"); + Helm.setTextureOffset(64, 47); + Helm.setRotationPoint(0.0F, 0.0F, 0.0F); + Helm.addBox(-4.0F, -8.0F, -4.0F, 8, 9, 8, 0.5F); + bipedHead.addChild(Helm); + + WingR = new ModelRenderer(this, "Wing Right"); + WingR.setTextureOffset(0, 44); + WingR.setRotationPoint(0.0F, 0.0F, 0.0F); + WingR.addBox(-5.7F, -11.0F, -3.5F, 0, 12, 8, 0.0F); + setRotateAngle(WingR, 0.0F, -0.2617993877991494F, 0.0F); + bipedHead.addChild(WingR); + + HornR.addChild(HornTipR); + HornL.addChild(HornTipL); + + HornL_1.addChild(HornTipL_1); + HornR_1.addChild(HornTipR_1); + + HornL_2.addChild(HornTipL_2); + HornR_2.addChild(HornTipR_2); + + init(); } /** diff --git a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersSabatons.java b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersSabatons.java index ca24d32..bb88643 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersSabatons.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/heavy/ModelTinkersSabatons.java @@ -1,24 +1,16 @@ package lance5057.tDefense.armor.renderers.heavy; -import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; /** - * ModelBiped - Either Mojang or a mod author + * TinkersSabatons - Either Mojang or a mod author * Created using Tabula 4.1.1 */ public class ModelTinkersSabatons extends ArmorRenderer { public ModelRenderer BootL; - public ModelRenderer KneeGuardR; + public ModelRenderer FlairBackR; public ModelRenderer ShinGuardL; public ModelRenderer KneeGuardCapL; public ModelRenderer LegBackL; @@ -27,110 +19,161 @@ public class ModelTinkersSabatons extends ArmorRenderer public ModelRenderer BootCapR; public ModelRenderer BootCapL; public ModelRenderer LegBackR; - public ModelRenderer KneeGuardL; + public ModelRenderer FlairL; public ModelRenderer KneeGuardCapR; + public ModelRenderer BootTipR; + public ModelRenderer BootTipL; + public ModelRenderer KneeGuardR; + public ModelRenderer KneeGuardL; + public ModelRenderer FlairR; + public ModelRenderer BackFlairL; public ModelTinkersSabatons() { - super(1f, 0, 64, 64); - - this.textureWidth = 64; - this.textureHeight = 64; - - this.ShinGuardL = new ModelRenderer(this, 0, 48); - this.ShinGuardL.mirror = true; - this.ShinGuardL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ShinGuardL.addBox(-2.0F, 4.0F, -2.6F, 4, 5, 3, 0.11F); - this.setRotateAngle(ShinGuardL, 0.05759586531581287F, 0.0F, 0.0F); - this.bipedLeftLeg.addChild(this.ShinGuardL); - - this.KneeGuardL = new ModelRenderer(this, 6, 32); - this.KneeGuardL.mirror = true; - this.KneeGuardL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.KneeGuardL.addBox(-2.0F, 3.0F, -2.5F, 4, 3, 4, 0.2F); - this.bipedLeftLeg.addChild(this.KneeGuardL); - - this.BootL = new ModelRenderer(this, 0, 56); - this.BootL.mirror = true; - this.BootL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.BootL.addBox(-2.0F, 9.0F, -3.0F, 4, 3, 5, 0.2F); - this.bipedLeftLeg.addChild(this.BootL); - - this.KneeGuardCapL = new ModelRenderer(this, 0, 37); - this.KneeGuardCapL.mirror = true; - this.KneeGuardCapL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.KneeGuardCapL.addBox(-1.0F, 2.4F, -3.0F, 2, 2, 1, 0.2F); - this.bipedLeftLeg.addChild(this.KneeGuardCapL); - - this.KneeGuardR = new ModelRenderer(this, 6, 32); - this.KneeGuardR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.KneeGuardR.addBox(-2.0F, 3.0F, -2.5F, 4, 3, 4, 0.2F); - this.bipedRightLeg.addChild(this.KneeGuardR); - - this.LegBackL = new ModelRenderer(this, 0, 40); - this.LegBackL.mirror = true; - this.LegBackL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.LegBackL.addBox(-2.0F, 3.0F, -2.6F, 4, 6, 2, 0.1F); - this.setRotateAngle(LegBackL, 0.05759586531581287F, 3.141592653589793F, 0.0F); - this.bipedLeftLeg.addChild(this.LegBackL); - - this.BootCapL = new ModelRenderer(this, 0, 33); - this.BootCapL.mirror = true; - this.BootCapL.setRotationPoint(0.0F, 0.0F, 0.0F); - this.BootCapL.addBox(-1.0F, 9.1F, -5.2F, 2, 2, 1, 0.2F); - this.setRotateAngle(BootCapL, 0.17453292519943295F, 0.0F, 0.0F); - this.bipedLeftLeg.addChild(this.BootCapL); - - this.KneeGuardCapR = new ModelRenderer(this, 0, 37); - this.KneeGuardCapR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.KneeGuardCapR.addBox(-1.0F, 2.4F, -3.0F, 2, 2, 1, 0.2F); - this.bipedRightLeg.addChild(this.KneeGuardCapR); - - this.BootR = new ModelRenderer(this, 0, 56); - this.BootR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.BootR.addBox(-2.0F, 9.0F, -3.0F, 4, 3, 5, 0.2F); - this.bipedRightLeg.addChild(this.BootR); - - this.ShinGuardR = new ModelRenderer(this, 0, 48); - this.ShinGuardR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.ShinGuardR.addBox(-2.0F, 4.0F, -2.6F, 4, 5, 3, 0.11F); - this.setRotateAngle(ShinGuardR, 0.05759586531581287F, 0.0F, 0.0F); - this.bipedRightLeg.addChild(this.ShinGuardR); - - this.LegBackR = new ModelRenderer(this, 0, 40); - this.LegBackR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.LegBackR.addBox(-2.0F, 3.0F, -2.6F, 4, 6, 2, 0.1F); - this.setRotateAngle(LegBackR, 0.05759586531581287F, 3.141592653589793F, 0.0F); - this.bipedRightLeg.addChild(this.LegBackR); - - this.BootCapR = new ModelRenderer(this, 0, 33); - this.BootCapR.setRotationPoint(0.0F, 0.0F, 0.0F); - this.BootCapR.addBox(-1.0F, 9.1F, -5.2F, 2, 2, 1, 0.2F); - this.setRotateAngle(BootCapR, 0.17453292519943295F, 0.0F, 0.0F); - this.bipedRightLeg.addChild(this.BootCapR); - } - - @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 < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { - - GL11.glPushMatrix(); - - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); - - GL11.glPopMatrix(); - } - } - - GL11.glPopMatrix(); + super(0.1f, 0, 64, 64); + + textureWidth = 64; + textureHeight = 64; + + BootR = new ModelRenderer(this, "Boot Right"); + BootR.setTextureOffset(0, 56); + BootR.setRotationPoint(0.0F, 0.0F, 0.0F); + BootR.addBox(-2.0F, 9.0F, -3.0F, 4, 3, 5, 0.2F); + bipedRightLeg.addChild(BootR); + + BootL = new ModelRenderer(this, "Boot Left"); + BootL.setTextureOffset(0, 56); + BootL.mirror = true; + BootL.setRotationPoint(0.0F, 0.0F, 0.0F); + BootL.addBox(-2.0F, 9.0F, -3.0F, 4, 3, 5, 0.2F); + bipedLeftLeg.addChild(BootL); + + KneeGuardR = new ModelRenderer(this, "Knee Guard Right"); + KneeGuardR.setTextureOffset(0, 32); + KneeGuardR.setRotationPoint(0.0F, 0.0F, 0.0F); + KneeGuardR.addBox(-2.0F, 3.1F, -2.5F, 4, 3, 4, 0.3F); + bipedRightLeg.addChild(KneeGuardR); + + KneeGuardL = new ModelRenderer(this, "Knee Guard Left"); + KneeGuardL.setTextureOffset(0, 32); + KneeGuardL.mirror = true; + KneeGuardL.setRotationPoint(0.0F, 0.0F, 0.0F); + KneeGuardL.addBox(-2.0F, 3.1F, -2.5F, 4, 3, 4, 0.3F); + bipedLeftLeg.addChild(KneeGuardL); + + ShinGuardR = new ModelRenderer(this, "Shin Guard Right"); + ShinGuardR.setTextureOffset(0, 48); + ShinGuardR.setRotationPoint(0.0F, 0.0F, 0.0F); + ShinGuardR.addBox(-2.0F, 4.0F, -2.5F, 4, 5, 3, 0.11F); + setRotateAngle(ShinGuardR, 0.05759586531581287F, 0.0F, 0.0F); + bipedRightLeg.addChild(ShinGuardR); + + ShinGuardL = new ModelRenderer(this, "Shin Guard Left"); + ShinGuardL.setTextureOffset(0, 48); + ShinGuardL.mirror = true; + ShinGuardL.setRotationPoint(0.0F, 0.0F, 0.0F); + ShinGuardL.addBox(-2.0F, 4.0F, -2.5F, 4, 5, 3, 0.11F); + setRotateAngle(ShinGuardL, 0.05759586531581287F, 0.0F, 0.0F); + bipedLeftLeg.addChild(ShinGuardL); + + LegBackL = new ModelRenderer(this, "Leg Back Left"); + LegBackL.setTextureOffset(0, 40); + LegBackL.mirror = true; + LegBackL.setRotationPoint(0.0F, 0.0F, 0.0F); + LegBackL.addBox(-2.0F, 3.0F, 0.6F, 4, 6, 2, 0.1F); + setRotateAngle(LegBackL, -0.05759586531581287F, 0.0F, 0.0F); + bipedLeftLeg.addChild(LegBackL); + + LegBackR = new ModelRenderer(this, "Leg Back Right"); + LegBackR.setTextureOffset(0, 40); + LegBackR.setRotationPoint(0.0F, 0.0F, 0.0F); + LegBackR.addBox(-2.0F, 3.0F, 0.6F, 4, 6, 2, 0.1F); + setRotateAngle(LegBackR, -0.05759586531581287F, 0.0F, 0.0F); + bipedRightLeg.addChild(LegBackR); + + FlairR = new ModelRenderer(this, "Flair Right"); + FlairR.setTextureOffset(18, 53); + FlairR.setRotationPoint(0.0F, 0.0F, 0.0F); + FlairR.addBox(0.9F, 0.2F, -2.5F, 5, 11, 0, 0.0F); + setRotateAngle(FlairR, 0.0F, -0.6108652381980153F, 0.0F); + bipedLeftLeg.addChild(FlairR); + + FlairL = new ModelRenderer(this, "Flair Left"); + FlairL.setTextureOffset(18, 53); + FlairL.mirror = true; + FlairL.setRotationPoint(0.0F, 0.0F, 0.0F); + FlairL.addBox(-5.9F, 0.2F, -2.5F, 5, 11, 0, 0.0F); + setRotateAngle(FlairL, 0.0F, 0.6108652381980153F, 0.0F); + bipedRightLeg.addChild(FlairL); + + FlairBackR = new ModelRenderer(this, "Flair Back Right"); + FlairBackR.setTextureOffset(28, 47); + FlairBackR.setRotationPoint(0.0F, 0.0F, 0.0F); + FlairBackR.addBox(0.0F, 0.0F, 2.0F, 0, 12, 5, 0.0F); + bipedRightLeg.addChild(FlairBackR); + + BackFlairL = new ModelRenderer(this, "Flair Back Left"); + BackFlairL.setTextureOffset(28, 47); + BackFlairL.mirror = true; + BackFlairL.setRotationPoint(0.0F, 0.0F, 0.0F); + BackFlairL.addBox(0.0F, 0.0F, 2.0F, 0, 12, 5, 0.0F); + bipedLeftLeg.addChild(BackFlairL); + + KneeGuardCapR = new ModelRenderer(this, "Knee Guard Cap Right"); + KneeGuardCapR.setTextureOffset(16, 36); + KneeGuardCapR.setRotationPoint(0.0F, 0.0F, 0.0F); + KneeGuardCapR.addBox(-1.5F, 2.4F, -3.8F, 3, 2, 1, 0.2F); + setRotateAngle(KneeGuardCapR, 0.17453292519943295F, 0.0F, 0.0F); + bipedRightLeg.addChild(KneeGuardCapR); + + KneeGuardCapL = new ModelRenderer(this, "Knee Guard Cap Left"); + KneeGuardCapL.setTextureOffset(16, 36); + KneeGuardCapL.mirror = true; + KneeGuardCapL.setRotationPoint(0.0F, 0.0F, 0.0F); + KneeGuardCapL.addBox(-1.5F, 2.4F, -3.8F, 3, 2, 1, 0.2F); + setRotateAngle(KneeGuardCapL, 0.17453292519943295F, 0.0F, 0.0F); + bipedLeftLeg.addChild(KneeGuardCapL); + + BootTipR = new ModelRenderer(this, "Boot Tip Right"); + BootTipR.setTextureOffset(22, 32); + BootTipR.setRotationPoint(0.0F, 0.0F, 0.0F); + BootTipR.addBox(-1.4F, 10.0F, -2.5F, 3, 2, 2, -0.1F); + setRotateAngle(BootTipR, -0.3490658503988659F, 0.0F, 0.0F); + bipedRightLeg.addChild(BootTipR); + + BootCapR = new ModelRenderer(this, "Boot Cap Right"); + BootCapR.setTextureOffset(12, 32); + BootCapR.setRotationPoint(0.0F, 0.0F, 0.0F); + BootCapR.addBox(-1.5F, 10.0F, -2.5F, 3, 2, 2, 0.3F); + setRotateAngle(BootCapR, -0.17453292519943295F, 0.0F, 0.0F); + bipedRightLeg.addChild(BootCapR); + + BootTipL = new ModelRenderer(this, "Boot Tip Left"); + BootTipL.setTextureOffset(22, 32); + BootTipL.mirror = true; + BootTipL.setRotationPoint(0.0F, 0.0F, 0.0F); + BootTipL.addBox(-1.5F, 10.0F, -2.6F, 3, 2, 2, -0.1F); + setRotateAngle(BootTipL, -0.3490658503988659F, 0.0F, 0.0F); + bipedLeftLeg.addChild(BootTipL); + + BootCapL = new ModelRenderer(this, "Boot Cap Left"); + BootCapL.setTextureOffset(12, 32); + BootCapL.mirror = true; + BootCapL.setRotationPoint(0.0F, 0.0F, 0.0F); + BootCapL.addBox(-1.5F, 10.0F, -2.5F, 3, 2, 2, 0.3F); + setRotateAngle(BootCapL, -0.17453292519943295F, 0.0F, 0.0F); + bipedLeftLeg.addChild(BootCapL); + + BootCapL.isHidden = true; + BootCapR.isHidden = true; + BootTipL.isHidden = true; + BootTipR.isHidden = true; + FlairBackR.isHidden = true; + BackFlairL.isHidden = true; + FlairL.isHidden = true; + FlairR.isHidden = true; + + init(); } /** 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 41dff40..3294e83 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersBoots.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersBoots.java @@ -1,76 +1,89 @@ package lance5057.tDefense.armor.renderers.light; -import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; /** - * ModelBiped - Either Mojang or a mod author + * ModelTinkersBoots - Either Mojang or a mod author * Created using Tabula 4.1.1 */ public class ModelTinkersBoots extends ArmorRenderer { - public ModelRenderer LegR; - public ModelRenderer LegL; + public ModelRenderer BootTopR; + public ModelRenderer BootTopL; public ModelRenderer FootL; public ModelRenderer FootR; + public ModelRenderer LegGuardL; + public ModelRenderer LegGuardR; + public ModelRenderer FootTipL; + public ModelRenderer FootTipR; public ModelTinkersBoots() { - super(1.1f, 0, 64, 64); - - this.textureWidth = 64; - this.textureHeight = 64; - - 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.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.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.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.01F); - this.bipedRightLeg.addChild(this.LegR); - } - - @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 < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { - - GL11.glPushMatrix(); - - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); - - GL11.glPopMatrix(); - } - } - - GL11.glPopMatrix(); + super(0.1f, 0, 64, 64); + + textureWidth = 64; + textureHeight = 64; + + FootR = new ModelRenderer(this, "FootR"); + FootR.setTextureOffset(0, 41); + FootR.setRotationPoint(0f, 0f, 0f); + FootR.addBox(-2.0F, 10.0F, -3.0F, 4, 2, 1, 0.0F); + bipedRightLeg.addChild(FootR); + + BootTopR = new ModelRenderer(this, "BootTopR"); + BootTopR.setTextureOffset(0, 32); + BootTopR.setRotationPoint(0f, 0f, 0f); + BootTopR.addBox(-2.5F, 3.5F, -2.5F, 5, 4, 5, -0.2F); + bipedRightLeg.addChild(BootTopR); + + BootTopL = new ModelRenderer(this, "BootTopL"); + BootTopL.setTextureOffset(0, 32); + BootTopL.setRotationPoint(0f, 0f, 0f); + BootTopL.addBox(-2.5F, 3.5F, -2.5F, 5, 4, 5, -0.2F); + bipedLeftLeg.addChild(BootTopL); + + LegGuardR = new ModelRenderer(this, "LegGuardR"); + LegGuardR.setTextureOffset(0, 44); + LegGuardR.setRotationPoint(0f, 0f, 0f); + LegGuardR.addBox(-2.0F, 5.5F, -3.8F, 4, 4, 2, 0.2F); + setRotateAngle(LegGuardR, 0.17453292519943295F, 0.0F, 0.0F); + bipedRightLeg.addChild(LegGuardR); + + FootTipR = new ModelRenderer(this, "FootTipR"); + FootTipR.setTextureOffset(10, 41); + FootTipR.setRotationPoint(0f, 0f, 0f); + FootTipR.addBox(-1.5F, 9.5F, -5.6F, 3, 2, 2, -0.2F); + setRotateAngle(FootTipR, 0.17453292519943295F, 0.0F, 0.0F); + bipedRightLeg.addChild(FootTipR); + + FootL = new ModelRenderer(this, "FootL"); + FootL.setTextureOffset(0, 41); + FootL.mirror = true; + FootL.setRotationPoint(0f, 0f, 0f); + FootL.addBox(-2.0F, 10.0F, -3.0F, 4, 2, 1, 0.0F); + bipedLeftLeg.addChild(FootL); + + LegGuardL = new ModelRenderer(this, "LegGuardL"); + LegGuardL.setTextureOffset(0, 44); + LegGuardL.setRotationPoint(0f, 0f, 0f); + LegGuardL.addBox(-2.0F, 5.5F, -3.8F, 4, 4, 2, 0.2F); + setRotateAngle(LegGuardL, 0.17453292519943295F, 0.0F, 0.0F); + bipedLeftLeg.addChild(LegGuardL); + + FootTipL = new ModelRenderer(this, "FootTipL"); + FootTipL.setTextureOffset(10, 41); + FootTipL.setRotationPoint(0f, 0f, 0f); + FootTipL.addBox(-1.5F, 9.5F, -5.6F, 3, 2, 2, -0.2F); + setRotateAngle(FootTipL, 0.17453292519943295F, 0.0F, 0.0F); + bipedLeftLeg.addChild(FootTipL); + + BootTopL.isHidden = true; + BootTopR.isHidden = true; + FootTipL.isHidden = true; + FootTipR.isHidden = true; + + init(); } /** 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 010e06b..b667ef2 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersChausses.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersChausses.java @@ -1,109 +1,122 @@ package lance5057.tDefense.armor.renderers.light; -import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; /** - * ModelBiped - Either Mojang or a mod author + * ModelTinkersChausses - Either Mojang or a mod author * Created using Tabula 4.1.1 */ public class ModelTinkersChausses extends ArmorRenderer { - public ModelRenderer LegL; public ModelRenderer FrontL; + public ModelRenderer FrontR; public ModelRenderer HipGuardL; public ModelRenderer HipGuardR; - public ModelRenderer LegR; public ModelRenderer BackL; - public ModelRenderer FrontR; public ModelRenderer BackR; + public ModelRenderer HipGuardL_1; + public ModelRenderer HipGuardR_1; public ModelRenderer Belt; + public ModelRenderer BeltR; + public ModelRenderer BeltL; 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.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.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.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.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.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.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.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.01F); - this.setRotateAngle(HipGuardL, 0.0F, 0.0F, -0.17453292519943295F); - this.bipedLeftLeg.addChild(this.HipGuardL); - } - - @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 < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { - - GL11.glPushMatrix(); - - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); - - GL11.glPopMatrix(); - } - } - - GL11.glPopMatrix(); + super(0.1f, 0, 64, 64); + + textureWidth = 64; + textureHeight = 64; + + bipedRightLeg = new ModelRenderer(this, "Right Leg"); + bipedRightLeg.setTextureOffset(0, 16); + bipedRightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.1f); + bipedRightLeg.setRotationPoint(-1.9F, 12.0F + 0, 0.0F); + + bipedLeftLeg = new ModelRenderer(this, "Left Leg"); + bipedLeftLeg.setTextureOffset(0, 16); + bipedLeftLeg.mirror = true; + bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.1f); + bipedLeftLeg.setRotationPoint(1.9F, 12.0F + 0, 0.0F); + + HipGuardR = new ModelRenderer(this, "Hip Guard Right"); + HipGuardR.setTextureOffset(0, 49); + HipGuardR.setRotationPoint(0f, 0f, 0f); + HipGuardR.addBox(-2.5F, 0.0F, -2.6F, 4, 6, 5, 0.1F); + setRotateAngle(HipGuardR, 0.0F, 0.0F, 0.17453292519943295F); + bipedRightLeg.addChild(HipGuardR); + + Belt = new ModelRenderer(this, "Belt"); + Belt.setTextureOffset(18, 48); + Belt.setRotationPoint(0.0F, 0.0F, 0.0F); + Belt.addBox(-5.0F, 10.5F, -3.0F, 10, 2, 6, -0.19F); + bipedBody.addChild(Belt); + + FrontR = new ModelRenderer(this, "Front Right"); + FrontR.setTextureOffset(0, 40); + FrontR.setRotationPoint(1.9f, 0f, -0.1f); + FrontR.addBox(-2.0F, 0.0F, -2.4F, 4, 7, 1, 0.0F); + setRotateAngle(FrontR, -0.1F, 0.0F, 0.0f); + bipedRightLeg.addChild(FrontR); + + FrontL = new ModelRenderer(this, "Front Left"); + FrontL.setTextureOffset(0, 40); + FrontL.setRotationPoint(-1.9f, 0f, -0.1f); + FrontL.addBox(-2.0F, 0.0F, -2.4F, 4, 7, 1, 0.0F); + setRotateAngle(FrontL, -0.1F, 0.0F, 0.0f); + bipedLeftLeg.addChild(FrontL); + + HipGuardL_1 = new ModelRenderer(this, "Hip Guard Left 2"); + HipGuardL_1.setTextureOffset(10, 37); + HipGuardL_1.mirror = true; + HipGuardL_1.setRotationPoint(0f, 0f, 0f); + HipGuardL_1.addBox(-1.5F, 0.0F, -2.6F, 4, 10, 5, 0.0F); + setRotateAngle(HipGuardL_1, 0.0F, 0.0F, -0.08726646259971647F); + bipedLeftLeg.addChild(HipGuardL_1); + + BeltR = new ModelRenderer(this, "Belt Right"); + BeltR.setTextureOffset(18, 56); + BeltR.mirror = true; + BeltR.setRotationPoint(0.0F, 0.0F, 0.0F); + BeltR.addBox(-6F, 1.0F, -3.1F, 12, 2, 6, -0.2F); + setRotateAngle(BeltR, 0.0F, 0.0F, -0.4363323129985824F); + bipedRightLeg.addChild(BeltR); + + BeltL = new ModelRenderer(this, "Belt Left"); + BeltL.setTextureOffset(18, 56); + BeltL.setRotationPoint(0.0F, 0.0F, 0.0F); + BeltL.addBox(-6F, 1.0F, -3.1F, 12, 2, 6, -0.21F); + setRotateAngle(BeltL, 0.0F, 0.0F, 0.4363323129985824F); + bipedLeftLeg.addChild(BeltL); + + HipGuardR_1 = new ModelRenderer(this, "Hip Guard Right 2"); + HipGuardR_1.setTextureOffset(10, 37); + HipGuardR_1.setRotationPoint(0f, 0f, 0f); + HipGuardR_1.addBox(-2.5F, 0.0F, -2.6F, 4, 10, 5, 0.0F); + setRotateAngle(HipGuardR_1, 0.0F, 0.0F, 0.08726646259971647F); + bipedRightLeg.addChild(HipGuardR_1); + + BackR = new ModelRenderer(this, "Back Right"); + BackR.setTextureOffset(0, 40); + BackR.setRotationPoint(1.9f, 0f, 0f); + BackR.addBox(-2.0F, 0.0F, 1.2F, 4, 7, 1, 0.0F); + setRotateAngle(BackR, 0.1F, 0.0F, 0.0f); + bipedRightLeg.addChild(BackR); + + BackL = new ModelRenderer(this, "Back Light"); + BackL.setTextureOffset(0, 40); + BackL.setRotationPoint(-1.9f, 0f, 0f); + BackL.addBox(-2.0F, 0.0F, 1.2F, 4, 7, 1, 0.0F); + setRotateAngle(BackL, 0.1F, 0.0F, 0.0f); + bipedLeftLeg.addChild(BackL); + + HipGuardL = new ModelRenderer(this, "Hip Guard Left"); + HipGuardL.setTextureOffset(0, 48); + HipGuardL.mirror = true; + HipGuardL.setRotationPoint(0f, 0f, 0f); + HipGuardL.addBox(-1.5F, 0.0F, -2.6F, 4, 6, 5, 0.1F); + setRotateAngle(HipGuardL, 0.0F, 0.0F, -0.17453292519943295F); + bipedLeftLeg.addChild(HipGuardL); } /** 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 da3f80b..44a64d7 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersCoif.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersCoif.java @@ -1,15 +1,7 @@ package lance5057.tDefense.armor.renderers.light; -import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; /** * ModelBiped - Either Mojang or a mod author @@ -18,47 +10,75 @@ import cpw.mods.fml.client.FMLClientHandler; public class ModelTinkersCoif extends ArmorRenderer { public ModelRenderer Coif; - public ModelRenderer Head; + public ModelRenderer WingR; + public ModelRenderer Mask; + public ModelRenderer Overlay; + public ModelRenderer WingL; + public ModelRenderer Mohawk; + public ModelRenderer MohawkR; + public ModelRenderer MohawkL; public ModelTinkersCoif() { - super(1.1f, 0, 64, 64); + super(0.1f, 0, 128, 64); - this.textureWidth = 64; - this.textureHeight = 64; + textureWidth = 128; + textureHeight = 64; - 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.01F); - this.bipedHead.addChild(this.Head); + Overlay = new ModelRenderer(this, "Overlay"); + Overlay.setTextureOffset(32, 32); + Overlay.setRotationPoint(0.0F, 0.0F, 0.0F); + Overlay.addBox(-4.0F, -10.0F, -4.0F, 8, 10, 8, 0.7F); + bipedHead.addChild(Overlay); - 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.51F); - this.bipedHead.addChild(this.Coif); - } + WingL = new ModelRenderer(this, "WingL"); + WingL.setTextureOffset(64, 0); + WingL.setRotationPoint(-0.7F, 0.0F, 0.0F); + WingL.addBox(2.3F, -13.5F, -6.6F, 8, 18, 0, 0.0F); + setRotateAngle(WingL, 0.0F, -0.5235987755982988F, 0.0F); + bipedHead.addChild(WingL); - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - GL11.glPushMatrix(); + MohawkR = new ModelRenderer(this, "MohawkR"); + MohawkR.setTextureOffset(80, -14); + MohawkR.setRotationPoint(0.0F, 0.0F, 0.0F); + MohawkR.addBox(-3.0F, -14.0F, -3.6F, 0, 18, 14, 0.0F); + setRotateAngle(MohawkR, 0.0F, -0.4363323129985824F, 0.0F); + bipedHead.addChild(MohawkR); + + Mohawk = new ModelRenderer(this, "Mohawk"); + Mohawk.setTextureOffset(64, 4); + Mohawk.setRotationPoint(0.0F, 0.0F, 0.0F); + Mohawk.addBox(0.0F, -14.0F, -4.6F, 0, 18, 14, 0.0F); + bipedHead.addChild(Mohawk); - for(int i = 0; i < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { + Mask = new ModelRenderer(this, "Mask"); + Mask.setTextureOffset(0, 43); + Mask.setRotationPoint(0.0F, 0.0F, 0.0F); + Mask.addBox(-4.5F, -8.0F, -5.0F, 9, 10, 4, 0.11F); + bipedHead.addChild(Mask); - GL11.glPushMatrix(); + WingR = new ModelRenderer(this, "WingR"); + WingR.setTextureOffset(64, 0); + WingR.mirror = true; + WingR.setRotationPoint(-0.5F, 0.0F, 0.0F); + WingR.addBox(-9.2F, -13.5F, -6.0F, 8, 18, 0, 0.0F); + setRotateAngle(WingR, 0.0F, 0.5235987755982988F, 0.0F); + bipedHead.addChild(WingR); - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); + MohawkL = new ModelRenderer(this, "MohawkL"); + MohawkL.setTextureOffset(80, -14); + MohawkL.setRotationPoint(0.0F, 0.0F, 0.0F); + MohawkL.addBox(3.0F, -14.0F, -3.6F, 0, 18, 14, 0.0F); + setRotateAngle(MohawkL, 0.0F, 0.4363323129985824F, 0.0F); + bipedHead.addChild(MohawkL); - GL11.glPopMatrix(); - } - } + Coif = new ModelRenderer(this, "Coif"); + Coif.setTextureOffset(0, 32); + Coif.setRotationPoint(0.0F, 0.0F, 0.0F); + Coif.addBox(-4.0F, 1.0F, -4.0F, 8, 3, 8, 0.5F); + bipedHead.addChild(Coif); - GL11.glPopMatrix(); + init(); } /** diff --git a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersHauberk.java b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersHauberk.java index 9e3f192..d68c816 100644 --- a/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersHauberk.java +++ b/src/main/java/lance5057/tDefense/armor/renderers/light/ModelTinkersHauberk.java @@ -1,116 +1,163 @@ package lance5057.tDefense.armor.renderers.light; -import lance5057.tDefense.TinkersDefense; -import lance5057.tDefense.armor.ArmorCore; import lance5057.tDefense.armor.renderers.ArmorRenderer; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; /** - * ModelBiped - Either Mojang or a mod author + * ModelTinkersHauberk - Either Mojang or a mod author * Created using Tabula 4.1.1 */ public class ModelTinkersHauberk extends ArmorRenderer { + public ModelRenderer ChestBeltR; + public ModelRenderer ChestBelt; + public ModelRenderer ChestBeltR_1; + public ModelRenderer ChestBelt_1; + public ModelRenderer ChestBeltL; + public ModelRenderer ChestBeltL_1; + public ModelRenderer ChestBelt_2; public ModelRenderer Pauldron1; public ModelRenderer Pauldron2; - public ModelRenderer Pauldron3; - public ModelRenderer ArmR; - public ModelRenderer Body; - public ModelRenderer Pauldron1_1; - public ModelRenderer Pauldron2_1; - public ModelRenderer Pauldron3_1; - public ModelRenderer ArmL; + public ModelRenderer PauldronStudR; + public ModelRenderer Pauldron3R; + public ModelRenderer PauldronFlairR; + public ModelRenderer Pauldron1L; + public ModelRenderer Pauldron2L; + public ModelRenderer PauldronStudL; + public ModelRenderer Pauldron3L; + public ModelRenderer PauldronFlairL; public ModelTinkersHauberk() { - super(1.1f, 0, 64, 64); - - this.textureWidth = 64; - this.textureHeight = 64; - - this.Pauldron2_1 = new ModelRenderer(this, 0, 32); - this.Pauldron2_1.mirror = true; - 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.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.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.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.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.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.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.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.02F); - this.bipedRightArm.addChild(this.ArmR); - } - - @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 < 10; i++) - { - String texture = ((ArmorCore) this.stack.getItem()).getTexture(i, stack); - if(texture != "") - { - - GL11.glPushMatrix(); - - ((ArmorCore) this.stack.getItem()).renderArmor(entity, f, f1, f2, f3, f4, f5, colors, stack, i); - super.render(entity, f, f1, f2, f3, f4, f5); - - GL11.glPopMatrix(); - } - } - - GL11.glPopMatrix(); + super(0.1f, 0, 64, 64); + + textureWidth = 64; + textureHeight = 64; + + ChestBelt_1 = new ModelRenderer(this, "ChestBelt_1"); + ChestBelt_1.setTextureOffset(0, 57); + ChestBelt_1.setRotationPoint(0.0F, 0.0F, 0.0F); + ChestBelt_1.addBox(-4.5F, 9.0F, -2.5F, 9, 2, 5, -0.19F); + bipedBody.addChild(ChestBelt_1); + + ChestBelt_2 = new ModelRenderer(this, "ChestBelt_2"); + ChestBelt_2.setTextureOffset(28, 32); + ChestBelt_2.setRotationPoint(0.0F, 0.0F, 0.0F); + ChestBelt_2.addBox(-4.5F, 5.0F, -2.5F, 9, 2, 5, -0.19F); + bipedBody.addChild(ChestBelt_2); + + Pauldron3R = new ModelRenderer(this, "Pauldron3R"); + Pauldron3R.setTextureOffset(0, 32); + Pauldron3R.setRotationPoint(-0.0F, 0.0F, 0.0F); + Pauldron3R.addBox(-3.2F, -0.5F, -2.0F, 3, 4, 4, 0.1F); + setRotateAngle(Pauldron3R, 0.0F, 0.0F, 0.08726646259971647F); + bipedRightArm.addChild(Pauldron3R); + + Pauldron2L = new ModelRenderer(this, "Pauldron2L"); + Pauldron2L.setTextureOffset(0, 49); + Pauldron2L.mirror = true; + Pauldron2L.setRotationPoint(0.0F, 0.0F, 0.0F); + Pauldron2L.addBox(-1.0F, -3.0F, -2.0F, 3, 3, 4, 0.1F); + setRotateAngle(Pauldron2L, 0.0F, 0.0F, 0.2617993877991494F); + bipedLeftArm.addChild(Pauldron2L); + + Pauldron3L = new ModelRenderer(this, "Pauldron3L"); + Pauldron3L.setTextureOffset(0, 32); + Pauldron3L.mirror = true; + Pauldron3L.setRotationPoint(0.0F, 0.0F, 0.0F); + Pauldron3L.addBox(0.2F, -0.5F, -2.0F, 3, 4, 4, 0.1F); + setRotateAngle(Pauldron3L, 0.0F, 0.0F, -0.08726646259971647F); + bipedLeftArm.addChild(Pauldron3L); + + ChestBeltR = new ModelRenderer(this, "ChestBeltR"); + ChestBeltR.setTextureOffset(0, 57); + ChestBeltR.setRotationPoint(0.0F, 0.0F, 0.0F); + ChestBeltR.addBox(-1.7F, 5.7F, -2.5F, 11, 2, 5, -0.2F); + setRotateAngle(ChestBeltR, 0.0F, 0.0F, 0.5235987755982988F); + bipedBody.addChild(ChestBeltR); + + ChestBeltL = new ModelRenderer(this, "ChestBeltL"); + ChestBeltL.setTextureOffset(0, 57); + ChestBeltL.mirror = true; + ChestBeltL.setRotationPoint(0.0F, 0.0F, 0.0F); + ChestBeltL.addBox(-7.5F, 2.3F, -2.5F, 11, 2, 5, -0.2F); + setRotateAngle(ChestBeltL, 0.0F, 0.0F, -0.5235987755982988F); + bipedBody.addChild(ChestBeltL); + + ChestBeltL_1 = new ModelRenderer(this, "ChestBeltL_1"); + ChestBeltL_1.setTextureOffset(0, 57); + ChestBeltL_1.mirror = true; + ChestBeltL_1.setRotationPoint(0.0F, 0.0F, 0.0F); + ChestBeltL_1.addBox(-9.3F, 5.7F, -2.5F, 11, 2, 5, -0.21F); + setRotateAngle(ChestBeltL_1, 0.0F, 0.0F, -0.5235987755982988F); + bipedBody.addChild(ChestBeltL_1); + + PauldronStudR = new ModelRenderer(this, "PauldronStudR"); + PauldronStudR.setTextureOffset(14, 32); + PauldronStudR.setRotationPoint(-0.0F, 0.0F, 0.0F); + PauldronStudR.addBox(-1.0F, -1.5F, -2.5F, 2, 2, 5, 0.1F); + setRotateAngle(PauldronStudR, 0.0F, 0.0F, -0.2617993877991494F); + bipedRightArm.addChild(PauldronStudR); + + Pauldron1 = new ModelRenderer(this, "Pauldron1"); + Pauldron1.setTextureOffset(0, 40); + Pauldron1.setRotationPoint(-0.0F, 0.0F, 0.0F); + Pauldron1.addBox(-3.5F, -1.9F, -2.5F, 4, 4, 5, 0.0F); + setRotateAngle(Pauldron1, 0.0F, 0.0F, 0.2617993877991494F); + bipedRightArm.addChild(Pauldron1); + + ChestBeltR_1 = new ModelRenderer(this, "ChestBeltR_1"); + ChestBeltR_1.setTextureOffset(0, 57); + ChestBeltR_1.setRotationPoint(0.0F, 0.0F, 0.0F); + ChestBeltR_1.addBox(-3.5F, 2.3F, -2.5F, 11, 2, 5, -0.21F); + setRotateAngle(ChestBeltR_1, 0.0F, 0.0F, 0.5235987755982988F); + bipedBody.addChild(ChestBeltR_1); + + PauldronFlairR = new ModelRenderer(this, "PauldronFlairR"); + PauldronFlairR.setTextureOffset(18, 39); + PauldronFlairR.mirror = true; + PauldronFlairR.setRotationPoint(-0.0F, 0.0F, 0.0F); + PauldronFlairR.addBox(-8.5F, -4.5F, 0.0F, 7, 9, 0, 0.0F); + setRotateAngle(PauldronFlairR, 0.0F, 0.0F, 0.2617993877991494F); + bipedRightArm.addChild(PauldronFlairR); + + PauldronFlairL = new ModelRenderer(this, "PauldronFlairL"); + PauldronFlairL.setTextureOffset(18, 39); + PauldronFlairL.setRotationPoint(0.0F, 0.0F, 0.0F); + PauldronFlairL.addBox(1.5F, -4.5F, 0.0F, 7, 9, 0, 0.0F); + setRotateAngle(PauldronFlairL, 0.0F, 0.0F, -0.2617993877991494F); + bipedLeftArm.addChild(PauldronFlairL); + + Pauldron2 = new ModelRenderer(this, "Pauldron2"); + Pauldron2.setTextureOffset(0, 49); + Pauldron2.setRotationPoint(-0.0F, 0.0F, 0.0F); + Pauldron2.addBox(-2.0F, -3.0F, -2.0F, 3, 3, 4, 0.1F); + setRotateAngle(Pauldron2, 0.0F, 0.0F, -0.2617993877991494F); + bipedRightArm.addChild(Pauldron2); + + PauldronStudL = new ModelRenderer(this, "PauldronStudL"); + PauldronStudL.setTextureOffset(14, 32); + PauldronStudL.mirror = true; + PauldronStudL.setRotationPoint(0.0F, 0.0F, 0.0F); + PauldronStudL.addBox(-1.0F, -1.5F, -2.5F, 2, 2, 5, 0.1F); + setRotateAngle(PauldronStudL, 0.0F, 0.0F, 0.2617993877991494F); + bipedLeftArm.addChild(PauldronStudL); + + Pauldron1L = new ModelRenderer(this, "Pauldron1L"); + Pauldron1L.setTextureOffset(0, 40); + Pauldron1L.mirror = true; + Pauldron1L.setRotationPoint(0.0F, 0.0F, 0.0F); + Pauldron1L.addBox(-0.5F, -1.9F, -2.5F, 4, 4, 5, 0.0F); + setRotateAngle(Pauldron1L, 0.0F, 0.0F, -0.2617993877991494F); + bipedLeftArm.addChild(Pauldron1L); + + ChestBelt = new ModelRenderer(this, "ChestBelt"); + ChestBelt.setTextureOffset(28, 32); + ChestBelt.setRotationPoint(0.0F, 0.0F, 0.0F); + ChestBelt.addBox(-4.5F, 3.0F, -2.5F, 9, 2, 5, -0.19F); + bipedBody.addChild(ChestBelt); + + init(); } /** |
