diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-05-05 22:07:10 +0100 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-05-05 22:07:10 +0100 |
| commit | 208b1f1e0d5faf601b53818b04f6699b2e6cb6bc (patch) | |
| tree | 56c059b812f1917b582e65e7ef15faa70a429f0b | |
| parent | 80417b99e10a462fd72b8f8fcd3b226c862534e4 (diff) | |
- Working on a GUI showing what curses you get with a description on them
- Added a search bar in the Liquids Tab for easier searching
- Fixed an issue with golden objects giving errors due to missing default texture
- Improved the Infamy Mask to have less parts, thus causing less lag
- Improved ingots and ore detection
- Fixed certain ores when smelted outputting a different ingot
- Necklaces and Rings now render as well
- Updated the guide at the Guide item to have the proper link to the mod as well as mention the right people who helped with it
- Added a list of the ores that work in the guide
- Added a new tab to the guide regarding the ores and the ingots they create
- Changed the stun effect caused by rings with feathers as modifiers to be a potion effect instead
43 files changed, 942 insertions, 1040 deletions
@@ -2,7 +2,7 @@ <classpath> <classpathentry kind="src" path="src/main/java"/> <classpathentry kind="src" path="src/main/resources"/> - <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_31"/> <classpathentry exported="true" kind="lib" path="C:/Users/Sorin/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.10-10.13.3.1395-1710ls/forgeSrc-1.7.10-10.13.3.1395-1710ls.jar" sourcepath="C:/Users/Sorin/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.10-10.13.3.1395-1710ls/forgeSrc-1.7.10-10.13.3.1395-1710ls-sources.jar"/> <classpathentry exported="true" kind="lib" path="C:/Users/Sorin/.gradle/caches/modules-2/files-2.1/net.minecraft/launchwrapper/1.11/9c0592c6e1e9ea296a70948081bd4cc84dda1289/launchwrapper-1.11.jar" sourcepath="C:/Users/Sorin/.gradle/caches/modules-2/files-2.1/net.minecraft/launchwrapper/1.11/ea64c0bce5e9f465cd56566530133331568d2157/launchwrapper-1.11-sources.jar"/> <classpathentry exported="true" kind="lib" path="C:/Users/Sorin/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/1.3.9/40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf/jsr305-1.3.9.jar"/> diff --git a/Changelog.txt b/Changelog.txt index ad7f79b..23ae67d 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,16 @@ +Version 1.0.8 +- Working on a GUI showing what curses you get with a description on them +- Added a search bar in the Liquids Tab for easier searching +- Fixed an issue with golden objects giving errors due to missing default texture +- Improved the Infamy Mask to have less parts, thus causing less lag +- Improved ingots and ore detection +- Fixed certain ores when smelted outputting a different ingot +- Necklaces and Rings now render as well +- Updated the guide at the Guide item to have the proper link to the mod as well as mention the right people who helped with it +- Added a list of the ores that work in the guide +- Added a new tab to the guide regarding the ores and the ingots they create +- Changed the stun effect caused by rings with feathers as modifiers to be a potion effect instead + Version 1.0.7 - Fixed villages crashing on a server - Fixed item duplication glitch diff --git a/src/main/java/darkknight/jewelrycraft/CreativeTabLiquids.java b/src/main/java/darkknight/jewelrycraft/CreativeTabLiquids.java index 6e6ef29..33e507d 100644 --- a/src/main/java/darkknight/jewelrycraft/CreativeTabLiquids.java +++ b/src/main/java/darkknight/jewelrycraft/CreativeTabLiquids.java @@ -14,11 +14,16 @@ public class CreativeTabLiquids extends CreativeTabs /** * Instantiates a new creative tab liquids. * - * @param par2Str the par2 str + * @param name the name */ - public CreativeTabLiquids(String par2Str) + public CreativeTabLiquids(String name) { - super(par2Str); + super(name); + } + + public boolean hasSearchBar() { + + return true; } /** @@ -34,9 +39,9 @@ public class CreativeTabLiquids extends CreativeTabs * @param par1List List of items to display */ @Override - public void displayAllReleventItems(List par1List) + public void displayAllReleventItems(List list) { for(int i = 0; i < JewelrycraftUtil.objects.size(); i++) - par1List.add(ItemList.bucket.getModifiedItemStack(JewelrycraftUtil.objects.get(i))); + list.add(ItemList.bucket.getModifiedItemStack(JewelrycraftUtil.objects.get(i))); } } diff --git a/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java b/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java index b08dc22..38ed0e7 100644 --- a/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java +++ b/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java @@ -7,8 +7,6 @@ package darkknight.jewelrycraft; import java.io.File; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; import java.util.logging.Logger; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; @@ -16,9 +14,9 @@ import net.minecraft.nbt.NBTTagCompound; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; -import cpw.mods.fml.common.ModMetadata; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent; @@ -31,6 +29,7 @@ import darkknight.jewelrycraft.entities.EntityList; import darkknight.jewelrycraft.events.EventList; import darkknight.jewelrycraft.item.ItemList; import darkknight.jewelrycraft.network.PacketHandler; +import darkknight.jewelrycraft.potions.PotionList; import darkknight.jewelrycraft.proxy.CommonProxy; import darkknight.jewelrycraft.recipes.CraftingRecipes; import darkknight.jewelrycraft.util.Variables; @@ -52,7 +51,7 @@ public class JewelrycraftMod return Item.getItemFromBlock(BlockList.jewelCraftingTable); } }; - public static CreativeTabs liquids = new CreativeTabLiquids("Liquids"); + public static CreativeTabs liquids = new CreativeTabLiquids("Liquids").setBackgroundImageName("item_search.png"); public static NBTTagCompound saveData = new NBTTagCompound(); public static NBTTagCompound clientData = new NBTTagCompound(); public static File liquidsConf; @@ -78,23 +77,35 @@ public class JewelrycraftMod EntityList.preInit(e); VillageHandler.preInit(e); EventList.preInit(e); + PotionList.preInit(e); } @EventHandler public void init(FMLInitializationEvent e) { EventList.init(e); + PotionList.init(e); } @EventHandler public void postInit(FMLPostInitializationEvent e) { EventList.postInit(e); + PotionList.postInit(e); } - @Mod.EventHandler + @EventHandler public void serverLoad(FMLServerStartingEvent event) { event.registerServerCommand(new JewelrycraftCommands()); } + + @EventHandler + public void imcCallback(FMLInterModComms.IMCEvent event) + { + for (final FMLInterModComms.IMCMessage imcMessage : event.getMessages()) + { + logger.info("The mod " + imcMessage.getSender() + " has sent the following message: " + imcMessage.getStringValue()); + } + } } diff --git a/src/main/java/darkknight/jewelrycraft/api/Curse.java b/src/main/java/darkknight/jewelrycraft/api/Curse.java index 8a471f0..206a7ad 100644 --- a/src/main/java/darkknight/jewelrycraft/api/Curse.java +++ b/src/main/java/darkknight/jewelrycraft/api/Curse.java @@ -2,6 +2,7 @@ package darkknight.jewelrycraft.api; import java.util.ArrayList; import java.util.Random; +import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockSmelter.java b/src/main/java/darkknight/jewelrycraft/block/BlockSmelter.java index ec33fde..b7a456d 100644 --- a/src/main/java/darkknight/jewelrycraft/block/BlockSmelter.java +++ b/src/main/java/darkknight/jewelrycraft/block/BlockSmelter.java @@ -113,7 +113,7 @@ public class BlockSmelter extends BlockContainer { TileEntitySmelter te = (TileEntitySmelter)world.getTileEntity(i, j, k); ItemStack item = entityPlayer.inventory.getCurrentItem(); - if (te != null && te.hasMoltenMetal && te.quantity >= 0.9f && !te.pouring && item != null && item.getItem() == Items.bucket){ + if (te != null && te.hasMoltenMetal && te.quantity >= .9f && !te.pouring && item != null && item.getItem() == Items.bucket){ te.quantity = 0f; te.hasMoltenMetal = false; ItemStack metalBucket = new ItemStack(ItemList.bucket, 1); @@ -143,10 +143,11 @@ public class BlockSmelter extends BlockContainer if (te.metal != null && te.metal.getItem() != null) itemCoincidesWithMetal = item.getItem().equals(te.metal.getItem()) && item.getItemDamage() == te.metal.getItemDamage(); if (te.moltenMetal != null && te.moltenMetal.getItem() != null){ itemCoincidesWithMoltenMetal = item.getItem().equals(te.moltenMetal.getItem()) && item.getItemDamage() == te.moltenMetal.getItemDamage(); - if (isOre) oreCoincidesWithMetal = te.moltenMetal.getItem().equals(JewelrycraftUtil.getIngotFromOre(item.getItem()).getItem()) && te.moltenMetal.getItemDamage() == JewelrycraftUtil.getIngotFromOre(item.getItem()).getItemDamage(); + if (isOre) oreCoincidesWithMetal = te.moltenMetal.getItem().equals(JewelrycraftUtil.getIngotFromOre(item).getItem()) && te.moltenMetal.getItemDamage() == JewelrycraftUtil.getIngotFromOre(item).getItemDamage(); } - overflow = isOre ? te.metal.stackSize * 0.2f + te.quantity < 0.8f : te.metal.stackSize * 0.1f + te.quantity < 0.9f; - boolean isValid = te.hasMoltenMetal ? itemCoincidesWithMoltenMetal : true; + overflow = isOre ? te.metal.stackSize * 0.2f + te.quantity < 0.8f : te.metal.stackSize + te.quantity < 0.9f; + boolean isValid = te.hasMoltenMetal ? isOre ? oreCoincidesWithMetal : itemCoincidesWithMoltenMetal : true; + System.out.println(te.quantity); if (te.quantity < 0.9f && !te.pouring && canPlace && isValid){ boolean check = isOre ? oreCoincidesWithMetal && te.quantity < 0.8f : itemCoincidesWithMoltenMetal; boolean check2 = isOre ? oreCoincidesWithMetal : itemCoincidesWithMetal; @@ -168,21 +169,21 @@ public class BlockSmelter extends BlockContainer te.isDirty = true; } te.isDirty = true; - }else if (item != null && (te.hasMetal || te.hasMoltenMetal) && !itemCoincidesWithMoltenMetal && te.quantity < 0.9f) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("Item does not match contents!"))); - else if (item != null && !item.getUnlocalizedName().toLowerCase().contains("ingot") && te.quantity < 0.9f) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".smelter.itemrenamedtoingot"))); - else if (item != null && te.quantity >= 0.9f) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("Smelter is at full capacity."))); + }else if (item != null && (te.hasMetal || te.hasMoltenMetal) && !itemCoincidesWithMoltenMetal && te.quantity < .9f) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("Item does not match contents!"))); + else if (item != null && !item.getUnlocalizedName().toLowerCase().contains("ingot") && te.quantity < .9f) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".smelter.itemrenamedtoingot"))); + else if (item != null && te.quantity >= .9f) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("Smelter is at full capacity."))); }else if (item != null && item.getItem() != null && item.getItem() instanceof ItemMoltenMetalBucket && !te.hasMoltenMetal && !te.hasMetal){ te.hasMoltenMetal = true; ItemStack ingot = JewelryNBT.ingot(item); if (Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.stained_glass) || Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.stained_hardened_clay) || Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.wool) || Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.carpet)) ingot.setItemDamage(15 - ingot.getItemDamage()); te.moltenMetal = ingot; - te.quantity = 0.9f; + te.quantity = .9f; te.isDirty = true; if (!entityPlayer.capabilities.isCreativeMode){ --item.stackSize; dropItem(world, entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, new ItemStack(Items.bucket)); } - }else if (item == null && te.hasMoltenMetal && te.moltenMetal.getItem() != null) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage." + Variables.MODID + ".smelter.hasmolteningot", te.moltenMetal.getDisplayName()))); + }else if (item == null && te.hasMoltenMetal && te.moltenMetal.getItem() != null) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage." + Variables.MODID + ".smelter.hasmolteningot", te.moltenMetal.getDisplayName().substring(0, te.moltenMetal.getDisplayName().indexOf(" Ingot"))))); world.setTileEntity(i, j, k, te); } return true; diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiCurseInfo.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiCurseInfo.java new file mode 100644 index 0000000..5489911 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiCurseInfo.java @@ -0,0 +1,58 @@ +package darkknight.jewelrycraft.client.gui; + +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.GL11; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import darkknight.jewelrycraft.JewelrycraftMod; +import darkknight.jewelrycraft.api.Curse; +import darkknight.jewelrycraft.events.PlayerRenderHandler; +import darkknight.jewelrycraft.events.ScreenHandler; +import darkknight.jewelrycraft.network.PacketRequestPlayerInfo; +import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo; +import darkknight.jewelrycraft.util.PlayerUtils; +import darkknight.jewelrycraft.util.Variables; + +public class GuiCurseInfo extends GuiScreen +{ + World world; + EntityPlayer player; + + public GuiCurseInfo(Container container, World world, EntityPlayer player) + { + super(); + this.world = world; + this.player = player; + } + + public void drawScreen(int x, int y, float size) + { + super.drawScreen(x, y, size); + this.drawGradientRect(0, 0, this.width, this.height, -1072689136, -804253680); + int ind = 0; + if (player != null){ + NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID); + if (!playerInfo.hasNoTags()){ + for(Curse curse: Curse.getCurseList()) + if (playerInfo.getInteger(curse.getName()) > 0){ + int halfDescrSize = fontRendererObj.getStringWidth(curse.getDescription()) / 2; + mc.renderEngine.bindTexture(Variables.MISC_TEXTURE); + this.drawRect(0, 12 + ind * 34, this.width, 10 + (ind + 1) * 34, 0xff000000); + mc.renderEngine.bindTexture(new ResourceLocation(Variables.MODID, "textures/gui/" + curse.getTexturePack() + ".png")); + int tag = curse.getTextureID(); + GL11.glColor3f(1F, 1F, 1F); + drawTexturedModalRect(this.width/2 - halfDescrSize - 35, 12 + ind * 34, tag % 8 * 32, tag / 8 * 32, 32, 32); + this.drawString(fontRendererObj, curse.getName().substring(curse.getName().indexOf(':') + 1), this.width/2 - halfDescrSize, 20 + ind * 34, 0xffff00); + this.drawCenteredString(fontRendererObj, curse.getDescription(), this.width/2, 30 + ind * 34, 0xffffff); + ind++; + } + } + } + } +}
\ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java index b3cfef4..48542f8 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java @@ -40,7 +40,7 @@ public class GuiGuide extends GuiContainer rot = 0; del = 0; this.world = world; - tabs = new GuiTab[]{new GuiTabIntroduction(0), new GuiTabBlocks(1), new GuiTabItems(2), new GuiTabGemsAndIngots(3), new GuiTabModifiers(4), new GuiTabRitual(5)}; + tabs = new GuiTab[]{new GuiTabIntroduction(0), new GuiTabBlocks(1), new GuiTabItems(2), new GuiTabGemsAndIngots(3), new GuiTabOresToIngots(4), new GuiTabModifiers(5), new GuiTabRitual(6)}; activeTab = tabs[0]; pageTexture = pageTex; flippedPageTexture = flipPageTex; @@ -151,6 +151,9 @@ public class GuiGuide extends GuiContainer GL11.glScalef(1.2F, 1.2F, 1.2F); GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0F, 0.05F, 0F); + }else if (item.isItemEqual(new ItemStack(BlockList.shadowOre))){ + GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); + GL11.glTranslatef(0F, 0.13F, 0F); }else GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); if (!(Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockAir)) RenderHelper.enableStandardItemLighting(); if (RenderManager.instance.options.fancyGraphics) RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java index d04fd73..b9427d7 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java @@ -9,6 +9,7 @@ import cpw.mods.fml.common.network.IGuiHandler; import cpw.mods.fml.common.network.NetworkRegistry; import darkknight.jewelrycraft.JewelrycraftMod; import darkknight.jewelrycraft.client.JewelryInventory; +import darkknight.jewelrycraft.client.gui.container.ContainerCurseInfo; import darkknight.jewelrycraft.client.gui.container.ContainerGuide; import darkknight.jewelrycraft.client.gui.container.ContainerJewelryModifier; import darkknight.jewelrycraft.client.gui.container.ContainerJewelryTab; @@ -53,6 +54,8 @@ public class GuiHandler implements IGuiHandler return new ContainerJewelryTab(player, player.inventory, new JewelryInventory(player)); case 3: return new ContainerJewelryModifier(player.inventory, new InventoryBasic("ItemModifier", false, 37)); + case 4: + return new ContainerCurseInfo(); default: return null; } @@ -80,6 +83,8 @@ public class GuiHandler implements IGuiHandler return new GuiJewelry(new ContainerJewelryTab(player, player.inventory, new JewelryInventory(player)), jewelryInvTexture); case 3: return new GuiJewelryModifier((ContainerJewelryModifier)getServerGuiElement(ID, player, world, x, y, z), jewlryModTexture); + case 4: + return new GuiCurseInfo((ContainerCurseInfo)getServerGuiElement(ID, player, world, x, y, z), world, player); default: return null; } diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java index b66f192..4648ecd 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java @@ -14,7 +14,7 @@ public class GuiTabGemsAndIngots extends GuiTab */ public GuiTabGemsAndIngots(int id) { - super("Gems and ingots", id); + super("Gems, ores and ingots", id); } /** @@ -53,6 +53,14 @@ public class GuiTabGemsAndIngots extends GuiTab gui.getFont().drawString(String.format("%-1.18s", JewelrycraftUtil.metal.get(i).copy().getDisplayName()), gui.getLeft() + xPos + 20, gui.getTop() + 12 + 16 * (i - 9 * (page - 1)), 0); GL11.glDisable(GL11.GL_LIGHTING); } + page -= JewelrycraftUtil.metal.size() / 9 + 1; + for(int i = (page - 1) * 9; i < page * 9; i++) + if (i < JewelrycraftUtil.ores.size() && page > 0){ + gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Ores", gui.getLeft() + xPos + 40, gui.getTop(), 0); + gui.renderItem(JewelrycraftUtil.ores.get(i).copy(), gui.getLeft() + xPos + 10, gui.getTop() + 22 + 16 * (i - 9 * (page - 1)), 30f, true, 0, 0, 0); + gui.getFont().drawString(String.format("%-1.18s", JewelrycraftUtil.ores.get(i).copy().getDisplayName()), gui.getLeft() + xPos + 20, gui.getTop() + 12 + 16 * (i - 9 * (page - 1)), 0); + GL11.glDisable(GL11.GL_LIGHTING); + } GL11.glDisable(GL11.GL_BLEND); } @@ -62,7 +70,7 @@ public class GuiTabGemsAndIngots extends GuiTab @Override public int getMaxPages() { - return JewelrycraftUtil.gem.size() / 9 + JewelrycraftUtil.metal.size() / 9 + 2; + return JewelrycraftUtil.gem.size() / 9 + JewelrycraftUtil.metal.size() / 9 + JewelrycraftUtil.ores.size() / 9 + 4; } /** diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java index 6d7ee04..efbea61 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java @@ -108,11 +108,11 @@ public class GuiTabItems extends GuiTab case 13: String link = "HERE"; if (x >= gui.getLeft() && x <= gui.getLeft() + 30 && y >= gui.getTop() + 104 && y <= gui.getTop() + 124) link = EnumChatFormatting.DARK_BLUE + "HERE" + EnumChatFormatting.BLACK; - text = "installing it so you can see all the recipes. Since you are reading this, how about making a youtube video spotlighting this mod. I'd really appreciate it. After that you can share it in the main thread " + link + "." + " This mod was made by DarkKnight (or sor1n, depends"; + text = "installing it so you can see all the recipes. Since you are reading this, how about making a youtube video spotlighting this mod. I'd really appreciate it. After that you can share it in the main thread " + link + "." + " This mod was made by OnyxDarkKnight and the help of domi1819,"; Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); break; case 14: - text = "where you got this mod from) and the help of domi1819 and bspkrs."; + text = "pau101 and Damien Hazard."; Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); break; case 15: @@ -157,7 +157,7 @@ public class GuiTabItems extends GuiTab public void mouseClick(GuiGuide gui, int x, int y, int button) { if (gui.page == 13 && x >= gui.getLeft() && x <= gui.getLeft() + 30 && y >= gui.getTop() + 104 && y <= gui.getTop() + 124) try{ - Desktop.getDesktop().browse(new URL("http://www.minecraftforum.net/topic/2210959-164smp-ssp-jewelrycraft-version-12/").toURI()); + Desktop.getDesktop().browse(new URL("http://www.minecraftforum.net/forums/topics/2414865").toURI()); } catch(Exception e){} } diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabOresToIngots.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabOresToIngots.java new file mode 100644 index 0000000..074ab64 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabOresToIngots.java @@ -0,0 +1,74 @@ +package darkknight.jewelrycraft.client.gui; + +import java.util.HashMap; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import org.lwjgl.opengl.GL11; +import darkknight.jewelrycraft.block.BlockList; +import darkknight.jewelrycraft.util.JewelrycraftUtil; + +public class GuiTabOresToIngots extends GuiTab +{ + /** + * @param id + */ + public GuiTabOresToIngots(int id) + { + super("Ores to ingots", id); + } + + /** + * @return + */ + @Override + public ItemStack getIcon() + { + return new ItemStack(BlockList.shadowOre); + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + @Override + public void drawBackground(GuiGuide gui, int x, int y, int page) + { + int xPos = page % 2 == 0 ? 107 : -35; + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + int i = 0; + for(ItemStack ore: JewelrycraftUtil.oreToIngot.keySet()){ + if (i >= (page - 1) * 5 && i < page * 5){ + gui.renderItem(ore, gui.getLeft() + xPos + 10, gui.getTop() + 12 + 32 * (i - 5 * (page - 1)), 30f, true, 0, 0, 0); + gui.renderItem(JewelrycraftUtil.oreToIngot.get(ore), gui.getLeft() + xPos + 10, gui.getTop() + 28 + 32 * (i - 5 * (page - 1)), 30f, true, 0, 0, 0); + gui.getFont().drawString(String.format("%-1.18s", ore.getDisplayName()), gui.getLeft() + xPos + 20, gui.getTop() + 2 + 32 * (i - 5 * (page - 1)), 0); + gui.getFont().drawString(String.format("%-1.18s", JewelrycraftUtil.oreToIngot.get(ore).getDisplayName()), gui.getLeft() + xPos + 20, gui.getTop() + 18 + 32 * (i - 5 * (page - 1)), 0); + GL11.glDisable(GL11.GL_LIGHTING); + } + i++; + } + GL11.glDisable(GL11.GL_BLEND); + } + + /** + * @return + */ + @Override + public int getMaxPages() + { + return JewelrycraftUtil.oreToIngot.size() / 5 + 2; + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + @Override + public void drawForeground(GuiGuide gui, int x, int y, int page) + {} +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerCurseInfo.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerCurseInfo.java new file mode 100644 index 0000000..24588bd --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerCurseInfo.java @@ -0,0 +1,23 @@ +package darkknight.jewelrycraft.client.gui.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; + +public class ContainerCurseInfo extends Container +{ + public ContainerCurseInfo() + {} + + @Override + public void addCraftingToCrafters(ICrafting c) + { + return; + } + + @Override + public boolean canInteractWith(EntityPlayer entityplayer) + { + return true; + } +}
\ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/curses/CurseHumbleBundle.java b/src/main/java/darkknight/jewelrycraft/curses/CurseHumbleBundle.java index 21007a7..4ced57a 100644 --- a/src/main/java/darkknight/jewelrycraft/curses/CurseHumbleBundle.java +++ b/src/main/java/darkknight/jewelrycraft/curses/CurseHumbleBundle.java @@ -50,4 +50,9 @@ public class CurseHumbleBundle extends Curse entityitem.motionY = 0.11000000298023224D; world.spawnEntityInWorld(entityitem); } + + public String getDescription() + { + return "Get two for the price of one"; + } } diff --git a/src/main/java/darkknight/jewelrycraft/curses/CursePentagram.java b/src/main/java/darkknight/jewelrycraft/curses/CursePentagram.java index 8597c6b..e2a41f0 100644 --- a/src/main/java/darkknight/jewelrycraft/curses/CursePentagram.java +++ b/src/main/java/darkknight/jewelrycraft/curses/CursePentagram.java @@ -10,6 +10,9 @@ import net.minecraft.world.World; import net.minecraftforge.client.event.RenderPlayerEvent; import org.lwjgl.opengl.GL11; import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.event.FMLInterModComms; +import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import darkknight.jewelrycraft.api.Curse; @@ -25,6 +28,14 @@ public class CursePentagram extends Curse } @Override + public void action(World world, EntityPlayer player) + { +// FMLInterModComms.sendMessage(modId, key, value); +// GameRegistry.findItem("Botania", "flower"); +// FMLInterModComms.fetchRuntimeMessages(forMod) + } + + @Override public void attackedByPlayerAction(World world, EntityPlayer player, Entity target) {} diff --git a/src/main/java/darkknight/jewelrycraft/curses/CurseVampireHunger.java b/src/main/java/darkknight/jewelrycraft/curses/CurseVampireHunger.java index 08b5a65..18b676a 100644 --- a/src/main/java/darkknight/jewelrycraft/curses/CurseVampireHunger.java +++ b/src/main/java/darkknight/jewelrycraft/curses/CurseVampireHunger.java @@ -23,4 +23,9 @@ public class CurseVampireHunger extends Curse { if(player.shouldHeal() && rand.nextInt(5) == 0) player.heal(1F); } + + public String getDescription() + { + return "You feel the need for blood"; + } } diff --git a/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java b/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java index c9cdf06..c0e2ff8 100644 --- a/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java +++ b/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java @@ -3,7 +3,7 @@ package darkknight.jewelrycraft.effects; import java.util.Iterator; import java.util.List; import net.minecraft.entity.Entity; -import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; @@ -22,6 +22,7 @@ import darkknight.jewelrycraft.item.ItemBracelet; import darkknight.jewelrycraft.item.ItemEarrings; import darkknight.jewelrycraft.item.ItemNecklace; import darkknight.jewelrycraft.item.ItemRing; +import darkknight.jewelrycraft.potions.PotionList; import darkknight.jewelrycraft.util.JewelryNBT; import darkknight.jewelrycraft.util.PlayerUtils; import darkknight.jewelrycraft.util.Variables; @@ -71,10 +72,7 @@ public class EffectFeather extends ModifierEffects enemyData.setInteger("reAttacked", enemyData.getInteger("reAttacked") + 1); target.attackEntityFrom(DamageSource.causePlayerDamage(player), amount / (2F + (JewelryNBT.numberOfModifiers(item) - 1) * 0.1F)); // Positive ring - if (rand.nextInt(2) == 0){ - enemyData.setInteger("stunTime", 51 - JewelryNBT.numberOfModifiers(item)); - enemyData.setBoolean("stunned", true); - } + if (rand.nextInt(2) == 0 && target instanceof EntityLivingBase) ((EntityLivingBase)target).addPotionEffect(new PotionEffect(PotionList.stun.id, (51 - JewelryNBT.numberOfModifiers(item))*2, 0, false)); playerInfo.setBoolean("weakDamage", true); } if (enemyData.getInteger("reAttacked") == 1) enemyData.setInteger("reAttacked", 0); diff --git a/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java b/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java index 085cadd..0c4e9c6 100644 --- a/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java +++ b/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java @@ -10,6 +10,7 @@ import java.util.List; import java.util.Random; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -29,7 +30,6 @@ import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.event.world.WorldEvent; -import org.lwjgl.opengl.GL11; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; @@ -44,7 +44,9 @@ import darkknight.jewelrycraft.item.ItemList; import darkknight.jewelrycraft.network.PacketClearColorCache; import darkknight.jewelrycraft.network.PacketRequestPlayerInfo; import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo; +import darkknight.jewelrycraft.potions.PotionList; import darkknight.jewelrycraft.util.BlockUtils; +import darkknight.jewelrycraft.util.JewelryNBT; import darkknight.jewelrycraft.util.JewelrycraftUtil; import darkknight.jewelrycraft.util.PlayerUtils; import darkknight.jewelrycraft.util.Variables; @@ -55,6 +57,7 @@ import darkknight.jewelrycraft.util.Variables; public class EntityEventHandler { int updateTime = 0; + boolean addedCurses = false; /** * @param event @@ -89,31 +92,28 @@ public class EntityEventHandler public void onEntityUpdate(LivingUpdateEvent event) { Entity entity = event.entity; - if (entity.getEntityData().getBoolean("stunned") && entity.getEntityData().getInteger("stunTime") > 0){ - entity.motionX *= 0D; - entity.motionZ *= 0D; - entity.motionY *= 0D; - entity.rotationPitch = entity.prevRotationPitch; - entity.rotationYaw = entity.prevRotationYaw; - entity.getEntityData().setInteger("stunTime", entity.getEntityData().getInteger("stunTime") - 1); - if (entity.getEntityData().getInteger("stunTime") == 0) entity.getEntityData().setBoolean("stunned", false); - entity.worldObj.spawnParticle("spell", entity.posX, entity.posY + entity.height, entity.posZ, 0.0D, 0.3D, 0.0D); + EntityLivingBase entityLiving = event.entityLiving; + if (entityLiving.isPotionActive(PotionList.stun)){ + entityLiving.motionX *= 0D; + entityLiving.motionZ *= 0D; + entityLiving.motionY *= 0D; + entityLiving.isSwingInProgress = false; + entityLiving.moveForward = 0F; + entityLiving.moveStrafing = 0F; + entityLiving.setAIMoveSpeed(0F); + entityLiving.limbSwing = 0F; + entityLiving.limbSwingAmount = 0F; + entityLiving.swingProgressInt = 0; + entityLiving.rotationPitch = entity.prevRotationPitch; + entityLiving.rotationYaw = entity.prevRotationYaw; + entityLiving.worldObj.spawnParticle("spell", entityLiving.posX, entityLiving.posY + entityLiving.getEyeHeight(), entityLiving.posZ, 0.0D, 0.3D, 0.0D); } + if (entityLiving.isPotionActive(PotionList.stun) && entityLiving.getActivePotionEffect(PotionList.stun).getDuration() == 0) entityLiving.removePotionEffect(PotionList.stun.id); if (entity instanceof EntityPlayer){ EntityPlayer player = (EntityPlayer)entity; NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID); playerInfo.setBoolean("fancyRender", JewelrycraftMod.fancyRender); if (updateTime > 0) updateTime--; - if (playerInfo.getBoolean("stunned") && playerInfo.getInteger("stunTime") > 0){ - player.motionX *= 0D; - player.motionZ *= 0D; - player.motionY *= 0D; - player.rotationPitch = entity.prevRotationPitch; - player.rotationYaw = entity.prevRotationYaw; - playerInfo.setInteger("stunTime", playerInfo.getInteger("stunTime") - 1); - if (playerInfo.getInteger("stunTime") == 0) playerInfo.setBoolean("stunned", false); - player.worldObj.spawnParticle("spell", entity.posX, entity.posY + 0.5F, entity.posZ, 0.0D, 0.3D, 0.0D); - } for(int i = 0; i < 18; i++) if (playerInfo.hasKey("ext" + i)){ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i); @@ -134,6 +134,11 @@ public class EntityEventHandler playerInfo.setBoolean("reselectCurses", false); } JewelrycraftMod.netWrapper.sendToServer(new PacketRequestPlayerInfo()); + if (addedCurses){ + JewelrycraftMod.netWrapper.sendToAll(new PacketSendServerPlayersInfo()); + // player.openGui(JewelrycraftMod.instance, 4, player.worldObj, 0, 0, 0); + addedCurses = false; + } } if (playerInfo.getBoolean("playerCursePointsChanged")) playerInfo.setBoolean("playerCursePointsChanged", false); if (updateTime == 0){ @@ -164,15 +169,15 @@ public class EntityEventHandler public void onEntityAttacked(LivingAttackEvent event) { Entity entity = event.entityLiving; + if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityLivingBase && ((EntityLivingBase)event.source.getEntity()).isPotionActive(PotionList.stun)) event.setCanceled(true); if (entity instanceof EntityPlayer && !(event.source.getEntity() instanceof EntityPlayer)){ EntityPlayer player = (EntityPlayer)entity; NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID); - if (event.source.getEntity() != null && event.source.getEntity().getEntityData().getBoolean("stunned")) event.setCanceled(true); if (!player.worldObj.isRemote) for(int i = 0; i < 18; i++) if (playerInfo.hasKey("ext" + i)){ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i); ItemStack item = ItemStack.loadItemStackFromNBT(nbt); - if (((ItemBaseJewelry)item.getItem()).onPlayerAttackedCacellable(item, player, event.source, event.ammount)){ + if (item != null && item.getItem() instanceof ItemBaseJewelry && ((ItemBaseJewelry)item.getItem()).onPlayerAttackedCacellable(item, player, event.source, event.ammount)){ event.setCanceled(true); break; } @@ -181,7 +186,7 @@ public class EntityEventHandler event.setCanceled(true); break; } - ((ItemBaseJewelry)item.getItem()).onPlayerAttacked(item, player, event.source, event.ammount); + if (item != null && item.getItem() instanceof ItemBaseJewelry) ((ItemBaseJewelry)item.getItem()).onPlayerAttacked(item, player, event.source, event.ammount); } if (player.getHealth() != player.prevHealth){ if (playerInfo.getFloat("WhiteHeart") > 0){ @@ -230,7 +235,7 @@ public class EntityEventHandler if (playerInfo.hasKey("ext" + i)){ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i); ItemStack item = ItemStack.loadItemStackFromNBT(nbt); - if (((ItemBaseJewelry)item.getItem()).onEntityAttackedCacellable(item, player, entity, event.ammount)){ + if (item != null && item.getItem() instanceof ItemBaseJewelry && ((ItemBaseJewelry)item.getItem()).onEntityAttackedCacellable(item, player, entity, event.ammount)){ event.setCanceled(true); break; } @@ -239,7 +244,7 @@ public class EntityEventHandler event.setCanceled(true); break; } - ((ItemBaseJewelry)item.getItem()).onEntityAttacked(item, player, entity, event.ammount); + if (item != null && item.getItem() instanceof ItemBaseJewelry) ((ItemBaseJewelry)item.getItem()).onEntityAttacked(item, player, entity, event.ammount); } for(Curse curse: Curse.getCurseList()) if (playerInfo.getInteger(curse.getName()) > 0) curse.attackedByPlayerAction(entity.worldObj, player, entity); @@ -264,7 +269,6 @@ public class EntityEventHandler playerInfo.setBoolean("reselectCurses", false); } } - playerInfo.setFloat("BlueHeart", 0f); playerInfo.setFloat("BlackHeart", 0f); playerInfo.setFloat("WhiteHeart", 0f); @@ -272,6 +276,14 @@ public class EntityEventHandler if (playerInfo.getInteger(curse.getName()) > 0) curse.respawnAction(player.worldObj, player); } if (event.entity instanceof EntityPlayer && !(event.entity instanceof EntityPlayerMP)) JewelrycraftMod.netWrapper.sendToServer(new PacketRequestPlayerInfo()); + if (!player.worldObj.isRemote){ + JewelrycraftMod.netWrapper.sendToServer(new PacketRequestPlayerInfo()); + if (addedCurses){ + JewelrycraftMod.netWrapper.sendToAll(new PacketSendServerPlayersInfo()); +// player.openGui(JewelrycraftMod.instance, 4, player.worldObj, 0, 0, 0); + addedCurses = false; + } + } } /** @@ -286,17 +298,7 @@ public class EntityEventHandler Curse cur = Curse.availableCurses.get(no); playerInfo.setInteger(cur.getName(), 1); Curse.availableCurses.remove(cur); - - } - } - - public static void addCurse(EntityPlayer player, NBTTagCompound playerInfo, int curseID, int grade) - { - Curse cur = Curse.getCurseList().get(curseID); - if (Curse.availableCurses.size() > 0 && Curse.availableCurses.contains(cur)){ - playerInfo.setInteger(cur.getName(), grade); - Curse.availableCurses.remove(cur); - + addedCurses = true; } } @@ -311,7 +313,7 @@ public class EntityEventHandler entityitem.motionZ = 0; entityitem.motionY = 0.11000000298023224D; event.player.worldObj.spawnEntityInWorld(entityitem); - MinecraftServer.getServer().getConfigurationManager().sendChatMsg(new ChatComponentText("<" + event.player.getDisplayName() + "> This is MY item! MINE! I will NEVER give it to you! Mine! Mine! MINE!")); + MinecraftServer.getServer().getConfigurationManager().sendChatMsg(new ChatComponentText("<" + event.player.getDisplayName() + "> This is MY item! MINE! I will NEVER give it to you! Mine! Mine! MINE!")); event.setCanceled(true); } } @@ -375,14 +377,13 @@ public class EntityEventHandler } if (entity.worldObj.isRemote) JewelrycraftMod.netWrapper.sendToServer(new PacketRequestPlayerInfo()); } - for(Curse curse: Curse.getCurseList()) if (playerInfo.getInteger(curse.getName()) > 0) curse.playerDeathAction(player.worldObj, player); for(int i = 0; i < 18; i++) if (playerInfo.hasKey("ext" + i)){ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i); ItemStack item = ItemStack.loadItemStackFromNBT(nbt); - if (item != null) ((ItemBaseJewelry)item.getItem()).onPlayerDead(item, player, event.source); + if (item != null && item.getItem() instanceof ItemBaseJewelry) ((ItemBaseJewelry)item.getItem()).onPlayerDead(item, player, event.source); } } if (event.entity instanceof EntityPlayer && !(event.entity instanceof EntityPlayerMP)) JewelrycraftMod.netWrapper.sendToServer(new PacketRequestPlayerInfo()); @@ -438,8 +439,7 @@ public class EntityEventHandler @SubscribeEvent @SideOnly (Side.CLIENT) public void fogColors(EntityViewRenderEvent.FogColors event) - { - } + {} /** * @param event @@ -455,6 +455,5 @@ public class EntityEventHandler @SubscribeEvent @SideOnly (Side.CLIENT) public void renderFog(EntityViewRenderEvent.RenderFogEvent event) - { - } + {} }
\ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/events/PlayerRenderHandler.java b/src/main/java/darkknight/jewelrycraft/events/PlayerRenderHandler.java index 575eae3..4d07cda 100644 --- a/src/main/java/darkknight/jewelrycraft/events/PlayerRenderHandler.java +++ b/src/main/java/darkknight/jewelrycraft/events/PlayerRenderHandler.java @@ -1,70 +1,98 @@ package darkknight.jewelrycraft.events; +import java.nio.FloatBuffer; import java.util.Iterator; +import net.minecraft.block.Block; +import net.minecraft.block.BlockAir; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Vec3; import net.minecraftforge.client.event.RenderHandEvent; import net.minecraftforge.client.event.RenderPlayerEvent; +import org.lwjgl.BufferUtils; import org.lwjgl.opengl.GL11; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import darkknight.jewelrycraft.api.Curse; -import darkknight.jewelrycraft.curses.CurseList; import darkknight.jewelrycraft.item.render.BraceletRender; import darkknight.jewelrycraft.item.render.EarringsRender; +import darkknight.jewelrycraft.item.render.NecklaceRender; +import darkknight.jewelrycraft.item.render.RingRender; import darkknight.jewelrycraft.util.JewelryNBT; -import darkknight.jewelrycraft.util.Variables; public class PlayerRenderHandler { EarringsRender earrings = new EarringsRender(); BraceletRender bracelet = new BraceletRender(); + NecklaceRender necklace = new NecklaceRender(); + RingRender ring = new RingRender(); public static NBTTagCompound playersInfo = new NBTTagCompound(); float size = 0.055F; @SubscribeEvent public void renderScreen(RenderPlayerEvent.Specials.Post event) { + GL11.glPushMatrix(); ModelBiped main = event.renderer.modelBipedMain; ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm; ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm; ModelRenderer head = event.renderer.modelBipedMain.bipedHead; + ModelRenderer body = event.renderer.modelBipedMain.bipedBody; Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator(); if (playersInfo != null){ while (players.hasNext()){ int[] gemColor = {-1, -1, -1, -1}; int[] ingotColor = {-1, -1, -1, -1}; - int earringGem = -1; - int earringIngot = -1; + int gem = -1; + int ingot = -1; EntityPlayer player = players.next(); NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName()); for(Curse curse: Curse.getCurseList()) if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event); - if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){ - NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17"); - ItemStack item = ItemStack.loadItemStackFromNBT(nbt); - GL11.glPushMatrix(); - if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){ - if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size); - }else{ - GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size); - if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F); - if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F); - if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F); - } - GL11.glScalef(0.0625f, 0.0625f, 0.0625f); - GL11.glTranslatef(0.0F, 1.0F, -2.0F); - if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item); - if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item); - earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F); - GL11.glPopMatrix(); + int no = 0; + ModelRenderer arm = rightArm; + if (player.inventory.getCurrentItem() != null && Block.getBlockFromItem(player.inventory.getCurrentItem().getItem()) instanceof BlockAir){ + GL11.glDisable(GL11.GL_LIGHT1); + FloatBuffer colorBuffer = BufferUtils.createFloatBuffer(4); + Vec3 lightPos = Vec3.createVectorHelper(0.0D, 2.0D, 1.0D).normalize(); + colorBuffer.clear(); + colorBuffer.put((float)lightPos.xCoord).put((float)lightPos.yCoord).put((float)lightPos.zCoord).put(-1F); + colorBuffer.flip(); + GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, colorBuffer); + colorBuffer.clear(); + colorBuffer.put(0.03f).put(0.03f).put(0.03f).put(1.0F); + colorBuffer.flip(); + GL11.glLight(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, colorBuffer); + //GL11.glLight(GL11.GL_LIGHT0, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F)); GL11.glLight(GL11.GL_LIGHT0, GL11.GL_SPECULAR, setColorBuffer(var2, var2, var2, 1.0F)); } + for(int i = 0; i <= 9; i++) + if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){ + gem = -1; + ingot = -1; + if (no > 4) arm = leftArm; + NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i); + ItemStack item = ItemStack.loadItemStackFromNBT(nbt); + GL11.glPushMatrix(); + if (arm.rotateAngleX == 0.0F && arm.rotateAngleY == 0.0F && arm.rotateAngleZ == 0.0F){ + if (arm.rotationPointX != 0.0F || arm.rotationPointY != 0.0F || arm.rotationPointZ != 0.0F) GL11.glTranslatef(arm.rotationPointX * size, arm.rotationPointY * size, arm.rotationPointZ * size); + }else{ + GL11.glTranslatef(arm.rotationPointX * size, arm.rotationPointY * size, arm.rotationPointZ * size); + if (arm.rotateAngleZ != 0.0F) GL11.glRotatef(arm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F); + if (arm.rotateAngleY != 0.0F) GL11.glRotatef(arm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F); + if (arm.rotateAngleX != 0.0F) GL11.glRotatef(arm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F); + } + if (JewelryNBT.ingot(item) != null) ingot = JewelryNBT.ingotColor(item); + if (JewelryNBT.gem(item) != null) gem = JewelryNBT.gemColor(item); + if (no <= 4) GL11.glTranslatef(0.64F + 0.05F * no, -1.15F, 0.07F); + else GL11.glTranslatef(0.59F + 0.05F * no, -1.15F, 0.07F); + GL11.glScalef(0.1f, 0.15f, 0.1f); + ring.doRender(event.entityPlayer, 0F, 0F, (float)ingot, (float)gem, 0F); + GL11.glPopMatrix(); + no++; + } for(int i = 10; i <= 13; i++) if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i); @@ -102,8 +130,57 @@ public class PlayerRenderHandler bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F); GL11.glPopMatrix(); } + no = 0; + for(int i = 14; i <= 16; i++) + if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){ + gem = -1; + ingot = -1; + NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i); + ItemStack item = ItemStack.loadItemStackFromNBT(nbt); + GL11.glPushMatrix(); + if (body.rotateAngleX == 0.0F && body.rotateAngleY == 0.0F && body.rotateAngleZ == 0.0F){ + if (body.rotationPointX != 0.0F || body.rotationPointY != 0.0F || body.rotationPointZ != 0.0F) GL11.glTranslatef(body.rotationPointX * size, body.rotationPointY * size, body.rotationPointZ * size); + }else{ + GL11.glTranslatef(body.rotationPointX * size, body.rotationPointY * size, body.rotationPointZ * size); + if (body.rotateAngleZ != 0.0F) GL11.glRotatef(body.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F); + if (body.rotateAngleY != 0.0F) GL11.glRotatef(body.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F); + if (body.rotateAngleX != 0.0F) GL11.glRotatef(body.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F); + } + GL11.glScalef(0.0625f, 0.0625f, 0.0625f); + if (JewelryNBT.gem(item) != null) gem = JewelryNBT.gemColor(item); + if (JewelryNBT.ingot(item) != null) ingot = JewelryNBT.ingotColor(item); + if (no > 0){ + GL11.glRotatef(no == 1 ? 25f : -25f, 0F, 0f, 1f); + GL11.glRotatef(no == 1 ? -5f : -10f, 1F, 0f, 0f); + } + necklace.doRender(event.entityPlayer, 0F, 0F, (float)ingot, (float)gem, 0F); + GL11.glPopMatrix(); + no++; + } + if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){ + gem = -1; + ingot = -1; + NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17"); + ItemStack item = ItemStack.loadItemStackFromNBT(nbt); + GL11.glPushMatrix(); + if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){ + if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size); + }else{ + GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size); + if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F); + if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F); + if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F); + } + GL11.glScalef(0.0625f, 0.0625f, 0.0625f); + GL11.glTranslatef(0.0F, 1.0F, -2.0F); + if (JewelryNBT.gem(item) != null) gem = JewelryNBT.gemColor(item); + if (JewelryNBT.ingot(item) != null) ingot = JewelryNBT.ingotColor(item); + earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingot, (float)gem, 0F); + GL11.glPopMatrix(); + } } } + GL11.glPopMatrix(); } float rot = 0F; @@ -116,8 +193,7 @@ public class PlayerRenderHandler if (player != null){ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName()); for(Curse curse: Curse.getCurseList()) - if (curse != null && playerInfo != null && playerInfo.hasKey(curse.getName()) && playerInfo.getInteger(curse.getName()) > 0 && playerInfo.hasKey("cursePoints") && playerInfo.getInteger("cursePoints") > 0) - curse.playerHandRender(player, event); + if (curse != null && playerInfo != null && playerInfo.hasKey(curse.getName()) && playerInfo.getInteger(curse.getName()) > 0 && playerInfo.hasKey("cursePoints") && playerInfo.getInteger("cursePoints") > 0) curse.playerHandRender(player, event); } } } diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java b/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java index f5c7848..4c2b425 100644 --- a/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java +++ b/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java @@ -192,7 +192,7 @@ public abstract class ItemBaseJewelry extends Item { if (stack.hasTagCompound() && par4){ ItemStack ingot = JewelryNBT.ingot(stack); - if (ingot != null && Item.getIdFromItem(JewelryNBT.ingot(stack).getItem()) > 0) list.add("Ingot: " + EnumChatFormatting.YELLOW + ingot.getDisplayName()); + if (ingot != null && Item.getIdFromItem(JewelryNBT.ingot(stack).getItem()) > 0) list.add("Metal: " + EnumChatFormatting.YELLOW + ingot.getDisplayName().replace("Ingot", " ")); ItemStack gem = JewelryNBT.gem(stack); if (gem != null) list.add("Gem: " + EnumChatFormatting.BLUE + gem.getDisplayName()); ArrayList<ItemStack> modifier = JewelryNBT.modifier(stack); diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java b/src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java index dae54e7..6d20408 100644 --- a/src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java +++ b/src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java @@ -52,7 +52,7 @@ public class ItemGoldObj extends Item { ItemStack item = JewelryNBT.item(stack); if (item != null) return item.getIconIndex(); - return new ItemStack(Blocks.end_portal).getIconIndex(); + return new ItemStack(Items.golden_apple).getIconIndex(); } public String getItemStackDisplayName(ItemStack stack) diff --git a/src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java b/src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java index 5c54002..3bd4afe 100644 --- a/src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java +++ b/src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java @@ -25,6 +25,8 @@ public class MaskRender extends TileEntitySpecialRenderer { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); + GL11.glTranslatef(0.1615F, 0F, 0.03F); + GL11.glScalef(1.0F, 1.0F, 0.5F); mask.render(entity, 0F, 0F, 0F, 0F, 0F, 0.02F); GL11.glPopMatrix(); } diff --git a/src/main/java/darkknight/jewelrycraft/item/render/NecklaceRender.java b/src/main/java/darkknight/jewelrycraft/item/render/NecklaceRender.java new file mode 100644 index 0000000..e773a14 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/item/render/NecklaceRender.java @@ -0,0 +1,29 @@ +package darkknight.jewelrycraft.item.render; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; +import darkknight.jewelrycraft.model.ModelNeckalce; +import darkknight.jewelrycraft.util.Variables; + +public class NecklaceRender extends TileEntitySpecialRenderer +{ + public ModelNeckalce neckalce = new ModelNeckalce(); + ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Necklace.png"); + + @Override + public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) + { + } + + public void doRender(Entity entity, double x, double y, double z, float f, float g) + { + GL11.glPushMatrix(); + Minecraft.getMinecraft().renderEngine.bindTexture(texture); + if ((float)z != -1) neckalce.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F); + GL11.glPopMatrix(); + } +}
\ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/item/render/RingRender.java b/src/main/java/darkknight/jewelrycraft/item/render/RingRender.java new file mode 100644 index 0000000..084f716 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/item/render/RingRender.java @@ -0,0 +1,29 @@ +package darkknight.jewelrycraft.item.render; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; +import darkknight.jewelrycraft.model.ModelRing; +import darkknight.jewelrycraft.util.Variables; + +public class RingRender extends TileEntitySpecialRenderer +{ + public ModelRing ring = new ModelRing(); + ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Ring.png"); + + @Override + public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) + { + } + + public void doRender(Entity entity, double x, double y, double z, float f, float g) + { + GL11.glPushMatrix(); + Minecraft.getMinecraft().renderEngine.bindTexture(texture); + if ((float)z != -1) ring.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F); + GL11.glPopMatrix(); + } +}
\ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/model/ModelBracelet.java b/src/main/java/darkknight/jewelrycraft/model/ModelBracelet.java index b8e8da2..0323c1d 100644 --- a/src/main/java/darkknight/jewelrycraft/model/ModelBracelet.java +++ b/src/main/java/darkknight/jewelrycraft/model/ModelBracelet.java @@ -75,7 +75,7 @@ public class ModelBracelet extends ModelBase @Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - GL11.glDisable(GL11.GL_LIGHTING); +// GL11.glDisable(GL11.GL_LIGHTING); if ((int)f3 != -1){ int ingotColor = (int)f3; int red = (ingotColor >> 16) & 0xff; @@ -169,7 +169,7 @@ public class ModelBracelet extends ModelBase GL11.glPopMatrix(); GL11.glDisable(GL11.GL_BLEND); } - GL11.glEnable(GL11.GL_LIGHTING); +// GL11.glEnable(GL11.GL_LIGHTING); } /** diff --git a/src/main/java/darkknight/jewelrycraft/model/ModelEarrings.java b/src/main/java/darkknight/jewelrycraft/model/ModelEarrings.java index f983332..747117a 100644 --- a/src/main/java/darkknight/jewelrycraft/model/ModelEarrings.java +++ b/src/main/java/darkknight/jewelrycraft/model/ModelEarrings.java @@ -76,7 +76,7 @@ public class ModelEarrings extends ModelBase super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5); GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); +// GL11.glDisable(GL11.GL_LIGHTING); if ((int)f3 != -1){ int ingotColor = (int)f3; int red = ingotColor >> 16 & 0xff; @@ -102,7 +102,7 @@ public class ModelEarrings extends ModelBase Gem1.render(f5); GL11.glDisable(GL11.GL_BLEND); } - GL11.glEnable(GL11.GL_LIGHTING); +// GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } diff --git a/src/main/java/darkknight/jewelrycraft/model/ModelMask.java b/src/main/java/darkknight/jewelrycraft/model/ModelMask.java index 5e5edb0..1cf6a7c 100644 --- a/src/main/java/darkknight/jewelrycraft/model/ModelMask.java +++ b/src/main/java/darkknight/jewelrycraft/model/ModelMask.java @@ -1,917 +1,75 @@ package darkknight.jewelrycraft.model; + import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelMask extends ModelBase -{ - ModelRenderer p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121, p122, p123, p124, p125, p126; - public ModelMask() - { - textureWidth = 24; - textureHeight = 24; - p0 = new ModelRenderer(this, 5, 0); - p0.addBox(0F, 0F, 0F, 2, 1, 1); - p0.setRotationPoint(6F, 1F, 3F); - p0.setTextureSize(24, 24); - p0.mirror = true; - - p1 = new ModelRenderer(this, 7, 0); - p1.addBox(0F, 0F, 0F, 3, 1, 1); - p1.setRotationPoint(8F, 1F, 2F); - p1.setTextureSize(24, 24); - p1.mirror = true; - - p2 = new ModelRenderer(this, 10, 0); - p2.addBox(0F, 0F, 0F, 3, 1, 1); - p2.setRotationPoint(11F, 1F, 1F); - p2.setTextureSize(24, 24); - p2.mirror = true; - - p3 = new ModelRenderer(this, 13, 0); - p3.addBox(0F, 0F, 0F, 3, 1, 1); - p3.setRotationPoint(14F, 1F, 2F); - p3.setTextureSize(24, 24); - p3.mirror = true; - - p4 = new ModelRenderer(this, 16, 0); - p4.addBox(0F, 0F, 0F, 2, 1, 1); - p4.setRotationPoint(17F, 1F, 3F); - p4.setTextureSize(24, 24); - p4.mirror = true; - - p5 = new ModelRenderer(this, 4, 1); - p5.addBox(0F, 0F, 0F, 3, 1, 1); - p5.setRotationPoint(5F, 2F, 3F); - p5.setTextureSize(24, 24); - p5.mirror = true; - - p6 = new ModelRenderer(this, 7, 1); - p6.addBox(0F, 0F, 0F, 3, 1, 1); - p6.setRotationPoint(8F, 2F, 2F); - p6.setTextureSize(24, 24); - p6.mirror = true; - - p7 = new ModelRenderer(this, 10, 1); - p7.addBox(0F, 0F, 0F, 3, 1, 1); - p7.setRotationPoint(11F, 2F, 1F); - p7.setTextureSize(24, 24); - p7.mirror = true; - - p8 = new ModelRenderer(this, 13, 1); - p8.addBox(0F, 0F, 0F, 3, 1, 1); - p8.setRotationPoint(14F, 2F, 2F); - p8.setTextureSize(24, 24); - p8.mirror = true; - - p9 = new ModelRenderer(this, 16, 1); - p9.addBox(0F, 0F, 0F, 3, 1, 1); - p9.setRotationPoint(17F, 2F, 3F); - p9.setTextureSize(24, 24); - p9.mirror = true; - - p10 = new ModelRenderer(this, 3, 2); - p10.addBox(0F, 0F, 0F, 1, 1, 1); - p10.setRotationPoint(4F, 3F, 4F); - p10.setTextureSize(24, 24); - p10.mirror = true; - - p11 = new ModelRenderer(this, 4, 2); - p11.addBox(0F, 0F, 0F, 3, 1, 1); - p11.setRotationPoint(5F, 3F, 3F); - p11.setTextureSize(24, 24); - p11.mirror = true; - - p12 = new ModelRenderer(this, 7, 2); - p12.addBox(0F, 0F, 0F, 3, 1, 1); - p12.setRotationPoint(8F, 3F, 2F); - p12.setTextureSize(24, 24); - p12.mirror = true; - - p13 = new ModelRenderer(this, 10, 2); - p13.addBox(0F, 0F, 0F, 3, 1, 1); - p13.setRotationPoint(11F, 3F, 1F); - p13.setTextureSize(24, 24); - p13.mirror = true; - - p14 = new ModelRenderer(this, 13, 2); - p14.addBox(0F, 0F, 0F, 3, 1, 1); - p14.setRotationPoint(14F, 3F, 2F); - p14.setTextureSize(24, 24); - p14.mirror = true; - - p15 = new ModelRenderer(this, 16, 2); - p15.addBox(0F, 0F, 0F, 3, 1, 1); - p15.setRotationPoint(17F, 3F, 3F); - p15.setTextureSize(24, 24); - p15.mirror = true; - - p16 = new ModelRenderer(this, 19, 2); - p16.addBox(0F, 0F, 0F, 1, 1, 1); - p16.setRotationPoint(20F, 3F, 4F); - p16.setTextureSize(24, 24); - p16.mirror = true; - - p17 = new ModelRenderer(this, 2, 3); - p17.addBox(0F, 0F, 0F, 2, 1, 1); - p17.setRotationPoint(3F, 4F, 4F); - p17.setTextureSize(24, 24); - p17.mirror = true; - - p18 = new ModelRenderer(this, 4, 3); - p18.addBox(0F, 0F, 0F, 3, 1, 1); - p18.setRotationPoint(5F, 4F, 3F); - p18.setTextureSize(24, 24); - p18.mirror = true; - - p19 = new ModelRenderer(this, 7, 3); - p19.addBox(0F, 0F, 0F, 3, 1, 1); - p19.setRotationPoint(8F, 4F, 2F); - p19.setTextureSize(24, 24); - p19.mirror = true; - - p20 = new ModelRenderer(this, 10, 3); - p20.addBox(0F, 0F, 0F, 3, 1, 1); - p20.setRotationPoint(11F, 4F, 1F); - p20.setTextureSize(24, 24); - p20.mirror = true; - - p21 = new ModelRenderer(this, 13, 3); - p21.addBox(0F, 0F, 0F, 3, 1, 1); - p21.setRotationPoint(14F, 4F, 2F); - p21.setTextureSize(24, 24); - p21.mirror = true; - - p22 = new ModelRenderer(this, 16, 3); - p22.addBox(0F, 0F, 0F, 3, 1, 1); - p22.setRotationPoint(17F, 4F, 3F); - p22.setTextureSize(24, 24); - p22.mirror = true; - - p23 = new ModelRenderer(this, 19, 3); - p23.addBox(0F, 0F, 0F, 2, 1, 1); - p23.setRotationPoint(20F, 4F, 4F); - p23.setTextureSize(24, 24); - p23.mirror = true; - - p24 = new ModelRenderer(this, 2, 4); - p24.addBox(0F, 0F, 0F, 2, 1, 1); - p24.setRotationPoint(3F, 5F, 4F); - p24.setTextureSize(24, 24); - p24.mirror = true; - - p25 = new ModelRenderer(this, 4, 4); - p25.addBox(0F, 0F, 0F, 3, 1, 1); - p25.setRotationPoint(5F, 5F, 3F); - p25.setTextureSize(24, 24); - p25.mirror = true; - - p26 = new ModelRenderer(this, 7, 4); - p26.addBox(0F, 0F, 0F, 3, 1, 1); - p26.setRotationPoint(8F, 5F, 2F); - p26.setTextureSize(24, 24); - p26.mirror = true; - - p27 = new ModelRenderer(this, 10, 4); - p27.addBox(0F, 0F, 0F, 3, 1, 1); - p27.setRotationPoint(11F, 5F, 1F); - p27.setTextureSize(24, 24); - p27.mirror = true; - - p28 = new ModelRenderer(this, 13, 4); - p28.addBox(0F, 0F, 0F, 3, 1, 1); - p28.setRotationPoint(14F, 5F, 2F); - p28.setTextureSize(24, 24); - p28.mirror = true; - - p29 = new ModelRenderer(this, 16, 4); - p29.addBox(0F, 0F, 0F, 3, 1, 1); - p29.setRotationPoint(17F, 5F, 3F); - p29.setTextureSize(24, 24); - p29.mirror = true; - - p30 = new ModelRenderer(this, 19, 4); - p30.addBox(0F, 0F, 0F, 2, 1, 1); - p30.setRotationPoint(20F, 5F, 4F); - p30.setTextureSize(24, 24); - p30.mirror = true; - - p31 = new ModelRenderer(this, 2, 5); - p31.addBox(0F, 0F, 0F, 2, 1, 1); - p31.setRotationPoint(3F, 6F, 4F); - p31.setTextureSize(24, 24); - p31.mirror = true; - - p32 = new ModelRenderer(this, 4, 5); - p32.addBox(0F, 0F, 0F, 3, 1, 1); - p32.setRotationPoint(5F, 6F, 3F); - p32.setTextureSize(24, 24); - p32.mirror = true; - - p33 = new ModelRenderer(this, 7, 5); - p33.addBox(0F, 0F, 0F, 3, 1, 1); - p33.setRotationPoint(8F, 6F, 2F); - p33.setTextureSize(24, 24); - p33.mirror = true; - - p34 = new ModelRenderer(this, 10, 5); - p34.addBox(0F, 0F, 0F, 3, 1, 1); - p34.setRotationPoint(11F, 6F, 1F); - p34.setTextureSize(24, 24); - p34.mirror = true; - - p35 = new ModelRenderer(this, 13, 5); - p35.addBox(0F, 0F, 0F, 3, 1, 1); - p35.setRotationPoint(14F, 6F, 2F); - p35.setTextureSize(24, 24); - p35.mirror = true; - - p36 = new ModelRenderer(this, 16, 5); - p36.addBox(0F, 0F, 0F, 3, 1, 1); - p36.setRotationPoint(17F, 6F, 3F); - p36.setTextureSize(24, 24); - p36.mirror = true; - - p37 = new ModelRenderer(this, 19, 5); - p37.addBox(0F, 0F, 0F, 2, 1, 1); - p37.setRotationPoint(20F, 6F, 4F); - p37.setTextureSize(24, 24); - p37.mirror = true; - - p38 = new ModelRenderer(this, 2, 6); - p38.addBox(0F, 0F, 0F, 2, 1, 1); - p38.setRotationPoint(3F, 7F, 4F); - p38.setTextureSize(24, 24); - p38.mirror = true; - - p39 = new ModelRenderer(this, 4, 6); - p39.addBox(0F, 0F, 0F, 3, 1, 1); - p39.setRotationPoint(5F, 7F, 3F); - p39.setTextureSize(24, 24); - p39.mirror = true; - - p40 = new ModelRenderer(this, 7, 6); - p40.addBox(0F, 0F, 0F, 3, 1, 1); - p40.setRotationPoint(8F, 7F, 2F); - p40.setTextureSize(24, 24); - p40.mirror = true; - - p41 = new ModelRenderer(this, 10, 6); - p41.addBox(0F, 0F, 0F, 3, 1, 1); - p41.setRotationPoint(11F, 7F, 1F); - p41.setTextureSize(24, 24); - p41.mirror = true; - - p42 = new ModelRenderer(this, 13, 6); - p42.addBox(0F, 0F, 0F, 3, 1, 1); - p42.setRotationPoint(14F, 7F, 2F); - p42.setTextureSize(24, 24); - p42.mirror = true; - - p43 = new ModelRenderer(this, 16, 6); - p43.addBox(0F, 0F, 0F, 3, 1, 1); - p43.setRotationPoint(17F, 7F, 3F); - p43.setTextureSize(24, 24); - p43.mirror = true; - - p44 = new ModelRenderer(this, 19, 6); - p44.addBox(0F, 0F, 0F, 2, 1, 1); - p44.setRotationPoint(20F, 7F, 4F); - p44.setTextureSize(24, 24); - p44.mirror = true; - - p45 = new ModelRenderer(this, 2, 7); - p45.addBox(0F, 0F, 0F, 2, 1, 1); - p45.setRotationPoint(3F, 8F, 4F); - p45.setTextureSize(24, 24); - p45.mirror = true; - - p46 = new ModelRenderer(this, 4, 7); - p46.addBox(0F, 0F, 0F, 3, 1, 1); - p46.setRotationPoint(5F, 8F, 3F); - p46.setTextureSize(24, 24); - p46.mirror = true; - - p47 = new ModelRenderer(this, 7, 7); - p47.addBox(0F, 0F, 0F, 3, 1, 1); - p47.setRotationPoint(8F, 8F, 2F); - p47.setTextureSize(24, 24); - p47.mirror = true; - - p48 = new ModelRenderer(this, 10, 7); - p48.addBox(0F, 0F, 0F, 3, 1, 1); - p48.setRotationPoint(11F, 8F, 1F); - p48.setTextureSize(24, 24); - p48.mirror = true; - - p49 = new ModelRenderer(this, 13, 7); - p49.addBox(0F, 0F, 0F, 3, 1, 1); - p49.setRotationPoint(14F, 8F, 2F); - p49.setTextureSize(24, 24); - p49.mirror = true; - - p50 = new ModelRenderer(this, 16, 7); - p50.addBox(0F, 0F, 0F, 3, 1, 1); - p50.setRotationPoint(17F, 8F, 3F); - p50.setTextureSize(24, 24); - p50.mirror = true; - - p51 = new ModelRenderer(this, 19, 7); - p51.addBox(0F, 0F, 0F, 2, 1, 1); - p51.setRotationPoint(20F, 8F, 4F); - p51.setTextureSize(24, 24); - p51.mirror = true; - - p52 = new ModelRenderer(this, 2, 8); - p52.addBox(0F, 0F, 0F, 2, 1, 1); - p52.setRotationPoint(3F, 9F, 4F); - p52.setTextureSize(24, 24); - p52.mirror = true; - - p53 = new ModelRenderer(this, 4, 8); - p53.addBox(0F, 0F, 0F, 3, 1, 1); - p53.setRotationPoint(5F, 9F, 3F); - p53.setTextureSize(24, 24); - p53.mirror = true; - - p54 = new ModelRenderer(this, 7, 8); - p54.addBox(0F, 0F, 0F, 3, 1, 1); - p54.setRotationPoint(8F, 9F, 2F); - p54.setTextureSize(24, 24); - p54.mirror = true; - - p55 = new ModelRenderer(this, 10, 8); - p55.addBox(0F, 0F, 0F, 3, 1, 1); - p55.setRotationPoint(11F, 9F, 1F); - p55.setTextureSize(24, 24); - p55.mirror = true; - - p56 = new ModelRenderer(this, 13, 8); - p56.addBox(0F, 0F, 0F, 3, 1, 1); - p56.setRotationPoint(14F, 9F, 2F); - p56.setTextureSize(24, 24); - p56.mirror = true; - - p57 = new ModelRenderer(this, 16, 8); - p57.addBox(0F, 0F, 0F, 3, 1, 1); - p57.setRotationPoint(17F, 9F, 3F); - p57.setTextureSize(24, 24); - p57.mirror = true; - - p58 = new ModelRenderer(this, 19, 8); - p58.addBox(0F, 0F, 0F, 2, 1, 1); - p58.setRotationPoint(20F, 9F, 4F); - p58.setTextureSize(24, 24); - p58.mirror = true; - - p59 = new ModelRenderer(this, 2, 9); - p59.addBox(0F, 0F, 0F, 2, 1, 1); - p59.setRotationPoint(3F, 10F, 4F); - p59.setTextureSize(24, 24); - p59.mirror = true; - - p60 = new ModelRenderer(this, 4, 9); - p60.addBox(0F, 0F, 0F, 3, 1, 1); - p60.setRotationPoint(5F, 10F, 3F); - p60.setTextureSize(24, 24); - p60.mirror = true; - - p61 = new ModelRenderer(this, 7, 9); - p61.addBox(0F, 0F, 0F, 3, 1, 1); - p61.setRotationPoint(8F, 10F, 2F); - p61.setTextureSize(24, 24); - p61.mirror = true; - - p62 = new ModelRenderer(this, 10, 9); - p62.addBox(0F, 0F, 0F, 3, 1, 1); - p62.setRotationPoint(11F, 10F, 1F); - p62.setTextureSize(24, 24); - p62.mirror = true; - - p63 = new ModelRenderer(this, 13, 9); - p63.addBox(0F, 0F, 0F, 3, 1, 1); - p63.setRotationPoint(14F, 10F, 2F); - p63.setTextureSize(24, 24); - p63.mirror = true; - - p64 = new ModelRenderer(this, 16, 9); - p64.addBox(0F, 0F, 0F, 3, 1, 1); - p64.setRotationPoint(17F, 10F, 3F); - p64.setTextureSize(24, 24); - p64.mirror = true; - - p65 = new ModelRenderer(this, 19, 9); - p65.addBox(0F, 0F, 0F, 2, 1, 1); - p65.setRotationPoint(20F, 10F, 4F); - p65.setTextureSize(24, 24); - p65.mirror = true; - - p66 = new ModelRenderer(this, 2, 10); - p66.addBox(0F, 0F, 0F, 2, 1, 1); - p66.setRotationPoint(3F, 11F, 4F); - p66.setTextureSize(24, 24); - p66.mirror = true; - - p67 = new ModelRenderer(this, 4, 10); - p67.addBox(0F, 0F, 0F, 3, 1, 1); - p67.setRotationPoint(5F, 11F, 3F); - p67.setTextureSize(24, 24); - p67.mirror = true; - - p68 = new ModelRenderer(this, 7, 10); - p68.addBox(0F, 0F, 0F, 3, 1, 1); - p68.setRotationPoint(8F, 11F, 2F); - p68.setTextureSize(24, 24); - p68.mirror = true; - - p69 = new ModelRenderer(this, 10, 10); - p69.addBox(0F, 0F, 0F, 3, 1, 1); - p69.setRotationPoint(11F, 11F, 1F); - p69.setTextureSize(24, 24); - p69.mirror = true; - - p70 = new ModelRenderer(this, 13, 10); - p70.addBox(0F, 0F, 0F, 3, 1, 1); - p70.setRotationPoint(14F, 11F, 2F); - p70.setTextureSize(24, 24); - p70.mirror = true; - - p71 = new ModelRenderer(this, 16, 10); - p71.addBox(0F, 0F, 0F, 3, 1, 1); - p71.setRotationPoint(17F, 11F, 3F); - p71.setTextureSize(24, 24); - p71.mirror = true; - - p72 = new ModelRenderer(this, 19, 10); - p72.addBox(0F, 0F, 0F, 2, 1, 1); - p72.setRotationPoint(20F, 11F, 4F); - p72.setTextureSize(24, 24); - p72.mirror = true; - - p73 = new ModelRenderer(this, 2, 11); - p73.addBox(0F, 0F, 0F, 2, 1, 1); - p73.setRotationPoint(3F, 12F, 4F); - p73.setTextureSize(24, 24); - p73.mirror = true; - - p74 = new ModelRenderer(this, 4, 11); - p74.addBox(0F, 0F, 0F, 3, 1, 1); - p74.setRotationPoint(5F, 12F, 3F); - p74.setTextureSize(24, 24); - p74.mirror = true; - - p75 = new ModelRenderer(this, 7, 11); - p75.addBox(0F, 0F, 0F, 3, 1, 1); - p75.setRotationPoint(8F, 12F, 2F); - p75.setTextureSize(24, 24); - p75.mirror = true; - - p76 = new ModelRenderer(this, 10, 11); - p76.addBox(0F, 0F, 0F, 3, 1, 1); - p76.setRotationPoint(11F, 12F, 1F); - p76.setTextureSize(24, 24); - p76.mirror = true; - - p77 = new ModelRenderer(this, 13, 11); - p77.addBox(0F, 0F, 0F, 3, 1, 1); - p77.setRotationPoint(14F, 12F, 2F); - p77.setTextureSize(24, 24); - p77.mirror = true; - - p78 = new ModelRenderer(this, 16, 11); - p78.addBox(0F, 0F, 0F, 3, 1, 1); - p78.setRotationPoint(17F, 12F, 3F); - p78.setTextureSize(24, 24); - p78.mirror = true; - - p79 = new ModelRenderer(this, 19, 11); - p79.addBox(0F, 0F, 0F, 2, 1, 1); - p79.setRotationPoint(20F, 12F, 4F); - p79.setTextureSize(24, 24); - p79.mirror = true; - - p80 = new ModelRenderer(this, 3, 12); - p80.addBox(0F, 0F, 0F, 1, 1, 1); - p80.setRotationPoint(4F, 13F, 4F); - p80.setTextureSize(24, 24); - p80.mirror = true; - - p81 = new ModelRenderer(this, 4, 12); - p81.addBox(0F, 0F, 0F, 3, 1, 1); - p81.setRotationPoint(5F, 13F, 3F); - p81.setTextureSize(24, 24); - p81.mirror = true; - - p82 = new ModelRenderer(this, 7, 12); - p82.addBox(0F, 0F, 0F, 3, 1, 1); - p82.setRotationPoint(8F, 13F, 2F); - p82.setTextureSize(24, 24); - p82.mirror = true; - - p83 = new ModelRenderer(this, 10, 12); - p83.addBox(0F, 0F, 0F, 3, 1, 1); - p83.setRotationPoint(11F, 13F, 1F); - p83.setTextureSize(24, 24); - p83.mirror = true; - - p84 = new ModelRenderer(this, 13, 12); - p84.addBox(0F, 0F, 0F, 3, 1, 1); - p84.setRotationPoint(14F, 13F, 2F); - p84.setTextureSize(24, 24); - p84.mirror = true; - - p85 = new ModelRenderer(this, 16, 12); - p85.addBox(0F, 0F, 0F, 3, 1, 1); - p85.setRotationPoint(17F, 13F, 3F); - p85.setTextureSize(24, 24); - p85.mirror = true; - - p86 = new ModelRenderer(this, 19, 12); - p86.addBox(0F, 0F, 0F, 1, 1, 1); - p86.setRotationPoint(20F, 13F, 4F); - p86.setTextureSize(24, 24); - p86.mirror = true; - - p87 = new ModelRenderer(this, 3, 13); - p87.addBox(0F, 0F, 0F, 1, 1, 1); - p87.setRotationPoint(4F, 14F, 4F); - p87.setTextureSize(24, 24); - p87.mirror = true; - - p88 = new ModelRenderer(this, 4, 13); - p88.addBox(0F, 0F, 0F, 3, 1, 1); - p88.setRotationPoint(5F, 14F, 3F); - p88.setTextureSize(24, 24); - p88.mirror = true; - - p89 = new ModelRenderer(this, 7, 13); - p89.addBox(0F, 0F, 0F, 3, 1, 1); - p89.setRotationPoint(8F, 14F, 2F); - p89.setTextureSize(24, 24); - p89.mirror = true; - - p90 = new ModelRenderer(this, 10, 13); - p90.addBox(0F, 0F, 0F, 3, 1, 1); - p90.setRotationPoint(11F, 14F, 1F); - p90.setTextureSize(24, 24); - p90.mirror = true; - - p91 = new ModelRenderer(this, 13, 13); - p91.addBox(0F, 0F, 0F, 3, 1, 1); - p91.setRotationPoint(14F, 14F, 2F); - p91.setTextureSize(24, 24); - p91.mirror = true; - - p92 = new ModelRenderer(this, 16, 13); - p92.addBox(0F, 0F, 0F, 3, 1, 1); - p92.setRotationPoint(17F, 14F, 3F); - p92.setTextureSize(24, 24); - p92.mirror = true; - - p93 = new ModelRenderer(this, 19, 13); - p93.addBox(0F, 0F, 0F, 1, 1, 1); - p93.setRotationPoint(20F, 14F, 4F); - p93.setTextureSize(24, 24); - p93.mirror = true; - - p94 = new ModelRenderer(this, 3, 14); - p94.addBox(0F, 0F, 0F, 1, 1, 1); - p94.setRotationPoint(4F, 15F, 4F); - p94.setTextureSize(24, 24); - p94.mirror = true; - - p95 = new ModelRenderer(this, 4, 14); - p95.addBox(0F, 0F, 0F, 3, 1, 1); - p95.setRotationPoint(5F, 15F, 3F); - p95.setTextureSize(24, 24); - p95.mirror = true; - - p96 = new ModelRenderer(this, 7, 14); - p96.addBox(0F, 0F, 0F, 3, 1, 1); - p96.setRotationPoint(8F, 15F, 2F); - p96.setTextureSize(24, 24); - p96.mirror = true; - - p97 = new ModelRenderer(this, 10, 14); - p97.addBox(0F, 0F, 0F, 3, 1, 1); - p97.setRotationPoint(11F, 15F, 1F); - p97.setTextureSize(24, 24); - p97.mirror = true; - - p98 = new ModelRenderer(this, 13, 14); - p98.addBox(0F, 0F, 0F, 3, 1, 1); - p98.setRotationPoint(14F, 15F, 2F); - p98.setTextureSize(24, 24); - p98.mirror = true; - - p99 = new ModelRenderer(this, 16, 14); - p99.addBox(0F, 0F, 0F, 3, 1, 1); - p99.setRotationPoint(17F, 15F, 3F); - p99.setTextureSize(24, 24); - p99.mirror = true; - - p100 = new ModelRenderer(this, 19, 14); - p100.addBox(0F, 0F, 0F, 1, 1, 1); - p100.setRotationPoint(20F, 15F, 4F); - p100.setTextureSize(24, 24); - p100.mirror = true; - - p101 = new ModelRenderer(this, 4, 15); - p101.addBox(0F, 0F, 0F, 3, 1, 1); - p101.setRotationPoint(5F, 16F, 3F); - p101.setTextureSize(24, 24); - p101.mirror = true; - - p102 = new ModelRenderer(this, 7, 15); - p102.addBox(0F, 0F, 0F, 3, 1, 1); - p102.setRotationPoint(8F, 16F, 2F); - p102.setTextureSize(24, 24); - p102.mirror = true; - - p103 = new ModelRenderer(this, 10, 15); - p103.addBox(0F, 0F, 0F, 3, 1, 1); - p103.setRotationPoint(11F, 16F, 1F); - p103.setTextureSize(24, 24); - p103.mirror = true; - - p104 = new ModelRenderer(this, 13, 15); - p104.addBox(0F, 0F, 0F, 3, 1, 1); - p104.setRotationPoint(14F, 16F, 2F); - p104.setTextureSize(24, 24); - p104.mirror = true; - - p105 = new ModelRenderer(this, 16, 15); - p105.addBox(0F, 0F, 0F, 3, 1, 1); - p105.setRotationPoint(17F, 16F, 3F); - p105.setTextureSize(24, 24); - p105.mirror = true; - - p106 = new ModelRenderer(this, 4, 16); - p106.addBox(0F, 0F, 0F, 3, 1, 1); - p106.setRotationPoint(5F, 17F, 3F); - p106.setTextureSize(24, 24); - p106.mirror = true; - - p107 = new ModelRenderer(this, 7, 16); - p107.addBox(0F, 0F, 0F, 3, 1, 1); - p107.setRotationPoint(8F, 17F, 2F); - p107.setTextureSize(24, 24); - p107.mirror = true; - - p108 = new ModelRenderer(this, 10, 16); - p108.addBox(0F, 0F, 0F, 3, 1, 1); - p108.setRotationPoint(11F, 17F, 1F); - p108.setTextureSize(24, 24); - p108.mirror = true; - - p109 = new ModelRenderer(this, 13, 16); - p109.addBox(0F, 0F, 0F, 3, 1, 1); - p109.setRotationPoint(14F, 17F, 2F); - p109.setTextureSize(24, 24); - p109.mirror = true; - - p110 = new ModelRenderer(this, 16, 16); - p110.addBox(0F, 0F, 0F, 3, 1, 1); - p110.setRotationPoint(17F, 17F, 3F); - p110.setTextureSize(24, 24); - p110.mirror = true; - - p111 = new ModelRenderer(this, 5, 17); - p111.addBox(0F, 0F, 0F, 2, 1, 1); - p111.setRotationPoint(6F, 18F, 3F); - p111.setTextureSize(24, 24); - p111.mirror = true; - - p112 = new ModelRenderer(this, 7, 17); - p112.addBox(0F, 0F, 0F, 3, 1, 1); - p112.setRotationPoint(8F, 18F, 2F); - p112.setTextureSize(24, 24); - p112.mirror = true; - - p113 = new ModelRenderer(this, 10, 17); - p113.addBox(0F, 0F, 0F, 3, 1, 1); - p113.setRotationPoint(11F, 18F, 1F); - p113.setTextureSize(24, 24); - p113.mirror = true; - - p114 = new ModelRenderer(this, 13, 17); - p114.addBox(0F, 0F, 0F, 3, 1, 1); - p114.setRotationPoint(14F, 18F, 2F); - p114.setTextureSize(24, 24); - p114.mirror = true; - - p115 = new ModelRenderer(this, 16, 17); - p115.addBox(0F, 0F, 0F, 2, 1, 1); - p115.setRotationPoint(17F, 18F, 3F); - p115.setTextureSize(24, 24); - p115.mirror = true; - - p116 = new ModelRenderer(this, 6, 18); - p116.addBox(0F, 0F, 0F, 1, 1, 1); - p116.setRotationPoint(7F, 19F, 3F); - p116.setTextureSize(24, 24); - p116.mirror = true; - - p117 = new ModelRenderer(this, 7, 18); - p117.addBox(0F, 0F, 0F, 3, 1, 1); - p117.setRotationPoint(8F, 19F, 2F); - p117.setTextureSize(24, 24); - p117.mirror = true; - - p118 = new ModelRenderer(this, 10, 18); - p118.addBox(0F, 0F, 0F, 3, 1, 1); - p118.setRotationPoint(11F, 19F, 1F); - p118.setTextureSize(24, 24); - p118.mirror = true; - - p119 = new ModelRenderer(this, 13, 18); - p119.addBox(0F, 0F, 0F, 3, 1, 1); - p119.setRotationPoint(14F, 19F, 2F); - p119.setTextureSize(24, 24); - p119.mirror = true; - - p120 = new ModelRenderer(this, 16, 18); - p120.addBox(0F, 0F, 0F, 1, 1, 1); - p120.setRotationPoint(17F, 19F, 3F); - p120.setTextureSize(24, 24); - p120.mirror = true; - - p121 = new ModelRenderer(this, 7, 19); - p121.addBox(0F, 0F, 0F, 3, 1, 1); - p121.setRotationPoint(8F, 20F, 2F); - p121.setTextureSize(24, 24); - p121.mirror = true; - - p122 = new ModelRenderer(this, 10, 19); - p122.addBox(0F, 0F, 0F, 3, 1, 1); - p122.setRotationPoint(11F, 20F, 1F); - p122.setTextureSize(24, 24); - p122.mirror = true; - - p123 = new ModelRenderer(this, 13, 19); - p123.addBox(0F, 0F, 0F, 3, 1, 1); - p123.setRotationPoint(14F, 20F, 2F); - p123.setTextureSize(24, 24); - p123.mirror = true; - - p124 = new ModelRenderer(this, 8, 20); - p124.addBox(0F, 0F, 0F, 2, 1, 1); - p124.setRotationPoint(9F, 21F, 2F); - p124.setTextureSize(24, 24); - p124.mirror = true; - - p125 = new ModelRenderer(this, 10, 20); - p125.addBox(0F, 0F, 0F, 3, 1, 1); - p125.setRotationPoint(11F, 21F, 1F); - p125.setTextureSize(24, 24); - p125.mirror = true; - - p126 = new ModelRenderer(this, 13, 20); - p126.addBox(0F, 0F, 0F, 2, 1, 1); - p126.setRotationPoint(14F, 21F, 2F); - p126.setTextureSize(24, 24); - p126.mirror = true; - } - public void render(Entity entity, float f1, float f2, float f3, float f4, float f5, float f6) - { - super.render(entity, f1, f2, f3, f4, f5, f6); - setRotationAngles(f1, f2, f3, f4, f5, f6); - p0.render(f6); - p1.render(f6); - p2.render(f6); - p3.render(f6); - p4.render(f6); - p5.render(f6); - p6.render(f6); - p7.render(f6); - p8.render(f6); - p9.render(f6); - p10.render(f6); - p11.render(f6); - p12.render(f6); - p13.render(f6); - p14.render(f6); - p15.render(f6); - p16.render(f6); - p17.render(f6); - p18.render(f6); - p19.render(f6); - p20.render(f6); - p21.render(f6); - p22.render(f6); - p23.render(f6); - p24.render(f6); - p25.render(f6); - p26.render(f6); - p27.render(f6); - p28.render(f6); - p29.render(f6); - p30.render(f6); - p31.render(f6); - p32.render(f6); - p33.render(f6); - p34.render(f6); - p35.render(f6); - p36.render(f6); - p37.render(f6); - p38.render(f6); - p39.render(f6); - p40.render(f6); - p41.render(f6); - p42.render(f6); - p43.render(f6); - p44.render(f6); - p45.render(f6); - p46.render(f6); - p47.render(f6); - p48.render(f6); - p49.render(f6); - p50.render(f6); - p51.render(f6); - p52.render(f6); - p53.render(f6); - p54.render(f6); - p55.render(f6); - p56.render(f6); - p57.render(f6); - p58.render(f6); - p59.render(f6); - p60.render(f6); - p61.render(f6); - p62.render(f6); - p63.render(f6); - p64.render(f6); - p65.render(f6); - p66.render(f6); - p67.render(f6); - p68.render(f6); - p69.render(f6); - p70.render(f6); - p71.render(f6); - p72.render(f6); - p73.render(f6); - p74.render(f6); - p75.render(f6); - p76.render(f6); - p77.render(f6); - p78.render(f6); - p79.render(f6); - p80.render(f6); - p81.render(f6); - p82.render(f6); - p83.render(f6); - p84.render(f6); - p85.render(f6); - p86.render(f6); - p87.render(f6); - p88.render(f6); - p89.render(f6); - p90.render(f6); - p91.render(f6); - p92.render(f6); - p93.render(f6); - p94.render(f6); - p95.render(f6); - p96.render(f6); - p97.render(f6); - p98.render(f6); - p99.render(f6); - p100.render(f6); - p101.render(f6); - p102.render(f6); - p103.render(f6); - p104.render(f6); - p105.render(f6); - p106.render(f6); - p107.render(f6); - p108.render(f6); - p109.render(f6); - p110.render(f6); - p111.render(f6); - p112.render(f6); - p113.render(f6); - p114.render(f6); - p115.render(f6); - p116.render(f6); - p117.render(f6); - p118.render(f6); - p119.render(f6); - p120.render(f6); - p121.render(f6); - p122.render(f6); - p123.render(f6); - p124.render(f6); - p125.render(f6); - p126.render(f6); - } - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, null); - } +/** + * ModelMask - OnyxDarkKnight + * Created using Tabula 4.1.1 + */ +public class ModelMask extends ModelBase { + public ModelRenderer shape1; + public ModelRenderer shape2; + public ModelRenderer shape3; + public ModelRenderer shape4; + public ModelRenderer shape5; + public ModelRenderer shape6; + public ModelRenderer shape7; + public ModelRenderer shape8; + public ModelRenderer shape9; + + public ModelMask() { + this.textureWidth = 64; + this.textureHeight = 64; + this.shape6 = new ModelRenderer(this, 41, 4); + this.shape6.setRotationPoint(11.0F, 0.0F, 3.0F); + this.shape6.addBox(0.0F, 0.0F, 0.0F, 1, 15, 1, 0.0F); + this.shape7 = new ModelRenderer(this, 41, 4); + this.shape7.setRotationPoint(-3.0F, 0.0F, 3.0F); + this.shape7.addBox(0.0F, 0.0F, 0.0F, 1, 15, 1, 0.0F); + this.shape4 = new ModelRenderer(this, 31, 2); + this.shape4.setRotationPoint(-2.0F, 0.0F, 2.0F); + this.shape4.addBox(0.0F, 0.0F, 0.0F, 1, 17, 1, 0.0F); + this.shape1 = new ModelRenderer(this, 0, 0); + this.shape1.setRotationPoint(0.0F, 0.0F, 0.0F); + this.shape1.addBox(0.0F, 0.0F, 0.0F, 9, 19, 1, 0.0F); + this.shape9 = new ModelRenderer(this, 46, 8); + this.shape9.setRotationPoint(12.0F, 1.0F, 4.0F); + this.shape9.addBox(0.0F, 0.0F, 0.0F, 1, 11, 1, 0.0F); + this.shape5 = new ModelRenderer(this, 36, 2); + this.shape5.setRotationPoint(10.0F, 0.0F, 2.0F); + this.shape5.addBox(0.0F, 0.0F, 0.0F, 1, 17, 1, 0.0F); + this.shape8 = new ModelRenderer(this, 46, 8); + this.shape8.setRotationPoint(-4.0F, 1.0F, 4.0F); + this.shape8.addBox(0.0F, 0.0F, 0.0F, 1, 11, 1, 0.0F); + this.shape3 = new ModelRenderer(this, 26, 1); + this.shape3.setRotationPoint(9.0F, 0.0F, 1.0F); + this.shape3.addBox(0.0F, 0.0F, 0.0F, 1, 18, 1, 0.0F); + this.shape2 = new ModelRenderer(this, 21, 1); + this.shape2.setRotationPoint(-1.0F, 0.0F, 1.0F); + this.shape2.addBox(0.0F, 0.0F, 0.0F, 1, 18, 1, 0.0F); + } + + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + this.shape6.render(f5); + this.shape7.render(f5); + this.shape4.render(f5); + this.shape1.render(f5); + this.shape9.render(f5); + this.shape5.render(f5); + this.shape8.render(f5); + this.shape3.render(f5); + this.shape2.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/darkknight/jewelrycraft/model/ModelNeckalce.java b/src/main/java/darkknight/jewelrycraft/model/ModelNeckalce.java new file mode 100644 index 0000000..ed754ef --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/model/ModelNeckalce.java @@ -0,0 +1,173 @@ +package darkknight.jewelrycraft.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import org.lwjgl.opengl.GL11; + +/** + * ModelNeckalce - OnyxDarkKnight Created using Tabula 4.1.1 + */ +public class ModelNeckalce extends ModelBase +{ + public ModelRenderer neck1; + public ModelRenderer neck2; + public ModelRenderer neck3; + public ModelRenderer neck4; + public ModelRenderer neck5; + public ModelRenderer neck6; + public ModelRenderer neck7; + public ModelRenderer neck8; + public ModelRenderer neck9; + public ModelRenderer gem; + + public ModelNeckalce() + { + this.textureWidth = 32; + this.textureHeight = 32; + this.neck1 = new ModelRenderer(this, 0, 0); + this.neck1.setRotationPoint(2.0F, 0.0F, -2.5F); + this.neck1.addBox(0.0F, 0.0F, 0.0F, 1, 4, 1, 0.0F); + this.neck7 = new ModelRenderer(this, 0, 0); + this.neck7.setRotationPoint(-1.0F, 3.5F, -2.5F); + this.neck7.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F); + this.neck8 = new ModelRenderer(this, 0, 0); + this.neck8.setRotationPoint(0.7F, 3.5F, -2.5F); + this.neck8.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F); + this.neck3 = new ModelRenderer(this, 0, 0); + this.neck3.setRotationPoint(-2.0F, 1.5F, -2.5F); + this.neck3.addBox(0.0F, 0.0F, 0.0F, 1, 3, 1, 0.0F); + this.neck6 = new ModelRenderer(this, 0, 0); + this.neck6.setRotationPoint(-1.5F, 2.5F, -2.5F); + this.neck6.addBox(0.0F, 0.0F, 0.0F, 1, 3, 1, 0.0F); + this.neck9 = new ModelRenderer(this, 0, 0); + this.neck9.setRotationPoint(-0.75F, 4.0F, -2.5F); + this.neck9.addBox(0.0F, 0.0F, 0.0F, 3, 3, 1, 0.0F); + this.neck4 = new ModelRenderer(this, 0, 0); + this.neck4.setRotationPoint(1.5F, 1.5F, -2.5F); + this.neck4.addBox(0.0F, 0.0F, 0.0F, 1, 3, 1, 0.0F); + this.neck2 = new ModelRenderer(this, 0, 0); + this.neck2.setRotationPoint(-2.5F, 0.0F, -2.5F); + this.neck2.addBox(0.0F, 0.0F, 0.0F, 1, 4, 1, 0.0F); + this.gem = new ModelRenderer(this, 9, 0); + this.gem.setRotationPoint(-0.5F, 4.25F, -2.75F); + this.gem.addBox(0.0F, 0.0F, 0.0F, 4, 4, 1, 0.0F); + this.neck5 = new ModelRenderer(this, 0, 0); + this.neck5.setRotationPoint(1.0F, 2.5F, -2.5F); + this.neck5.addBox(0.0F, 0.0F, 0.0F, 1, 3, 1, 0.0F); + } + + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + { +// GL11.glDisable(GL11.GL_LIGHTING); + if ((int)f3 != -1){ + int ingotColor = (int)f3; + int red = (ingotColor >> 16) & 0xff; + int green = (ingotColor >> 8) & 0xff; + int blue = ingotColor & 0xff; + GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255); + GL11.glPushMatrix(); + GL11.glTranslatef(this.neck1.offsetX, this.neck1.offsetY, this.neck1.offsetZ); + GL11.glTranslatef(this.neck1.rotationPointX * f5, this.neck1.rotationPointY * f5, this.neck1.rotationPointZ * f5); + GL11.glScaled(0.5D, 0.5D, 0.5D); + GL11.glTranslatef(-this.neck1.offsetX, -this.neck1.offsetY, -this.neck1.offsetZ); + GL11.glTranslatef(-this.neck1.rotationPointX * f5, -this.neck1.rotationPointY * f5, -this.neck1.rotationPointZ * f5); + this.neck1.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.neck7.offsetX, this.neck7.offsetY, this.neck7.offsetZ); + GL11.glTranslatef(this.neck7.rotationPointX * f5, this.neck7.rotationPointY * f5, this.neck7.rotationPointZ * f5); + GL11.glScaled(0.3D, 0.5D, 0.5D); + GL11.glTranslatef(-this.neck7.offsetX, -this.neck7.offsetY, -this.neck7.offsetZ); + GL11.glTranslatef(-this.neck7.rotationPointX * f5, -this.neck7.rotationPointY * f5, -this.neck7.rotationPointZ * f5); + this.neck7.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.neck8.offsetX, this.neck8.offsetY, this.neck8.offsetZ); + GL11.glTranslatef(this.neck8.rotationPointX * f5, this.neck8.rotationPointY * f5, this.neck8.rotationPointZ * f5); + GL11.glScaled(0.3D, 0.5D, 0.5D); + GL11.glTranslatef(-this.neck8.offsetX, -this.neck8.offsetY, -this.neck8.offsetZ); + GL11.glTranslatef(-this.neck8.rotationPointX * f5, -this.neck8.rotationPointY * f5, -this.neck8.rotationPointZ * f5); + this.neck8.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.neck3.offsetX, this.neck3.offsetY, this.neck3.offsetZ); + GL11.glTranslatef(this.neck3.rotationPointX * f5, this.neck3.rotationPointY * f5, this.neck3.rotationPointZ * f5); + GL11.glScaled(0.5D, 0.5D, 0.5D); + GL11.glTranslatef(-this.neck3.offsetX, -this.neck3.offsetY, -this.neck3.offsetZ); + GL11.glTranslatef(-this.neck3.rotationPointX * f5, -this.neck3.rotationPointY * f5, -this.neck3.rotationPointZ * f5); + this.neck3.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.neck6.offsetX, this.neck6.offsetY, this.neck6.offsetZ); + GL11.glTranslatef(this.neck6.rotationPointX * f5, this.neck6.rotationPointY * f5, this.neck6.rotationPointZ * f5); + GL11.glScaled(0.5D, 0.5D, 0.5D); + GL11.glTranslatef(-this.neck6.offsetX, -this.neck6.offsetY, -this.neck6.offsetZ); + GL11.glTranslatef(-this.neck6.rotationPointX * f5, -this.neck6.rotationPointY * f5, -this.neck6.rotationPointZ * f5); + this.neck6.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.neck9.offsetX, this.neck9.offsetY, this.neck9.offsetZ); + GL11.glTranslatef(this.neck9.rotationPointX * f5, this.neck9.rotationPointY * f5, this.neck9.rotationPointZ * f5); + GL11.glScaled(0.5D, 0.5D, 0.5D); + GL11.glTranslatef(-this.neck9.offsetX, -this.neck9.offsetY, -this.neck9.offsetZ); + GL11.glTranslatef(-this.neck9.rotationPointX * f5, -this.neck9.rotationPointY * f5, -this.neck9.rotationPointZ * f5); + this.neck9.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.neck4.offsetX, this.neck4.offsetY, this.neck4.offsetZ); + GL11.glTranslatef(this.neck4.rotationPointX * f5, this.neck4.rotationPointY * f5, this.neck4.rotationPointZ * f5); + GL11.glScaled(0.5D, 0.5D, 0.5D); + GL11.glTranslatef(-this.neck4.offsetX, -this.neck4.offsetY, -this.neck4.offsetZ); + GL11.glTranslatef(-this.neck4.rotationPointX * f5, -this.neck4.rotationPointY * f5, -this.neck4.rotationPointZ * f5); + this.neck4.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.neck2.offsetX, this.neck2.offsetY, this.neck2.offsetZ); + GL11.glTranslatef(this.neck2.rotationPointX * f5, this.neck2.rotationPointY * f5, this.neck2.rotationPointZ * f5); + GL11.glScaled(0.5D, 0.5D, 0.5D); + GL11.glTranslatef(-this.neck2.offsetX, -this.neck2.offsetY, -this.neck2.offsetZ); + GL11.glTranslatef(-this.neck2.rotationPointX * f5, -this.neck2.rotationPointY * f5, -this.neck2.rotationPointZ * f5); + this.neck2.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.neck5.offsetX, this.neck5.offsetY, this.neck5.offsetZ); + GL11.glTranslatef(this.neck5.rotationPointX * f5, this.neck5.rotationPointY * f5, this.neck5.rotationPointZ * f5); + GL11.glScaled(0.5D, 0.5D, 0.5D); + GL11.glTranslatef(-this.neck5.offsetX, -this.neck5.offsetY, -this.neck5.offsetZ); + GL11.glTranslatef(-this.neck5.rotationPointX * f5, -this.neck5.rotationPointY * f5, -this.neck5.rotationPointZ * f5); + this.neck5.render(f5); + GL11.glPopMatrix(); + } + if ((int)f4 != -1){ + int gemColor = (int)f4; + int red = gemColor >> 16 & 0xff; + int green = gemColor >> 8 & 0xff; + int blue = gemColor & 0xff; + GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR); + GL11.glPushMatrix(); + GL11.glTranslatef(this.gem.offsetX, this.gem.offsetY, this.gem.offsetZ); + GL11.glTranslatef(this.gem.rotationPointX * f5, this.gem.rotationPointY * f5, this.gem.rotationPointZ * f5); + GL11.glScaled(0.25D, 0.25D, 0.25D); + GL11.glTranslatef(-this.gem.offsetX, -this.gem.offsetY, -this.gem.offsetZ); + GL11.glTranslatef(-this.gem.rotationPointX * f5, -this.gem.rotationPointY * f5, -this.gem.rotationPointZ * f5); + this.gem.render(f5); + GL11.glPopMatrix(); + GL11.glDisable(GL11.GL_BLEND); + } +// GL11.glEnable(GL11.GL_LIGHTING); + } + + /** + * 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/darkknight/jewelrycraft/model/ModelRing.java b/src/main/java/darkknight/jewelrycraft/model/ModelRing.java new file mode 100644 index 0000000..babb171 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/model/ModelRing.java @@ -0,0 +1,124 @@ +package darkknight.jewelrycraft.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import org.lwjgl.opengl.GL11; + +/** + * ModelRing - OnyxDarkKnight Created using Tabula 4.1.1 + */ +public class ModelRing extends ModelBase +{ + public ModelRenderer ring1; + public ModelRenderer ring2; + public ModelRenderer ring3; + public ModelRenderer gem; + public ModelRenderer gem1; + public ModelRenderer gem2; + + public ModelRing() + { + this.textureWidth = 32; + this.textureHeight = 32; + this.ring1 = new ModelRenderer(this, 0, 0); + this.ring1.setRotationPoint(-8.6F, 11.4F, -2.15F); + this.ring1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F); + this.ring3 = new ModelRenderer(this, 0, 0); + this.ring3.setRotationPoint(-8.5F, 11.4F, -2.15F); + this.ring3.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F); + this.gem = new ModelRenderer(this, 5, 0); + this.gem.setRotationPoint(-8.5F, 11.5F, -2.25F); + this.gem.addBox(0.0F, 0.0F, 0.0F, 2, 1, 1, 0.0F); + this.gem1 = new ModelRenderer(this, 6, 0); + this.gem1.setRotationPoint(-8.45F, 11.45F, -2.25F); + this.gem1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F); + this.ring2 = new ModelRenderer(this, 0, 0); + this.ring2.setRotationPoint(-8.3F, 11.4F, -2.15F); + this.ring2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F); + this.gem2 = new ModelRenderer(this, 6, 0); + this.gem2.setRotationPoint(-8.45F, 11.6F, -2.25F); + this.gem2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F); + } + + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + { +// GL11.glEnable(GL11.GL_LIGHTING); + if ((int)f3 != -1){ + int ingotColor = (int)f3; + int red = (ingotColor >> 16) & 0xff; + int green = (ingotColor >> 8) & 0xff; + int blue = ingotColor & 0xff; + GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255); + GL11.glPushMatrix(); + GL11.glTranslatef(this.ring1.offsetX, this.ring1.offsetY, this.ring1.offsetZ); + GL11.glTranslatef(this.ring1.rotationPointX * f5, this.ring1.rotationPointY * f5, this.ring1.rotationPointZ * f5); + GL11.glScaled(0.1D, 0.3D, 0.3D); + GL11.glTranslatef(-this.ring1.offsetX, -this.ring1.offsetY, -this.ring1.offsetZ); + GL11.glTranslatef(-this.ring1.rotationPointX * f5, -this.ring1.rotationPointY * f5, -this.ring1.rotationPointZ * f5); + this.ring1.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.ring2.offsetX, this.ring2.offsetY, this.ring2.offsetZ); + GL11.glTranslatef(this.ring2.rotationPointX * f5, this.ring2.rotationPointY * f5, this.ring2.rotationPointZ * f5); + GL11.glScaled(0.1D, 0.3D, 0.3D); + GL11.glTranslatef(-this.ring2.offsetX, -this.ring2.offsetY, -this.ring2.offsetZ); + GL11.glTranslatef(-this.ring2.rotationPointX * f5, -this.ring2.rotationPointY * f5, -this.ring2.rotationPointZ * f5); + this.ring2.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.ring3.offsetX, this.ring3.offsetY, this.ring3.offsetZ); + GL11.glTranslatef(this.ring3.rotationPointX * f5, this.ring3.rotationPointY * f5, this.ring3.rotationPointZ * f5); + GL11.glScaled(0.2D, 0.3D, 0.1D); + GL11.glTranslatef(-this.ring3.offsetX, -this.ring3.offsetY, -this.ring3.offsetZ); + GL11.glTranslatef(-this.ring3.rotationPointX * f5, -this.ring3.rotationPointY * f5, -this.ring3.rotationPointZ * f5); + this.ring3.render(f5); + GL11.glPopMatrix(); + } + if ((int)f4 != -1){ + int gemColor = (int)f4; + int red = gemColor >> 16 & 0xff; + int green = gemColor >> 8 & 0xff; + int blue = gemColor & 0xff; + GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR); + GL11.glPushMatrix(); + GL11.glTranslatef(this.gem.offsetX, this.gem.offsetY, this.gem.offsetZ); + GL11.glTranslatef(this.gem.rotationPointX * f5, this.gem.rotationPointY * f5, this.gem.rotationPointZ * f5); + GL11.glScaled(0.1D, 0.1D, 0.1D); + GL11.glTranslatef(-this.gem.offsetX, -this.gem.offsetY, -this.gem.offsetZ); + GL11.glTranslatef(-this.gem.rotationPointX * f5, -this.gem.rotationPointY * f5, -this.gem.rotationPointZ * f5); + this.gem.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ); + GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5); + GL11.glScaled(0.1D, 0.05D, 0.1D); + GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ); + GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5); + this.gem1.render(f5); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ); + GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5); + GL11.glScaled(0.1D, 0.05D, 0.1D); + GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ); + GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5); + this.gem2.render(f5); + GL11.glPopMatrix(); + GL11.glDisable(GL11.GL_BLEND); + } + } + + /** + * 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/darkknight/jewelrycraft/potions/PotionList.java b/src/main/java/darkknight/jewelrycraft/potions/PotionList.java new file mode 100644 index 0000000..2ee508d --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/potions/PotionList.java @@ -0,0 +1,55 @@ +/** + * + */ +package darkknight.jewelrycraft.potions; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import net.minecraft.potion.Potion; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +/** + * @author Sorin + * + */ +public class PotionList +{ + public static Potion stun; + + public static void preInit(FMLPreInitializationEvent e) + { + Potion[] potionTypes = null; + + for (Field f : Potion.class.getDeclaredFields()) { + f.setAccessible(true); + try { + if (f.getName().equals("potionTypes") || f.getName().equals("field_76425_a")) { + Field modfield = Field.class.getDeclaredField("modifiers"); + modfield.setAccessible(true); + modfield.setInt(f, f.getModifiers() & ~Modifier.FINAL); + + potionTypes = (Potion[])f.get(null); + final Potion[] newPotionTypes = new Potion[256]; + System.arraycopy(potionTypes, 0, newPotionTypes, 0, potionTypes.length); + f.set(null, newPotionTypes); + } + } catch (Exception e1) { + System.err.println("Severe error, please report this to the mod author:"); + System.err.println(e1); + } + } + + } + + public static void init(FMLInitializationEvent e) + { + stun = new PotionStun(32, true, 0x000000); + } + + public static void postInit(FMLPostInitializationEvent e) + { + + } +} diff --git a/src/main/java/darkknight/jewelrycraft/potions/PotionStun.java b/src/main/java/darkknight/jewelrycraft/potions/PotionStun.java new file mode 100644 index 0000000..f01a467 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/potions/PotionStun.java @@ -0,0 +1,26 @@ +/** + * + */ +package darkknight.jewelrycraft.potions; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import darkknight.jewelrycraft.util.Variables; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; + +/** + * @author Sorin + */ +public class PotionStun extends Potion +{ + protected PotionStun(int id, boolean isBad, int color) + { + super(id, isBad, color); + this.setPotionName(Variables.MODID + ".potion.stun"); + } + + @SideOnly(Side.CLIENT) + public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc) { } +} diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java index b9a276b..6df0f07 100644 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java @@ -109,7 +109,7 @@ public class TileEntitySmelter extends TileEntity hasMetal = false; if (!isOre) moltenMetal = metal; else{ - moltenMetal = JewelrycraftUtil.getIngotFromOre(metal.getItem()); + moltenMetal = JewelrycraftUtil.getIngotFromOre(metal); moltenMetal.stackSize *= 2; } hasMoltenMetal = true; diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java index f54b175..6ff27db 100644 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java @@ -76,7 +76,7 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer Minecraft.getMinecraft().gameSettings.fancyGraphics = fancyGraphics; GL11.glPopMatrix(); } - if (me.hasJewelBase && me.jewelBase.getIconIndex() != null && me.jewelBase.getIconIndex().getIconName() != ""){ + if (me.hasJewelBase && me.jewelBase != null && me.jewelBase.getItem() != Item.getItemFromBlock(Blocks.air) && me.jewelBase.getIconIndex() != null && me.jewelBase.getIconIndex().getIconName() != ""){ GL11.glPushMatrix(); EntityItem entityitem = new EntityItem(te.getWorldObj(), 0.0D, 0.0D, 0.0D, me.jewelBase); entityitem.getEntityItem().stackSize = 1; diff --git a/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java b/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java index 430673c..4374c70 100644 --- a/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java +++ b/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java @@ -9,6 +9,8 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.FMLCommonHandler; @@ -25,7 +27,7 @@ public class JewelrycraftUtil public static ArrayList<ItemStack> jewelry = new ArrayList<ItemStack>(); public static ArrayList<ItemStack> metal = new ArrayList<ItemStack>(); public static ArrayList<ItemStack> ores = new ArrayList<ItemStack>(); - public static HashMap<Item, ItemStack> oreToIngot = new HashMap<Item, ItemStack>(); + public static HashMap<ItemStack, ItemStack> oreToIngot = new HashMap<ItemStack, ItemStack>(); public static ArrayList<String> jamcraftPlayers = new ArrayList<String>(); private static ArrayList<ItemStack> items = new ArrayList<ItemStack>(); public static Random rand = new Random(); @@ -135,15 +137,19 @@ public class JewelrycraftUtil Iterator<ItemStack> i = OreDictionary.getOres(OreDictionary.getOreNames()[index]).iterator(); while (i.hasNext()){ ItemStack nextStack = i.next(); - if ((nextStack.getItem().getUnlocalizedName().toLowerCase().contains("ingot") || nextStack.getItem().getUnlocalizedName().toLowerCase().contains("alloy")) && !nextStack.getItem().getUnlocalizedName().toLowerCase().contains("powder") && !nextStack.getItem().getUnlocalizedName().toLowerCase().contains("dust") && !nextStack.getItem().getUnlocalizedName().toLowerCase().contains("block") && !metal.contains(nextStack)){ + String stackName = nextStack.getItem().getUnlocalizedName().toLowerCase(); + if ((stackName.contains("ingot") || stackName.contains("alloy")) && !metal.contains(nextStack)) metal.add(nextStack); - if (OreDictionary.getOres(OreDictionary.getOreNames()[index].replace("ingot", "ore")) != null){ - ores.addAll(OreDictionary.getOres(OreDictionary.getOreNames()[index].replace("ingot", "ore"))); - Iterator<ItemStack> ores = OreDictionary.getOres(OreDictionary.getOreNames()[index].replace("ingot", "ore")).iterator(); - while (ores.hasNext()){ - ItemStack ore = ores.next(); - oreToIngot.put(ore.getItem(), nextStack); - } + if (nextStack.getItem().getUnlocalizedName().toLowerCase().contains("ore") && !ores.contains(nextStack)){ + ItemStack ingot = FurnaceRecipes.smelting().getSmeltingResult(nextStack); + if(ingot != null && (ingot.getItem().getUnlocalizedName().toLowerCase().contains("ingot") || ingot.getItem().getUnlocalizedName().toLowerCase().contains("alloy"))) + { + ores.add(nextStack); + oreToIngot.put(nextStack, ingot); + JewelrycraftMod.logger.info("Original: " + nextStack); + JewelrycraftMod.logger.info("Adding " + nextStack.getDisplayName() + " with damage value " + nextStack.getItemDamage() + " and with " + nextStack.stackSize + " in stack"); + JewelrycraftMod.logger.info("Original ingot: " + ingot); + JewelrycraftMod.logger.info("Adding ingot " + ingot.getDisplayName() + " with damage value " + ingot.getItemDamage() + " and with " + ingot.stackSize + " in stack\n"); } } } @@ -210,7 +216,7 @@ public class JewelrycraftUtil Iterator<ItemStack> i = ores.iterator(); while (i.hasNext()){ ItemStack temp = i.next(); - if (temp.getItem() == item.getItem() && temp.getItemDamage() == item.getItemDamage()) return true; + if (temp.getItem().equals(item.getItem()) && temp.getItemDamage() == item.getItemDamage()) return true; } return false; } @@ -221,8 +227,10 @@ public class JewelrycraftUtil * @param ore the ore * @return the ingot */ - public static ItemStack getIngotFromOre(Item ore) + public static ItemStack getIngotFromOre(ItemStack ore) { - return oreToIngot.get(ore); + for(ItemStack ores: JewelrycraftUtil.oreToIngot.keySet()) + if(ores.getItem().equals(ore.getItem()) && ores.getItemDamage() == ore.getItemDamage()) return oreToIngot.get(ores); + return null; } } diff --git a/src/main/java/darkknight/jewelrycraft/util/Variables.java b/src/main/java/darkknight/jewelrycraft/util/Variables.java index ca00e13..fd41064 100644 --- a/src/main/java/darkknight/jewelrycraft/util/Variables.java +++ b/src/main/java/darkknight/jewelrycraft/util/Variables.java @@ -6,7 +6,7 @@ public class Variables { public static final String MODID = "jewelrycraft2"; public static final String MODNAME = "Jewelrycraft 2"; - public static final String VERSION = "1.0.7"; + public static final String VERSION = "1.0.8"; public static final String PACKET_CHANNEL = "jewelrycraft2"; public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory"; diff --git a/src/main/resources/assets/jewelrycraft2/lang/en_US.lang b/src/main/resources/assets/jewelrycraft2/lang/en_US.lang index 4851fa5..76ec908 100644 --- a/src/main/resources/assets/jewelrycraft2/lang/en_US.lang +++ b/src/main/resources/assets/jewelrycraft2/lang/en_US.lang @@ -57,22 +57,22 @@ chatmessage.jewelrycraft2.molder.metaliscooling=Molten metal is cooling... chatmessage.jewelrycraft2.molder.moldisempty=Mold is currently empty. chatmessage.jewelrycraft2.molder.moldismissing=Molder does not contain a mold. chatmessage.jewelrycraft2.molder.hasmoltenmetal=You can't remove the mold. It contains molten metal! -chatmessage.jewelrycraft2.smelter.alreadyhasingot=The Smelter already contains a %s -chatmessage.jewelrycraft2.smelter.hasmolteningot=The Smelter contains a molten %s +chatmessage.jewelrycraft2.smelter.alreadyhasingot=The Smelter already contains %s +chatmessage.jewelrycraft2.smelter.hasmolteningot=The Smelter contains molten %s chatmessage.jewelrycraft2.smelter.itemneedstobeingot=The item needs to be an ingot! chatmessage.jewelrycraft2.smelter.itemrenamedtoingot=Nice try, but renaming it to an ingot doesn't make it an ingot :p You can't fool me player! chatmessage.jewelrycraft2.smelter.molderhasmoltenmetal=The Molder already has molten metal in it! chatmessage.jewelrycraft2.smelter.molderhasnomold=The Molder doesn't have a mold in it! You might as well pour this stuff on the ground, eh? chatmessage.jewelrycraft2.smelter.modlerhasitem=The Molder contains an item in it. Now you wouldn't want it to be destroyed, would you? chatmessage.jewelrycraft2.smelter.molderismissing=You need a Molder in front of this block in order to pour the molten metal! -chatmessage.jewelrycraft2.smelter.nowsmeltingingot=Smelter is now smelting a %s. +chatmessage.jewelrycraft2.smelter.nowsmeltingingot=Smelter is now smelting a(n) %s. chatmessage.jewelrycraft2.smelter.metalismelting=%s is being melted. chatmessage.jewelrycraft2.smelter.empty=The Smelter is empty. chatmessage.jewelrycraft2.table.hasenditem=First take out the crafted jewel before inserting new stuff. chatmessage.jewelrycraft2.table.missinggem=You need a gem. chatmessage.jewelrycraft2.table.missingjewelry=You're missing a piece of jewelry. chatmessage.jewelrycraft2.table.iscrafting=The %s is being modified. -chatmessage.jewelrycraft2.table.jewelrymodifiedfull=This piece of jewelry is already modified at maxium. You can't modify it anymore! +chatmessage.jewelrycraft2.table.jewelrymodifiedfull=This piece of jewelry is already modified at maximum. You can't modify it anymore! chatmessage.jewelrycraft2.table.jewelrycontainsmodifier=The piece of jewelry already contains a modifier. chatmessage.jewelrycraft2.table.jewelrycontainsjewel=The piece of jewelry already contains a jewel. @@ -81,4 +81,6 @@ death.attack.shadows=%1$s was consumed by the shadows death.attack.blackHeart=%1$s was killed by %2$s's curse entity.jewelrycraft2.Heart.name=Heart -entity.jewelrycraft2.Half-Heart.name=Half-Heart
\ No newline at end of file +entity.jewelrycraft2.Half-Heart.name=Half-Heart + +jewelrycraft2.potion.stun=Stun
\ No newline at end of file diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png b/src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png Binary files differindex 0daa053..0ebdf14 100644 --- a/src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png +++ b/src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/Necklace.png b/src/main/resources/assets/jewelrycraft2/textures/entities/Necklace.png Binary files differnew file mode 100644 index 0000000..fae7bcf --- /dev/null +++ b/src/main/resources/assets/jewelrycraft2/textures/entities/Necklace.png diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/Ring.png b/src/main/resources/assets/jewelrycraft2/textures/entities/Ring.png Binary files differnew file mode 100644 index 0000000..48233a7 --- /dev/null +++ b/src/main/resources/assets/jewelrycraft2/textures/entities/Ring.png diff --git a/src/main/resources/assets/jewelrycraft2/textures/gui/potions.png b/src/main/resources/assets/jewelrycraft2/textures/gui/potions.png Binary files differnew file mode 100644 index 0000000..21a4b11 --- /dev/null +++ b/src/main/resources/assets/jewelrycraft2/textures/gui/potions.png diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/blockMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/unused/blockMold.png Binary files differindex e1c2d7b..e1c2d7b 100644 --- a/src/main/resources/assets/jewelrycraft2/textures/items/blockMold.png +++ b/src/main/resources/assets/jewelrycraft2/textures/items/unused/blockMold.png diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/clayBlockMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/unused/clayBlockMold.png Binary files differindex 0dd9029..0dd9029 100644 --- a/src/main/resources/assets/jewelrycraft2/textures/items/clayBlockMold.png +++ b/src/main/resources/assets/jewelrycraft2/textures/items/unused/clayBlockMold.png diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 3d97a82..c681f70 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -4,7 +4,7 @@ "modid": "jewelrycraft2", "name": "Jewelrycraft 2", "description": "Jewelrycraft 2 is a mod about creating jewellery and imbuing them with mystical powers. However, they have both positives and negatives. There are also curses, some good, some bad. Maybe acquiring some wouldn't be that bad.", - "version": "1.0.7", + "version": "1.0.8", "mcversion": "1.7.10", "url": "http://www.minecraftforum.net/forums/topic/2414865", "updateUrl": "", |
