summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-04-12 16:29:24 +0300
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-04-12 16:29:24 +0300
commit4f29b0ed24e393be7074abd851e207aadab38196 (patch)
treebe8e5211a2956589c08b5e88b5e083e6aaeb96ce /src
parent6312636fd9a4d0f56dc7c9ff474a99d879bcb4e9 (diff)
I rearranged files and added a few cool stuff.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java27
-rw-r--r--src/main/java/darkknight/jewelrycraft/block/BlockDisplayer.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java11
-rw-r--r--src/main/java/darkknight/jewelrycraft/block/BlockList.java39
-rw-r--r--src/main/java/darkknight/jewelrycraft/block/BlockMolder.java13
-rw-r--r--src/main/java/darkknight/jewelrycraft/block/BlockMoltenMetal.java7
-rw-r--r--src/main/java/darkknight/jewelrycraft/block/BlockShadowEye.java9
-rw-r--r--src/main/java/darkknight/jewelrycraft/block/BlockSmelter.java21
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java (renamed from src/main/java/darkknight/jewelrycraft/container/JewelryInventory.java)7
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/Page.java (renamed from src/main/java/darkknight/jewelrycraft/container/Page.java)7
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java (renamed from src/main/java/darkknight/jewelrycraft/client/GuiGuide.java)10
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java (renamed from src/main/java/darkknight/jewelrycraft/container/GuiHandler.java)25
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelry.java (renamed from src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java)8
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelryModifier.java204
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiRectangle.java (renamed from src/main/java/darkknight/jewelrycraft/container/GuiRectangle.java)3
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiRingChest.java (renamed from src/main/java/darkknight/jewelrycraft/client/GuiRingChest.java)4
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiTab.java (renamed from src/main/java/darkknight/jewelrycraft/container/GuiTab.java)3
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java (renamed from src/main/java/darkknight/jewelrycraft/container/GuiTabBlocks.java)19
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java (renamed from src/main/java/darkknight/jewelrycraft/container/GuiTabGemsAndIngots.java)3
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java (renamed from src/main/java/darkknight/jewelrycraft/container/GuiTabIntroduction.java)4
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java (renamed from src/main/java/darkknight/jewelrycraft/container/GuiTabItems.java)4
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiTabModifiers.java (renamed from src/main/java/darkknight/jewelrycraft/container/GuiTabModifiers.java)4
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiTabRitual.java (renamed from src/main/java/darkknight/jewelrycraft/container/GuiTabRitual.java)4
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerGuide.java (renamed from src/main/java/darkknight/jewelrycraft/container/ContainerGuide.java)2
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryModifier.java50
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryTab.java (renamed from src/main/java/darkknight/jewelrycraft/container/ContainerJewelryTab.java)6
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerRingChest.java (renamed from src/main/java/darkknight/jewelrycraft/container/ContainerRingChest.java)3
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotBracelet.java (renamed from src/main/java/darkknight/jewelrycraft/container/SlotBracelet.java)2
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java (renamed from src/main/java/darkknight/jewelrycraft/container/SlotEarrings.java)2
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java (renamed from src/main/java/darkknight/jewelrycraft/container/SlotNecklace.java)2
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java (renamed from src/main/java/darkknight/jewelrycraft/container/SlotRing.java)2
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRingChest.java (renamed from src/main/java/darkknight/jewelrycraft/container/SlotRingChest.java)2
-rw-r--r--src/main/java/darkknight/jewelrycraft/commands/JewelrycraftCommands.java35
-rw-r--r--src/main/java/darkknight/jewelrycraft/config/ConfigHandler.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/curses/CurseInfamy.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/curses/CurseList.java12
-rw-r--r--src/main/java/darkknight/jewelrycraft/effects/EffectBlazePowder.java71
-rw-r--r--src/main/java/darkknight/jewelrycraft/effects/EffectEnderEye.java38
-rw-r--r--src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java46
-rw-r--r--src/main/java/darkknight/jewelrycraft/entities/EntityHalfHeart.java7
-rw-r--r--src/main/java/darkknight/jewelrycraft/entities/EntityHeart.java7
-rw-r--r--src/main/java/darkknight/jewelrycraft/entities/renders/HeartRender.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java32
-rw-r--r--src/main/java/darkknight/jewelrycraft/events/KeyBindings.java5
-rw-r--r--src/main/java/darkknight/jewelrycraft/events/PlayerRenderHandler.java97
-rw-r--r--src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java32
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemBracelet.java5
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemClayMolds.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemCrystal.java5
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemEarrings.java5
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemGuide.java10
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemJewelryModifier.java23
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemList.java28
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemMolds.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemNecklace.java5
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemRing.java5
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/ItemThiefGloves.java4
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/render/BraceletRender.java29
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/render/EarringsRender.java29
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/render/ItemRender.java (renamed from src/main/java/darkknight/jewelrycraft/tileentity/renders/ItemRender.java)2
-rw-r--r--src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java (renamed from src/main/java/darkknight/jewelrycraft/tileentity/renders/MaskRender.java)5
-rw-r--r--src/main/java/darkknight/jewelrycraft/lib/Reference.java9
-rw-r--r--src/main/java/darkknight/jewelrycraft/model/ModelBracelet.java184
-rw-r--r--src/main/java/darkknight/jewelrycraft/model/ModelEarrings.java120
-rw-r--r--src/main/java/darkknight/jewelrycraft/network/PacketRequestPlayerInfo.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/network/PacketRequestSetSlot.java64
-rw-r--r--src/main/java/darkknight/jewelrycraft/network/PacketSendCurseStats.java4
-rw-r--r--src/main/java/darkknight/jewelrycraft/proxy/ClientProxy.java (renamed from src/main/java/darkknight/jewelrycraft/client/ClientProxy.java)17
-rw-r--r--src/main/java/darkknight/jewelrycraft/proxy/CommonProxy.java (renamed from src/main/java/darkknight/jewelrycraft/CommonProxy.java)2
-rw-r--r--src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java40
-rw-r--r--src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityDisplayerRender.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityJewelrsCraftingTableRender.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntitySmelterRender.java3
-rw-r--r--src/main/java/darkknight/jewelrycraft/util/JewelryNBT.java20
-rw-r--r--src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java4
-rw-r--r--src/main/java/darkknight/jewelrycraft/util/Variables.java10
-rw-r--r--src/main/resources/assets/jewelrycraft/lang/en_US.lang79
-rw-r--r--src/main/resources/assets/jewelrycraft/textures/gui/curses.pngbin2516 -> 0 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft/textures/gui/hearts.pngbin2362 -> 0 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/Changelog.txt (renamed from src/main/resources/assets/jewelrycraft/Changelog.txt)0
-rw-r--r--src/main/resources/assets/jewelrycraft2/lang/en_US.lang83
-rw-r--r--src/main/resources/assets/jewelrycraft2/pack.mcmeta (renamed from src/main/resources/assets/jewelrycraft/pack.mcmeta)0
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/altar_bottom.png)bin391 -> 391 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/altar_side.png)bin3220 -> 3220 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/altar_top.png)bin3125 -> 3125 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow0.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow0.png)bin177 -> 177 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow1.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow1.png)bin315 -> 315 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow10.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow10.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow11.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow11.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow12.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow12.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow13.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow13.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow14.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow14.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow15.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow15.png)bin288 -> 288 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow2.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow2.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow3.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow3.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow4.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow4.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow5.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow5.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow6.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow6.png)bin312 -> 312 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow7.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow7.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow8.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow8.png)bin315 -> 315 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow9.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow9.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/displayer.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/displayer.png)bin3800 -> 3800 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/jewelrsCraftingTable.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/jewelrsCraftingTable.png)bin2064 -> 2064 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/molder.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/molder.png)bin1060 -> 1060 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png)bin10676 -> 10676 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png.mcmeta (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png.mcmeta)0
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png)bin9922 -> 9922 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png.mcmeta (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png.mcmeta)0
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/oreShadow.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/oreShadow.png)bin462 -> 462 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/smelter.png (renamed from src/main/resources/assets/jewelrycraft/textures/blocks/smelter.png)bin537 -> 537 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/entities/BlackHeart.png (renamed from src/main/resources/assets/jewelrycraft/textures/entities/BlackHeart.png)bin2259 -> 2259 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/entities/BlueHeart.png (renamed from src/main/resources/assets/jewelrycraft/textures/entities/BlueHeart.png)bin2313 -> 2313 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/entities/Bracelet.pngbin0 -> 580 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/entities/Earrings.pngbin0 -> 212 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png (renamed from src/main/resources/assets/jewelrycraft/textures/entities/Mask.png)bin331 -> 331 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/entities/RedHeart.png (renamed from src/main/resources/assets/jewelrycraft/textures/entities/RedHeart.png)bin2405 -> 2405 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/entities/WhiteHeart.png (renamed from src/main/resources/assets/jewelrycraft/textures/entities/WhiteHeart.png)bin2297 -> 2297 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/entities/jeweler.png (renamed from src/main/resources/assets/jewelrycraft/textures/entities/jeweler.png)bin1265 -> 1265 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/gui/chest_ring.png (renamed from src/main/resources/assets/jewelrycraft/textures/gui/chest_ring.png)bin1993 -> 1993 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/gui/curses.pngbin0 -> 3898 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/gui/guidePage.png (renamed from src/main/resources/assets/jewelrycraft/textures/gui/guidePage.png)bin36869 -> 36869 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/gui/guidePageFlip.png (renamed from src/main/resources/assets/jewelrycraft/textures/gui/guidePageFlip.png)bin34450 -> 34450 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/gui/hearts.pngbin0 -> 18141 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_modifier.pngbin0 -> 1936 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_tab.png (renamed from src/main/resources/assets/jewelrycraft/textures/gui/jewelry_tab.png)bin2330 -> 2330 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/blockMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/blockMold.png)bin1328 -> 1328 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/bracelet.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/bracelet.png)bin314 -> 314 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/braceletMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/braceletMold.png)bin1369 -> 1369 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/bucketOverlay.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/bucketOverlay.png)bin293 -> 293 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/clayBlockMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/clayBlockMold.png)bin464 -> 464 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/clayBraceletMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/clayBraceletMold.png)bin545 -> 545 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/clayEarringsMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/clayEarringsMold.png)bin624 -> 624 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/clayIngotMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/clayIngotMold.png)bin493 -> 493 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/clayNecklaceMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/clayNecklaceMold.png)bin584 -> 584 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/clayRingMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/clayRingMold.png)bin606 -> 606 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/crystal.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/crystal.png)bin285 -> 285 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/crystalOverlay.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/crystalOverlay.png)bin274 -> 274 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/earrings.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/earrings.png)bin273 -> 273 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/earringsMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/earringsMold.png)bin1401 -> 1401 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/guide.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/guide.png)bin316 -> 316 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/ingot3.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/ingot3.png)bin315 -> 315 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/ingot4.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/ingot4.png)bin308 -> 308 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/ingot6.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/ingot6.png)bin314 -> 314 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/ingot7.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/ingot7.png)bin307 -> 307 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/ingotMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/ingotMold.png)bin500 -> 500 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/ingotShadow.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/ingotShadow.png)bin467 -> 467 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/jewelBracelet.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/jewelBracelet.png)bin245 -> 245 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/jewelEarrings.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/jewelEarrings.png)bin227 -> 227 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/jewelNecklace.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/jewelNecklace.png)bin241 -> 241 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/jewelRing.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/jewelRing.png)bin244 -> 244 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/jewelryModifier.pngbin0 -> 413 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png)bin9922 -> 9922 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png.mcmeta (renamed from src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png.mcmeta)0
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/necklace.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/necklace.png)bin284 -> 284 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/necklaceMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/necklaceMold.png)bin551 -> 551 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/ring.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/ring.png)bin272 -> 272 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/ringMold.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/ringMold.png)bin580 -> 580 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/test/ingot2.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/test/ingot2.png)bin313 -> 313 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/test/ingot5.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/test/ingot5.png)bin301 -> 301 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/items/thiefGloves.png (renamed from src/main/resources/assets/jewelrycraft/textures/items/thiefGloves.png)bin290 -> 290 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/particle/shadows.png (renamed from src/main/resources/assets/jewelrycraft/textures/particle/shadows.png)bin307 -> 307 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/tileentities/BricksPedestal.png (renamed from src/main/resources/assets/jewelrycraft/textures/tileentities/BricksPedestal.png)bin616 -> 616 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/tileentities/Displayer.png (renamed from src/main/resources/assets/jewelrycraft/textures/tileentities/Displayer.png)bin1232 -> 1232 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/tileentities/JewelrsCraftingBench.png (renamed from src/main/resources/assets/jewelrycraft/textures/tileentities/JewelrsCraftingBench.png)bin2005 -> 2005 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/tileentities/Molder.png (renamed from src/main/resources/assets/jewelrycraft/textures/tileentities/Molder.png)bin1020 -> 1020 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye1.png (renamed from src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye1.png)bin1437 -> 1437 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye2.png (renamed from src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye2.png)bin1437 -> 1437 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye3.png (renamed from src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye3.png)bin1446 -> 1446 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye4.png (renamed from src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye4.png)bin1464 -> 1464 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowHand.png (renamed from src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowHand.png)bin1523 -> 1523 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/tileentities/Smelter.png (renamed from src/main/resources/assets/jewelrycraft/textures/tileentities/Smelter.png)bin886 -> 886 bytes
175 files changed, 1253 insertions, 469 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java b/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java
index fd7058f..5bb50a7 100644
--- a/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java
+++ b/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java
@@ -35,9 +35,9 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.VillagerRegistry;
import cpw.mods.fml.relauncher.Side;
import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
import darkknight.jewelrycraft.commands.JewelrycraftCommands;
import darkknight.jewelrycraft.config.ConfigHandler;
-import darkknight.jewelrycraft.container.GuiHandler;
import darkknight.jewelrycraft.curses.CurseList;
import darkknight.jewelrycraft.damage.DamageSourceList;
import darkknight.jewelrycraft.effects.EffectsList;
@@ -47,31 +47,33 @@ import darkknight.jewelrycraft.events.BucketHandler;
import darkknight.jewelrycraft.events.EntityEventHandler;
import darkknight.jewelrycraft.events.KeyBindings;
import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.lib.Reference;
import darkknight.jewelrycraft.network.PacketClearColorCache;
import darkknight.jewelrycraft.network.PacketKeyPressEvent;
import darkknight.jewelrycraft.network.PacketRequestLiquidData;
import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
import darkknight.jewelrycraft.network.PacketSendCurseStats;
import darkknight.jewelrycraft.network.PacketSendLiquidData;
import darkknight.jewelrycraft.network.PacketSendPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
import darkknight.jewelrycraft.recipes.CraftingRecipes;
import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
import darkknight.jewelrycraft.worldGen.Generation;
import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
import darkknight.jewelrycraft.worldGen.village.JCTrades;
import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
-@Mod (modid = Reference.MODID, name = Reference.MODNAME, version = Reference.VERSION)
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION)
public class JewelrycraftMod
{
- @Instance (Reference.MODID)
+ @Instance (Variables.MODID)
public static JewelrycraftMod instance;
- @SidedProxy (clientSide = "darkknight.jewelrycraft.client.ClientProxy", serverSide = "darkknight.jewelrycraft.CommonProxy")
+ @SidedProxy (clientSide = "darkknight.jewelrycraft.proxy.ClientProxy", serverSide = "darkknight.jewelrycraft.proxy.CommonProxy")
public static CommonProxy proxy;
public static final Logger logger = Logger.getLogger("Jewelrycraft");
public static File dir;
- public static CreativeTabs jewelrycraft = new CreativeTabs("JewelryCraft"){
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
@Override
public Item getTabIconItem()
{
@@ -84,7 +86,6 @@ public class JewelrycraftMod
public static File liquidsConf;
public static SimpleNetworkWrapper netWrapper;
public static boolean fancyRender;
- public static final int MAX_CURSES = 10;
/**
* Pre initialization of mod stuff.
@@ -106,7 +107,7 @@ public class JewelrycraftMod
VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
try{
- MapGenStructureIO.func_143031_a(ComponentJewelry.class, "Jewelrycraft:Jewelry");
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
}
catch(Throwable e2){
logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
@@ -118,13 +119,13 @@ public class JewelrycraftMod
ModMetadata metadata = e.getModMetadata();
List<String> authorList = new ArrayList<String>();
- authorList.add("DarkKnight (or sor1n)");
+ authorList.add("OnyxDarkKnight");
authorList.add("bspkrs");
authorList.add("domi1819");
dir = e.getModConfigurationDirectory();
proxy.preInit();
- netWrapper = NetworkRegistry.INSTANCE.newSimpleChannel(Reference.MODID);
+ netWrapper = NetworkRegistry.INSTANCE.newSimpleChannel(Variables.MODID);
netWrapper.registerMessage(PacketRequestLiquidData.class, PacketRequestLiquidData.class, 0, Side.SERVER);
netWrapper.registerMessage(PacketSendLiquidData.class, PacketSendLiquidData.class, 1, Side.CLIENT);
netWrapper.registerMessage(PacketClearColorCache.class, PacketClearColorCache.class, 2, Side.CLIENT);
@@ -132,12 +133,14 @@ public class JewelrycraftMod
netWrapper.registerMessage(PacketRequestPlayerInfo.class, PacketRequestPlayerInfo.class, 4, Side.SERVER);
netWrapper.registerMessage(PacketSendPlayerInfo.class, PacketSendPlayerInfo.class, 5, Side.CLIENT);
netWrapper.registerMessage(PacketSendCurseStats.class, PacketSendCurseStats.class, 6, Side.CLIENT);
+ netWrapper.registerMessage(PacketRequestSetSlot.class, PacketRequestSetSlot.class, 7, Side.SERVER);
+
metadata.autogenerated = false;
metadata.authorList = authorList;
metadata.url = "https://github.com/sor1n/Jewelrycraft";
- createEntity(EntityHeart.class, "Heart", 0x000000, 0xFF0000, true);
- createEntity(EntityHalfHeart.class, "Half-Heart", 0x000000, 0xFF0000, true);
+ createEntity(EntityHeart.class, Variables.MODID + ".Heart", 0xFF0000, 0xFF0000, false);
+ createEntity(EntityHalfHeart.class, Variables.MODID + ".Half-Heart", 0x000000, 0xFF0000, false);
// EntityRegistry.addSpawn(EntityMob.class, 5, 2, 3, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.coldBeach, BiomeGenBase.frozenRiver);
}
diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockDisplayer.java b/src/main/java/darkknight/jewelrycraft/block/BlockDisplayer.java
index 50c7c13..8d11806 100644
--- a/src/main/java/darkknight/jewelrycraft/block/BlockDisplayer.java
+++ b/src/main/java/darkknight/jewelrycraft/block/BlockDisplayer.java
@@ -15,6 +15,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.util.Variables;
public class BlockDisplayer extends BlockContainer
{
@@ -239,6 +240,6 @@ public class BlockDisplayer extends BlockContainer
@Override
public void registerBlockIcons(IIconRegister icon)
{
- blockIcon = icon.registerIcon("jewelrycraft:displayer");
+ blockIcon = icon.registerIcon(Variables.MODID + ":displayer");
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java b/src/main/java/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java
index fae445e..fe245e6 100644
--- a/src/main/java/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java
+++ b/src/main/java/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java
@@ -19,6 +19,7 @@ import net.minecraft.world.World;
import darkknight.jewelrycraft.config.ConfigHandler;
import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
public class BlockJewelrsCraftingTable extends BlockContainer
{
@@ -71,7 +72,7 @@ public class BlockJewelrsCraftingTable extends BlockContainer
TileEntityJewelrsCraftingTable te = (TileEntityJewelrsCraftingTable)world.getTileEntity(i, j, k);
ItemStack item = entityPlayer.inventory.getCurrentItem();
if (te != null && !world.isRemote){
- if (te.hasEndItem && item != null) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.table.hasenditem")));
+ if (te.hasEndItem && item != null) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".table.hasenditem")));
if (!te.hasEndItem && !te.hasJewelry && item != null && JewelrycraftUtil.isJewelry(item)){
te.jewelry = item.copy();
te.hasJewelry = true;
@@ -182,9 +183,9 @@ public class BlockJewelrsCraftingTable extends BlockContainer
te.endItem = new ItemStack(Item.getItemById(0), 0, 0);
te.hasEndItem = false;
te.isDirty = true;
- }else if (te.hasJewelry && te.hasGem && te.carving > 0 && te.jewelry != null) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage.Jewelrycraft.table.iscrafting", te.jewelry.getDisplayName()) + " (" + (ConfigHandler.jewelryCraftingTime - te.carving) * 100 / ConfigHandler.jewelryCraftingTime + "%)"));
- else if (!te.hasGem) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.table.missinggem")));
- else if (!te.hasJewelry) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.table.missingjewelry")));
+ }else if (te.hasJewelry && te.hasGem && te.carving > 0 && te.jewelry != null) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage." + Variables.MODID + ".table.iscrafting", te.jewelry.getDisplayName()) + " (" + (ConfigHandler.jewelryCraftingTime - te.carving) * 100 / ConfigHandler.jewelryCraftingTime + "%)"));
+ else if (!te.hasGem) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".table.missinggem")));
+ else if (!te.hasJewelry) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".table.missingjewelry")));
}
/**
@@ -225,6 +226,6 @@ public class BlockJewelrsCraftingTable extends BlockContainer
@Override
public void registerBlockIcons(IIconRegister icon)
{
- blockIcon = icon.registerIcon("jewelrycraft:jewelrsCraftingTable");
+ blockIcon = icon.registerIcon(Variables.MODID + ":jewelrsCraftingTable");
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockList.java b/src/main/java/darkknight/jewelrycraft/block/BlockList.java
index 80a984c..7fae41c 100644
--- a/src/main/java/darkknight/jewelrycraft/block/BlockList.java
+++ b/src/main/java/darkknight/jewelrycraft/block/BlockList.java
@@ -16,6 +16,7 @@ import darkknight.jewelrycraft.tileentity.TileEntityMolder;
import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
+import darkknight.jewelrycraft.util.Variables;
public class BlockList
{
@@ -30,16 +31,16 @@ public class BlockList
public static void preInit(FMLPreInitializationEvent e)
{
if (!isInitialized){
- shadowOre = new BlockJCOre().setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockTextureName("jewelrycraft:oreShadow").setBlockName("Jewelrycraft.oreShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- smelter = new BlockSmelter().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName("Jewelrycraft.smelter").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molder = new BlockMolder(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName("Jewelrycraft.molder").setCreativeTab(JewelrycraftMod.jewelrycraft);
- displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName("Jewelrycraft.displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName("Jewelrycraft.jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("jewelrycraft:blockShadow").setBlockName("Jewelrycraft.blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("jewelrycraft:altar").setBlockName("Jewelrycraft.altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName("Jewelrycraft.shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
- handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName("Jewelrycraft.handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName("Jewelrycraft.shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
+ shadowOre = new BlockJCOre().setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockTextureName(Variables.MODID + ":oreShadow").setBlockName(Variables.MODID + ".oreShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ smelter = new BlockSmelter().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".smelter").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ molder = new BlockMolder(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".molder").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":blockShadow").setBlockName(Variables.MODID + ".blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":altar").setBlockName(Variables.MODID + ".altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
GameRegistry.registerBlock(shadowOre, "shadowOre");
GameRegistry.registerBlock(shadowBlock, "shadowBlock");
GameRegistry.registerBlock(smelter, "Smelter");
@@ -50,15 +51,15 @@ public class BlockList
GameRegistry.registerBlock(shadowEye, "Shadow Eye");
GameRegistry.registerBlock(handPedestal, "Stone Bricks Pedestal");
GameRegistry.registerBlock(shadowHand, "Shadow Hand");
- GameRegistry.registerTileEntity(TileEntitySmelter.class, "jewelrycraft:smelter");
- GameRegistry.registerTileEntity(TileEntityMolder.class, "jewelrycraft:molder");
- GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, "jewelrycraft:table");
- GameRegistry.registerTileEntity(TileEntityDisplayer.class, "jewelrycraft:displayer");
- GameRegistry.registerTileEntity(TileEntityBlockShadow.class, "jewelrycraft:blockShadow");
- GameRegistry.registerTileEntity(TileEntityAltar.class, "jewelrycraft:altar");
- GameRegistry.registerTileEntity(TileEntityShadowEye.class, "jewelrycraft:shadowEye");
- GameRegistry.registerTileEntity(TileEntityHandPedestal.class, "jewelrycraft:handPedestal");
- GameRegistry.registerTileEntity(TileEntityShadowHand.class, "jewelrycraft:shadowHand");
+ GameRegistry.registerTileEntity(TileEntitySmelter.class, Variables.MODID + ":smelter");
+ GameRegistry.registerTileEntity(TileEntityMolder.class, Variables.MODID + ":molder");
+ GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, Variables.MODID + ":table");
+ GameRegistry.registerTileEntity(TileEntityDisplayer.class, Variables.MODID + ":displayer");
+ GameRegistry.registerTileEntity(TileEntityBlockShadow.class, Variables.MODID + ":blockShadow");
+ GameRegistry.registerTileEntity(TileEntityAltar.class, Variables.MODID + ":altar");
+ GameRegistry.registerTileEntity(TileEntityShadowEye.class, Variables.MODID + ":shadowEye");
+ GameRegistry.registerTileEntity(TileEntityHandPedestal.class, Variables.MODID + ":handPedestal");
+ GameRegistry.registerTileEntity(TileEntityShadowHand.class, Variables.MODID + ":shadowHand");
moltenMetalFluid = new Fluid("metal.molten").setLuminosity(15).setDensity(3000).setTemperature(2000).setViscosity(6000);
if (!FluidRegistry.registerFluid(moltenMetalFluid)) moltenMetalFluid = FluidRegistry.getFluid("metal.molten");
moltenMetal = new BlockMoltenMetal(moltenMetalFluid, Material.lava);
diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockMolder.java b/src/main/java/darkknight/jewelrycraft/block/BlockMolder.java
index ce5e58b..5840c72 100644
--- a/src/main/java/darkknight/jewelrycraft/block/BlockMolder.java
+++ b/src/main/java/darkknight/jewelrycraft/block/BlockMolder.java
@@ -19,6 +19,7 @@ import net.minecraft.world.World;
import darkknight.jewelrycraft.config.ConfigHandler;
import darkknight.jewelrycraft.item.ItemList;
import darkknight.jewelrycraft.tileentity.TileEntityMolder;
+import darkknight.jewelrycraft.util.Variables;
public class BlockMolder extends BlockContainer
{
@@ -75,7 +76,7 @@ public class BlockMolder extends BlockContainer
te.mold = item.copy();
te.hasMold = true;
if (!entityPlayer.capabilities.isCreativeMode) --item.stackSize;
- entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage.Jewelrycraft.molder.addedmold", te.mold.getDisplayName())));
+ entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage." + Variables.MODID + ".molder.addedmold", te.mold.getDisplayName())));
te.isDirty = true;
}
if (te.hasMold && entityPlayer.isSneaking() && !te.hasMoltenMetal){
@@ -83,7 +84,7 @@ public class BlockMolder extends BlockContainer
te.mold = new ItemStack(Item.getItemById(0), 0, 0);
te.hasMold = false;
te.isDirty = true;
- }else if (te.hasMoltenMetal) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.molder.hasmoltenmetal")));
+ }else if (te.hasMoltenMetal) entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".molder.hasmoltenmetal")));
}
return true;
}
@@ -155,9 +156,9 @@ public class BlockMolder extends BlockContainer
dropItem(me.getWorldObj(), me.xCoord, me.yCoord, me.zCoord, me.jewelBase.copy());
me.jewelBase = new ItemStack(Item.getItemById(0), 0, 0);
me.hasJewelBase = false;
- }else if (me.hasMoltenMetal && me.cooling >= 0) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.molder.metaliscooling") + " (" + (ConfigHandler.ingotCoolingTime - me.cooling) * 100 / ConfigHandler.ingotCoolingTime + "%)"));
- else if (me.mold.getItem() == ItemList.molds && !me.hasMoltenMetal) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.molder.moldisempty")));
- else if (me.mold.getItem() != ItemList.molds) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.molder.moldismissing")));
+ }else if (me.hasMoltenMetal && me.cooling >= 0) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".molder.metaliscooling") + " (" + (ConfigHandler.ingotCoolingTime - me.cooling) * 100 / ConfigHandler.ingotCoolingTime + "%)"));
+ else if (me.mold.getItem() == ItemList.molds && !me.hasMoltenMetal) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".molder.moldisempty")));
+ else if (me.mold.getItem() != ItemList.molds) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".molder.moldismissing")));
me.isDirty = true;
}
}
@@ -200,6 +201,6 @@ public class BlockMolder extends BlockContainer
@Override
public void registerBlockIcons(IIconRegister icon)
{
- blockIcon = icon.registerIcon("jewelrycraft:molder");
+ blockIcon = icon.registerIcon(Variables.MODID + ":molder");
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockMoltenMetal.java b/src/main/java/darkknight/jewelrycraft/block/BlockMoltenMetal.java
index ee67aff..017c459 100644
--- a/src/main/java/darkknight/jewelrycraft/block/BlockMoltenMetal.java
+++ b/src/main/java/darkknight/jewelrycraft/block/BlockMoltenMetal.java
@@ -18,6 +18,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import darkknight.jewelrycraft.JewelrycraftMod;
import darkknight.jewelrycraft.network.PacketRequestLiquidData;
import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.util.Variables;
public class BlockMoltenMetal extends BlockFluidClassic
{
@@ -33,7 +34,7 @@ public class BlockMoltenMetal extends BlockFluidClassic
public BlockMoltenMetal(Fluid fluid, Material material)
{
super(fluid, material);
- setBlockName("Jewelrycraft.moltenMetal");
+ setBlockName(Variables.MODID + ".moltenMetal");
setQuantaPerBlock(5);
setRenderPass(1);
setLightLevel(15f);
@@ -57,8 +58,8 @@ public class BlockMoltenMetal extends BlockFluidClassic
@SideOnly (Side.CLIENT)
public void registerBlockIcons(IIconRegister register)
{
- stillIcon = register.registerIcon("jewelrycraft:moltenMetalStill");
- flowingIcon = register.registerIcon("jewelrycraft:moltenMetalFlow");
+ stillIcon = register.registerIcon(Variables.MODID + ":moltenMetalStill");
+ flowingIcon = register.registerIcon(Variables.MODID + ":moltenMetalFlow");
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockShadowEye.java b/src/main/java/darkknight/jewelrycraft/block/BlockShadowEye.java
index 1db2099..53688ce 100644
--- a/src/main/java/darkknight/jewelrycraft/block/BlockShadowEye.java
+++ b/src/main/java/darkknight/jewelrycraft/block/BlockShadowEye.java
@@ -17,9 +17,6 @@ public class BlockShadowEye extends BlockContainer
{
Random rand = new Random();
- /**
- *
- */
protected BlockShadowEye()
{
super(Material.rock);
@@ -93,7 +90,11 @@ public class BlockShadowEye extends BlockContainer
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9)
{
TileEntityShadowEye tile = (TileEntityShadowEye)world.getTileEntity(i, j, k);
- tile.active = true;
+ if (!tile.active && tile.opening == 1){
+ tile.active = true;
+ tile.target = entityPlayer;
+ tile.shouldAddData = true;
+ }
return true;
}
diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockSmelter.java b/src/main/java/darkknight/jewelrycraft/block/BlockSmelter.java
index 6d51a52..aa41003 100644
--- a/src/main/java/darkknight/jewelrycraft/block/BlockSmelter.java
+++ b/src/main/java/darkknight/jewelrycraft/block/BlockSmelter.java
@@ -28,6 +28,7 @@ import darkknight.jewelrycraft.tileentity.TileEntityMolder;
import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
import darkknight.jewelrycraft.util.JewelryNBT;
import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
public class BlockSmelter extends BlockContainer
{
@@ -150,7 +151,7 @@ public class BlockSmelter extends BlockContainer
boolean check = isOre ? oreCoincidesWithMetal && te.quantity < 0.8f : itemCoincidesWithMoltenMetal;
boolean check2 = isOre ? oreCoincidesWithMetal : itemCoincidesWithMetal;
if (!te.hasMetal && !te.hasMoltenMetal || !te.hasMetal && te.hasMoltenMetal && check){
- entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage.Jewelrycraft.smelter.nowsmeltingingot", item.getDisplayName())));
+ entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage." + Variables.MODID + ".smelter.nowsmeltingingot", item.getDisplayName())));
te.metal = item.copy();
// if (Item.getIdFromItem(te.metal.getItem()) == Block.getIdFromBlock(Blocks.stained_glass) || Item.getIdFromItem(te.metal.getItem()) == Block.getIdFromBlock(Blocks.stained_hardened_clay) || Item.getIdFromItem(te.metal.getItem()) == Block.getIdFromBlock(Blocks.wool) || Item.getIdFromItem(te.metal.getItem()) == Block.getIdFromBlock(Blocks.carpet)) te.metal.setItemDamage(15 - te.metal.getItemDamage());
te.metal.stackSize = 1;
@@ -168,7 +169,7 @@ public class BlockSmelter extends BlockContainer
}
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.Jewelrycraft.smelter.itemrenamedtoingot")));
+ 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 && item.getItem() != null && item.getItem() instanceof ItemMoltenMetalBucket && !te.hasMoltenMetal && !te.hasMetal){
te.hasMoltenMetal = true;
@@ -181,7 +182,7 @@ public class BlockSmelter extends BlockContainer
--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.Jewelrycraft.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())));
world.setTileEntity(i, j, k, te);
}
return true;
@@ -200,12 +201,12 @@ public class BlockSmelter extends BlockContainer
te.pouring = true;
te.isDirty = true;
// System.out.println(Block.getBlockById(Item.getIdFromItem(te.moltenMetal.getItem())));
- }else if (te.hasMetal && te.melting > 0) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage.Jewelrycraft.smelter.metalismelting", te.metal.getDisplayName()) + " (" + (ConfigHandler.ingotMeltingTime * te.metal.stackSize - te.melting) * 100 / (ConfigHandler.ingotMeltingTime * te.metal.stackSize) + "%)"));
- else if (te.hasMoltenMetal && !isConnectedToMolder(world, i, j, k)) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.smelter.molderismissing")));
- else if (!me.hasMold && te.hasMoltenMetal) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.smelter.molderhasnomold")));
- else if (me.hasMoltenMetal && te.hasMoltenMetal) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.smelter.molderhasmoltenmetal")));
- else if (me.hasJewelBase && te.hasMoltenMetal) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.smelter.modlerhasitem")));
- else player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage.Jewelrycraft.smelter.empty")));
+ }else if (te.hasMetal && te.melting > 0) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage." + Variables.MODID + ".smelter.metalismelting", te.metal.getDisplayName()) + " (" + (ConfigHandler.ingotMeltingTime * te.metal.stackSize - te.melting) * 100 / (ConfigHandler.ingotMeltingTime * te.metal.stackSize) + "%)"));
+ else if (te.hasMoltenMetal && !isConnectedToMolder(world, i, j, k)) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".smelter.molderismissing")));
+ else if (!me.hasMold && te.hasMoltenMetal) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".smelter.molderhasnomold")));
+ else if (me.hasMoltenMetal && te.hasMoltenMetal) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".smelter.molderhasmoltenmetal")));
+ else if (me.hasJewelBase && te.hasMoltenMetal) player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".smelter.modlerhasitem")));
+ else player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("chatmessage." + Variables.MODID + ".smelter.empty")));
}
/**
@@ -255,6 +256,6 @@ public class BlockSmelter extends BlockContainer
@Override
public void registerBlockIcons(IIconRegister icon)
{
- blockIcon = icon.registerIcon("jewelrycraft:smelter");
+ blockIcon = icon.registerIcon(Variables.MODID + ":smelter");
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/container/JewelryInventory.java b/src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java
index ce6f0b5..cf8543e 100644
--- a/src/main/java/darkknight/jewelrycraft/container/JewelryInventory.java
+++ b/src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
@@ -9,6 +9,7 @@ import darkknight.jewelrycraft.item.ItemEarrings;
import darkknight.jewelrycraft.item.ItemNecklace;
import darkknight.jewelrycraft.item.ItemRing;
import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
public class JewelryInventory implements IInventory
{
@@ -21,7 +22,7 @@ public class JewelryInventory implements IInventory
public JewelryInventory(EntityPlayer player)
{
this.player = player;
- NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
for(int i = 0; i < 18; i++)
inventory[i] = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("ext" + i));
}
@@ -118,7 +119,7 @@ public class JewelryInventory implements IInventory
@Override
public void markDirty()
{
- NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
for(int i = 0; i < 18; i++)
if (inventory[i] != null) nbt.setTag("ext" + i, inventory[i].writeToNBT(nbt.getCompoundTag("ext" + i)));
else nbt.removeTag("ext" + i);
diff --git a/src/main/java/darkknight/jewelrycraft/container/Page.java b/src/main/java/darkknight/jewelrycraft/client/Page.java
index beaa0bc..f6973a9 100644
--- a/src/main/java/darkknight/jewelrycraft/container/Page.java
+++ b/src/main/java/darkknight/jewelrycraft/client/Page.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client;
import java.util.ArrayList;
import net.minecraft.client.Minecraft;
@@ -8,11 +8,12 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
-import darkknight.jewelrycraft.client.GuiGuide;
+import darkknight.jewelrycraft.client.gui.GuiGuide;
+import darkknight.jewelrycraft.util.Variables;
public class Page
{
- static ResourceLocation pageFlipped = new ResourceLocation("jewelrycraft", "textures/gui/guidePageFlip.png");
+ static ResourceLocation pageFlipped = new ResourceLocation(Variables.MODID, "textures/gui/guidePageFlip.png");
/**
* @param gui
diff --git a/src/main/java/darkknight/jewelrycraft/client/GuiGuide.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java
index 09fc6a3..34a5c3d 100644
--- a/src/main/java/darkknight/jewelrycraft/client/GuiGuide.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.client;
+package darkknight.jewelrycraft.client.gui;
import java.util.ArrayList;
import java.util.List;
@@ -17,14 +17,6 @@ import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import darkknight.jewelrycraft.block.BlockList;
import darkknight.jewelrycraft.block.BlockShadowEye;
-import darkknight.jewelrycraft.container.GuiRectangle;
-import darkknight.jewelrycraft.container.GuiTab;
-import darkknight.jewelrycraft.container.GuiTabBlocks;
-import darkknight.jewelrycraft.container.GuiTabGemsAndIngots;
-import darkknight.jewelrycraft.container.GuiTabIntroduction;
-import darkknight.jewelrycraft.container.GuiTabItems;
-import darkknight.jewelrycraft.container.GuiTabModifiers;
-import darkknight.jewelrycraft.container.GuiTabRitual;
public class GuiGuide extends GuiContainer
{
diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiHandler.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java
index 6ebd3e9..d04fd73 100644
--- a/src/main/java/darkknight/jewelrycraft/container/GuiHandler.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java
@@ -1,22 +1,27 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.InventoryBasic;
import net.minecraft.tileentity.TileEntityChest;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.client.GuiGuide;
-import darkknight.jewelrycraft.client.GuiJewelry;
-import darkknight.jewelrycraft.client.GuiRingChest;
+import darkknight.jewelrycraft.client.JewelryInventory;
+import darkknight.jewelrycraft.client.gui.container.ContainerGuide;
+import darkknight.jewelrycraft.client.gui.container.ContainerJewelryModifier;
+import darkknight.jewelrycraft.client.gui.container.ContainerJewelryTab;
+import darkknight.jewelrycraft.client.gui.container.ContainerRingChest;
+import darkknight.jewelrycraft.util.Variables;
public class GuiHandler implements IGuiHandler
{
- ResourceLocation pageTexture = new ResourceLocation("jewelrycraft", "textures/gui/guidePage.png");
- ResourceLocation flippedPageTexture = new ResourceLocation("jewelrycraft", "textures/gui/guidePageFlip.png");
- ResourceLocation chestTexture = new ResourceLocation("jewelrycraft", "textures/gui/chest_ring.png");
- ResourceLocation jewelryInvTexture = new ResourceLocation("jewelrycraft", "textures/gui/jewelry_tab.png");
+ ResourceLocation pageTexture = new ResourceLocation(Variables.MODID, "textures/gui/guidePage.png");
+ ResourceLocation flippedPageTexture = new ResourceLocation(Variables.MODID, "textures/gui/guidePageFlip.png");
+ ResourceLocation chestTexture = new ResourceLocation(Variables.MODID, "textures/gui/chest_ring.png");
+ ResourceLocation jewelryInvTexture = new ResourceLocation(Variables.MODID, "textures/gui/jewelry_tab.png");
+ ResourceLocation jewlryModTexture = new ResourceLocation(Variables.MODID, "textures/gui/jewelry_modifier.png");
/**
*
@@ -46,6 +51,8 @@ public class GuiHandler implements IGuiHandler
return new ContainerGuide();
case 2:
return new ContainerJewelryTab(player, player.inventory, new JewelryInventory(player));
+ case 3:
+ return new ContainerJewelryModifier(player.inventory, new InventoryBasic("ItemModifier", false, 37));
default:
return null;
}
@@ -71,6 +78,8 @@ public class GuiHandler implements IGuiHandler
return new GuiGuide((ContainerGuide)getServerGuiElement(ID, player, world, x, y, z), world, pageTexture, flippedPageTexture);
case 2:
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);
default:
return null;
}
diff --git a/src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelry.java
index 0f8e59a..44d312b 100644
--- a/src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelry.java
@@ -1,11 +1,13 @@
-package darkknight.jewelrycraft.client;
+package darkknight.jewelrycraft.client.gui;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.container.ContainerJewelryTab;
-import darkknight.jewelrycraft.container.JewelryInventory;
+import darkknight.jewelrycraft.client.JewelryInventory;
+import darkknight.jewelrycraft.client.TabJewelry;
+import darkknight.jewelrycraft.client.TabRegistry;
+import darkknight.jewelrycraft.client.gui.container.ContainerJewelryTab;
import darkknight.jewelrycraft.events.KeyBindings;
public class GuiJewelry extends GuiContainer
diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelryModifier.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelryModifier.java
new file mode 100644
index 0000000..f03f54b
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelryModifier.java
@@ -0,0 +1,204 @@
+package darkknight.jewelrycraft.client.gui;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiTextField;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.client.gui.container.ContainerJewelryModifier;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+
+public class GuiJewelryModifier extends GuiContainer
+{
+ private ResourceLocation texture;
+ private GuiButton addItems;
+ private GuiTextField searchField, pages;
+ private boolean clicked;
+ private int page = 1, maxPages = 1, selectedX = 0, selectedY = 0, selectedPage = 0;
+ private ItemStack selectedItem;
+ private ArrayList<ItemStack> selectedItems = new ArrayList<ItemStack>();
+ private List<Map<Integer, Map<Integer, Integer>>> selectedItemsPos = new ArrayList<Map<Integer, Map<Integer, Integer>>>();
+ ContainerJewelryModifier jMod;
+
+ public GuiJewelryModifier(ContainerJewelryModifier containerJewelryTab, ResourceLocation texture)
+ {
+ super(containerJewelryTab);
+ xSize = 211;
+ ySize = 247;
+ jMod = containerJewelryTab;
+ this.maxPages = JewelrycraftUtil.objects.size() / 48 + 1;
+ this.texture = texture;
+ }
+
+ @Override
+ public void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY)
+ {
+ GL11.glColor3f(1, 1, 1);
+ Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
+ drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
+ if (selectedX != 0 && selectedY != 0 && page == selectedPage) drawTexturedModalRect(selectedX, selectedY, 211, 0, 18, 18);
+ for(Map items: selectedItemsPos){
+ for(Object itemPage: items.keySet()){
+ if (page == (Integer)itemPage) for(Object x: ((Map)items.get(itemPage)).keySet())
+ drawTexturedModalRect((int)x, (int)((Map)items.get(itemPage)).get(x), 211, 0, 18, 18);
+ }
+ }
+ this.searchField.drawTextBox();
+ this.pages.drawTextBox();
+ }
+
+ @Override
+ public void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
+ {
+ int i = 0;
+ for(ItemStack item: JewelrycraftUtil.objects){
+ if (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase())){
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glColor3f(1F, 1F, 1F);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ if (i >= (page - 1) * 48 && i < page * 48) itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), item, 88 + 20 * (i % 6), 7 + 17 * (i / 6) - 136 * (page - 1));
+ GL11.glDisable(GL11.GL_LIGHTING);
+ i++;
+ }
+ }
+ }
+
+ @Override
+ protected void keyTyped(char character, int key)
+ {
+ if (this.searchField.textboxKeyTyped(character, key)){
+ int items = 0;
+ for(ItemStack item: JewelrycraftUtil.objects)
+ if (item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase())) items++;
+ maxPages = items / 48 + 1;
+ page = 1;
+ this.pages.setText(page + "/" + maxPages);
+ }else super.keyTyped(character, key);
+ }
+
+ protected void mouseClicked(int x, int y, int id)
+ {
+ super.mouseClicked(x, y, id);
+ if (x >= this.searchField.xPosition && x <= this.searchField.xPosition + this.searchField.width && y >= this.searchField.yPosition && y <= this.searchField.yPosition + this.searchField.height){
+ this.searchField.setText("");
+ this.searchField.setFocused(true);
+ maxPages = JewelrycraftUtil.objects.size() / 48 + 1;
+ }else this.searchField.setFocused(false);
+ for(Object button: this.buttonList){
+ if (((GuiButton)button).id < 3 && ((GuiButton)button).mousePressed(mc, x, y)){
+ if (((GuiButton)button).id < 2){
+ this.selectedItems.removeAll(selectedItems);
+ this.selectedItemsPos.removeAll(selectedItemsPos);
+ }else{
+ this.selectedX = 0;
+ this.selectedY = 0;
+ this.selectedItem = null;
+ }
+ ((GuiButton)buttonList.get(0)).enabled = true;
+ ((GuiButton)buttonList.get(1)).enabled = true;
+ ((GuiButton)buttonList.get(2)).enabled = true;
+ ((GuiButton)button).enabled = false;
+ }
+ }
+ int i = 0;
+ for(ItemStack item: JewelrycraftUtil.objects){
+ if (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase())){
+ if (i >= (page - 1) * 48 && i < page * 48 && x >= this.guiLeft + 88 + 20 * (i % 6) && x < this.guiLeft + 108 + 20 * (i % 6) && y >= this.guiTop + 9 + 17 * (i / 6) - 136 * (page - 1) && y < this.guiTop + 25 + 17 * (i / 6) - 136 * (page - 1)){
+ if (!((GuiButton)buttonList.get(0)).enabled || !((GuiButton)buttonList.get(1)).enabled){
+ this.selectedItem = item;
+ this.selectedX = this.guiLeft + 87 + 20 * (i % 6);
+ this.selectedY = this.guiTop + 6 + 17 * (i / 6) - 136 * (page - 1);
+ this.selectedPage = page;
+ }else if (!((GuiButton)buttonList.get(2)).enabled){
+ Map<Integer, Map<Integer, Integer>> itemPage = new HashMap<Integer, Map<Integer, Integer>>();
+ Map<Integer, Integer> pos = new HashMap<Integer, Integer>();
+ pos.put(this.guiLeft + 87 + 20 * (i % 6), this.guiTop + 6 + 17 * (i / 6) - 136 * (page - 1));
+ itemPage.put(page, pos);
+ if (!this.selectedItems.contains(item)){
+ this.selectedItems.add(item);
+ this.selectedItemsPos.add(itemPage);
+ }else{
+ this.selectedItems.remove(item);
+ this.selectedItemsPos.remove(itemPage);
+ }
+ }
+ }
+ i++;
+ }
+ }
+ if (((GuiButton)buttonList.get(4)).mousePressed(mc, x, y) && page > 1) page--;
+ if (((GuiButton)buttonList.get(5)).mousePressed(mc, x, y) && page < maxPages) page++;
+ if (jMod.modInv.getStackInSlot(36) != null){
+ ItemStack targetItem = jMod.modInv.getStackInSlot(36).copy();
+ if (((GuiButton)buttonList.get(3)).mousePressed(mc, x, y) && !((GuiButton)buttonList.get(0)).enabled){
+ JewelryNBT.addIngotColor(targetItem, 16777215);
+ JewelryNBT.addMetal(targetItem, new ItemStack(Item.getItemById(0), 0, 0));
+ JewelryNBT.addMetal(targetItem, this.selectedItem);
+ JewelrycraftMod.netWrapper.sendToServer(new PacketRequestSetSlot(targetItem));
+ }
+ if (((GuiButton)buttonList.get(3)).mousePressed(mc, x, y) && !((GuiButton)buttonList.get(1)).enabled){
+ JewelryNBT.addGemColor(targetItem, 16777215);
+ JewelryNBT.addGem(targetItem, new ItemStack(Item.getItemById(0), 0, 0));
+ JewelryNBT.addGem(targetItem, this.selectedItem);
+ JewelrycraftMod.netWrapper.sendToServer(new PacketRequestSetSlot(targetItem));
+ }
+ if (((GuiButton)buttonList.get(3)).mousePressed(mc, x, y) && !((GuiButton)buttonList.get(2)).enabled){
+ JewelryNBT.addModifiers(targetItem, selectedItems);
+ JewelrycraftMod.netWrapper.sendToServer(new PacketRequestSetSlot(targetItem));
+ }
+ }
+ this.pages.setText(page + "/" + maxPages);
+ }
+
+ @Override
+ public void initGui()
+ {
+ super.initGui();
+ this.searchField = new GuiTextField(this.fontRendererObj, this.guiLeft + 89, this.guiTop + 148, 115, this.fontRendererObj.FONT_HEIGHT + 3);
+ this.searchField.setMaxStringLength(15);
+ this.searchField.setTextColor(16777215);
+ this.searchField.setVisible(true);
+ this.searchField.setCanLoseFocus(true);
+ this.pages = new GuiTextField(this.fontRendererObj, this.guiLeft + 20, this.guiTop + 146, 50, this.fontRendererObj.FONT_HEIGHT + 3);
+ this.pages.setMaxStringLength(15);
+ this.pages.setTextColor(16777215);
+ this.pages.setVisible(true);
+ this.pages.setText(page + "/" + maxPages);
+ this.buttonList.add(new GuiButton(0, this.guiLeft + 17, this.guiTop + 30, 52, 20, "Metal"));
+ this.buttonList.add(new GuiButton(1, this.guiLeft + 17, this.guiTop + 52, 52, 20, "Gem"));
+ this.buttonList.add(new GuiButton(2, this.guiLeft + 17, this.guiTop + 74, 52, 20, "Modifiers"));
+ this.buttonList.add(new GuiButton(3, this.guiLeft + 17, this.guiTop + 96, 52, 20, "Add Items"));
+ this.buttonList.add(new GuiButton(4, this.guiLeft + 5, this.guiTop + 142, 13, 20, "<<"));
+ this.buttonList.add(new GuiButton(5, this.guiLeft + 73, this.guiTop + 142, 13, 20, ">>"));
+ ((GuiButton)buttonList.get(0)).enabled = false;
+ }
+
+ public void drawScreen(int x, int y, float z)
+ {
+ super.drawScreen(x, y, z);
+ int i = 0;
+ List<String> list = new ArrayList<String>();
+ for(ItemStack item: JewelrycraftUtil.objects){
+ if (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase())){
+ if (i >= (page - 1) * 48 && i < page * 48 && x >= this.guiLeft + 88 + 20 * (i % 6) && x < this.guiLeft + 108 + 20 * (i % 6) && y >= this.guiTop + 9 + 17 * (i / 6) - 136 * (page - 1) && y < this.guiTop + 25 + 17 * (i / 6) - 136 * (page - 1)){
+ list.add(item.getDisplayName());
+ if (item.getTooltip(mc.thePlayer, mc.gameSettings.advancedItemTooltips) != null) this.renderToolTip(item, x, y);
+ else this.drawHoveringText(list, x, y, this.fontRendererObj);
+ }
+ i++;
+ }
+ }
+ }
+}
diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiRectangle.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiRectangle.java
index 50b7cd5..f4c35fb 100644
--- a/src/main/java/darkknight/jewelrycraft/container/GuiRectangle.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiRectangle.java
@@ -1,8 +1,7 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui;
import java.util.Arrays;
import net.minecraft.item.ItemStack;
-import darkknight.jewelrycraft.client.GuiGuide;
public class GuiRectangle
{
diff --git a/src/main/java/darkknight/jewelrycraft/client/GuiRingChest.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiRingChest.java
index 2504d6f..e72fd81 100644
--- a/src/main/java/darkknight/jewelrycraft/client/GuiRingChest.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiRingChest.java
@@ -1,10 +1,10 @@
-package darkknight.jewelrycraft.client;
+package darkknight.jewelrycraft.client.gui;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.container.ContainerRingChest;
+import darkknight.jewelrycraft.client.gui.container.ContainerRingChest;
public class GuiRingChest extends GuiContainer
{
diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTab.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTab.java
index e315d3a..98b34f9 100644
--- a/src/main/java/darkknight/jewelrycraft/container/GuiTab.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTab.java
@@ -1,8 +1,7 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.client.GuiGuide;
@SideOnly (Side.CLIENT)
public abstract class GuiTab extends GuiRectangle
diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabBlocks.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java
index de50533..8ba6c6a 100644
--- a/src/main/java/darkknight/jewelrycraft/container/GuiTabBlocks.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui;
import java.awt.Desktop;
import java.net.URL;
@@ -7,7 +7,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.client.GuiGuide;
+import darkknight.jewelrycraft.client.Page;
import darkknight.jewelrycraft.item.ItemList;
public class GuiTabBlocks extends GuiTab
@@ -153,21 +153,6 @@ public class GuiTabBlocks extends GuiTab
* @param gui
* @param x
* @param y
- * @param button
- */
- @Override
- public void mouseClick(GuiGuide gui, int x, int y, int button)
- {
- if (gui.page == 21 && x >= gui.getLeft() + 130 && x <= gui.getLeft() + 160 && y >= gui.getTop() + 40 && y <= gui.getTop() + 50) try{
- Desktop.getDesktop().browse(new URL("http://imgur.com/a/Zk0LW").toURI());
- }
- catch(Exception e){}
- }
-
- /**
- * @param gui
- * @param x
- * @param y
* @param page
*/
@Override
diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabGemsAndIngots.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java
index 5f2bde0..b66f192 100644
--- a/src/main/java/darkknight/jewelrycraft/container/GuiTabGemsAndIngots.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java
@@ -1,10 +1,9 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.client.GuiGuide;
import darkknight.jewelrycraft.util.JewelrycraftUtil;
public class GuiTabGemsAndIngots extends GuiTab
diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabIntroduction.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java
index f14c81e..b6f4ca6 100644
--- a/src/main/java/darkknight/jewelrycraft/container/GuiTabIntroduction.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java
@@ -1,8 +1,8 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
-import darkknight.jewelrycraft.client.GuiGuide;
+import darkknight.jewelrycraft.client.Page;
import darkknight.jewelrycraft.item.ItemList;
public class GuiTabIntroduction extends GuiTab
diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabItems.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java
index 85c7211..37012d9 100644
--- a/src/main/java/darkknight/jewelrycraft/container/GuiTabItems.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui;
import java.awt.Desktop;
import java.net.URL;
@@ -7,7 +7,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.client.GuiGuide;
+import darkknight.jewelrycraft.client.Page;
import darkknight.jewelrycraft.item.ItemList;
import darkknight.jewelrycraft.util.JewelryNBT;
import darkknight.jewelrycraft.util.JewelrycraftUtil;
diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabModifiers.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabModifiers.java
index 89db85b..614c152 100644
--- a/src/main/java/darkknight/jewelrycraft/container/GuiTabModifiers.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabModifiers.java
@@ -1,8 +1,8 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
-import darkknight.jewelrycraft.client.GuiGuide;
+import darkknight.jewelrycraft.client.Page;
public class GuiTabModifiers extends GuiTab
{
diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabRitual.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabRitual.java
index eed8072..ffb58d9 100644
--- a/src/main/java/darkknight/jewelrycraft/container/GuiTabRitual.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabRitual.java
@@ -1,11 +1,11 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui;
import org.lwjgl.opengl.GL11;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.client.GuiGuide;
+import darkknight.jewelrycraft.client.Page;
public class GuiTabRitual extends GuiTab
{
diff --git a/src/main/java/darkknight/jewelrycraft/container/ContainerGuide.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerGuide.java
index b6513a3..ccb9ca9 100644
--- a/src/main/java/darkknight/jewelrycraft/container/ContainerGuide.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerGuide.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryModifier.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryModifier.java
new file mode 100644
index 0000000..afb32d7
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryModifier.java
@@ -0,0 +1,50 @@
+package darkknight.jewelrycraft.client.gui.container;
+
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.client.gui.container.slots.SlotRing;
+
+public class ContainerJewelryModifier extends Container
+{
+ public IInventory modInv;
+ public ContainerJewelryModifier(InventoryPlayer inv, IInventory mod)
+ {
+ int x, y;
+ modInv = mod;
+ for(x = 0; x < 9; x++)
+ addSlotToContainer(new Slot(inv, x, 26 + 18 * x, 225));
+ for(y = 0; y < 3; y++)
+ for(x = 0; x < 9; x++)
+ addSlotToContainer(new Slot(inv, x + 9 + y * 9, 26 + 18 * x, 167 + y * 18));
+ addSlotToContainer(new Slot(mod, 36, 37, 9));
+ }
+
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
+
+ @Override
+ public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
+ {
+ ItemStack itemstack = null;
+ Slot slot = (Slot)inventorySlots.get(par2);
+ if (slot != null && slot.getHasStack()){
+ ItemStack itemstack1 = slot.getStack();
+ itemstack = itemstack1.copy();
+ if (par2 < 27){
+ if (!mergeItemStack(itemstack1, 27, inventorySlots.size(), true)) return null;
+ }else if (!mergeItemStack(itemstack1, 0, 27, false)) return null;
+ if (itemstack1.stackSize == 0) slot.putStack((ItemStack)null);
+ else slot.onSlotChanged();
+ }
+ return itemstack;
+ }
+}
diff --git a/src/main/java/darkknight/jewelrycraft/container/ContainerJewelryTab.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryTab.java
index 701b338..1b2ab60 100644
--- a/src/main/java/darkknight/jewelrycraft/container/ContainerJewelryTab.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryTab.java
@@ -1,10 +1,14 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
+import darkknight.jewelrycraft.client.gui.container.slots.SlotBracelet;
+import darkknight.jewelrycraft.client.gui.container.slots.SlotEarrings;
+import darkknight.jewelrycraft.client.gui.container.slots.SlotNecklace;
+import darkknight.jewelrycraft.client.gui.container.slots.SlotRing;
import darkknight.jewelrycraft.item.ItemBracelet;
import darkknight.jewelrycraft.item.ItemEarrings;
import darkknight.jewelrycraft.item.ItemNecklace;
diff --git a/src/main/java/darkknight/jewelrycraft/container/ContainerRingChest.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerRingChest.java
index 925ded7..3d7beb6 100644
--- a/src/main/java/darkknight/jewelrycraft/container/ContainerRingChest.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerRingChest.java
@@ -1,5 +1,6 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui.container;
+import darkknight.jewelrycraft.client.gui.container.slots.SlotRingChest;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotBracelet.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotBracelet.java
index c82421d..3bdbb64 100644
--- a/src/main/java/darkknight/jewelrycraft/container/SlotBracelet.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotBracelet.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui.container.slots;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotEarrings.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java
index 550f4f9..de062bc 100644
--- a/src/main/java/darkknight/jewelrycraft/container/SlotEarrings.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui.container.slots;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotNecklace.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java
index 42543b0..9a64079 100644
--- a/src/main/java/darkknight/jewelrycraft/container/SlotNecklace.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui.container.slots;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotRing.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java
index 52aa4fb..a52cf6b 100644
--- a/src/main/java/darkknight/jewelrycraft/container/SlotRing.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui.container.slots;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotRingChest.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRingChest.java
index b1f553c..8cc5431 100644
--- a/src/main/java/darkknight/jewelrycraft/container/SlotRingChest.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRingChest.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.container;
+package darkknight.jewelrycraft.client.gui.container.slots;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
diff --git a/src/main/java/darkknight/jewelrycraft/commands/JewelrycraftCommands.java b/src/main/java/darkknight/jewelrycraft/commands/JewelrycraftCommands.java
index e8f639d..c3e63e9 100644
--- a/src/main/java/darkknight/jewelrycraft/commands/JewelrycraftCommands.java
+++ b/src/main/java/darkknight/jewelrycraft/commands/JewelrycraftCommands.java
@@ -38,9 +38,6 @@ public class JewelrycraftCommands extends CommandBase
{
this.aliases = new ArrayList();
this.aliases.add("jw");
- this.aliases.add("jc");
- this.aliases.add("jcrft");
- this.aliases.add("jCraft");
this.aliases.add("jewelry");
}
@@ -53,10 +50,7 @@ public class JewelrycraftCommands extends CommandBase
@Override
public String getCommandUsage(ICommandSender var1)
{
- String use = "/jewelrycraft <addCursePoints:getCursePoints:setCursePoints> <user> [points] | ";
- use += "/jewelrycraft <addModifier> <modifier> |";
- use += "/jewelrycraft <addCurse> <user> <curseID> <curseGrade>";
- return use;
+ return "/jewelrycraft <addCursePoints:getCursePoints:setCursePoints> <user> [points]";
}
@Override
@@ -80,25 +74,6 @@ public class JewelrycraftCommands extends CommandBase
int points = CommandBase.parseIntWithMin(commandSender, astring[2], 0);
EntityPlayerMP entityplayermp = getPlayer(commandSender, astring[1]);
JewelrycraftUtil.addCursePoints(entityplayermp, points - JewelrycraftUtil.getCursePoints(entityplayermp));
- }else if (astring[0].equals("addModifier")){
- ItemStack item = new ItemStack(CommandBase.getItemByText(commandSender, astring[1]));
- EntityPlayerMP entityplayermp = getPlayer(commandSender, commandSender.getCommandSenderName());
- ArrayList<ItemStack> modifier = new ArrayList<ItemStack>();
- modifier.add(item);
- JewelryNBT.addModifiers(entityplayermp.getCurrentEquippedItem(), modifier);
- }else if (astring[0].equals("addCurse")){
- EntityPlayerMP entityplayermp = getPlayer(commandSender, astring[1]);
- int curse = Integer.valueOf(astring[2]);
- int grade = Integer.valueOf(astring[3]);
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(entityplayermp, "Jewelrycraft");
- if(curse < Curse.getCurseList().size() && grade <= 2)
- {
- EntityEventHandler.addCurse(entityplayermp, playerInfo, curse, grade);
- JewelrycraftMod.netWrapper.sendToServer(new PacketRequestPlayerInfo());
- }
- else if(curse >= Curse.getCurseList().size()) entityplayermp.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Curse ID exceedes the maximum value of " + (Curse.getCurseList().size() - 1)));
- else entityplayermp.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Curse grade exceedes the maximum value of 2"));
-
}
}
@@ -111,13 +86,9 @@ public class JewelrycraftCommands extends CommandBase
if ("addCursePoints".toLowerCase().startsWith(ARG_LC)) MATCHES.add("addCursePoints");
if ("getCursePoints".toLowerCase().startsWith(ARG_LC)) MATCHES.add("getCursePoints");
if ("setCursePoints".toLowerCase().startsWith(ARG_LC)) MATCHES.add("setCursePoints");
- if ("addModifier".toLowerCase().startsWith(ARG_LC)) MATCHES.add("addModifier");
- if ("addCurse".toLowerCase().startsWith(ARG_LC)) MATCHES.add("addCurse");
}else if (astring.length == 2){
- if (!astring[0].equals("addModifier")){
- for(String un: MinecraftServer.getServer().getAllUsernames())
- if (un.toLowerCase().startsWith(ARG_LC)) MATCHES.add(un);
- }else if (!astring[0].equals("addCurse")) return getListOfStringsFromIterableMatchingLastWord(astring, Item.itemRegistry.getKeys());
+ for(String un: MinecraftServer.getServer().getAllUsernames())
+ if (un.toLowerCase().startsWith(ARG_LC)) MATCHES.add(un);
}
return MATCHES.isEmpty() ? null : MATCHES;
}
diff --git a/src/main/java/darkknight/jewelrycraft/config/ConfigHandler.java b/src/main/java/darkknight/jewelrycraft/config/ConfigHandler.java
index a7d4157..9f568a3 100644
--- a/src/main/java/darkknight/jewelrycraft/config/ConfigHandler.java
+++ b/src/main/java/darkknight/jewelrycraft/config/ConfigHandler.java
@@ -3,6 +3,7 @@ package darkknight.jewelrycraft.config;
import java.io.File;
import net.minecraftforge.common.config.Configuration;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import darkknight.jewelrycraft.util.Variables;
public class ConfigHandler
{
@@ -31,7 +32,7 @@ public class ConfigHandler
public static void preInit(FMLPreInitializationEvent e)
{
if (!isInitialized){
- config = new Configuration(new File(e.getModConfigurationDirectory(), "JewelryCraftv2.0.cfg"));
+ config = new Configuration(new File(e.getModConfigurationDirectory(), Variables.MODID+".cfg"));
config.load();
ingotCoolingTime = config.get("Timers", "Molder Ingot Cooling Time", ingotCoolingTime, "This sets the number of ticks you need to wait before the mold is cooled.").getInt();
ingotMeltingTime = config.get("Timers", "Ingot Melting Time", ingotMeltingTime, "This sets the number of ticks you need to wait before an ingot is completely smelted.").getInt();
diff --git a/src/main/java/darkknight/jewelrycraft/curses/CurseInfamy.java b/src/main/java/darkknight/jewelrycraft/curses/CurseInfamy.java
index aa815f7..1a86862 100644
--- a/src/main/java/darkknight/jewelrycraft/curses/CurseInfamy.java
+++ b/src/main/java/darkknight/jewelrycraft/curses/CurseInfamy.java
@@ -12,6 +12,7 @@ import darkknight.jewelrycraft.entities.EntityHalfHeart;
import darkknight.jewelrycraft.entities.EntityHeart;
import darkknight.jewelrycraft.util.JewelrycraftUtil;
import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
public class CurseInfamy extends Curse
{
@@ -24,7 +25,7 @@ public class CurseInfamy extends Curse
public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
{
if (rand.nextInt(5) == 0 && !world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && target.canAttackWithItem()){
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
if (playerInfo.getFloat("BlackHeart") < 20F) playerInfo.setFloat("BlackHeart", playerInfo.getFloat("BlackHeart") + 1.0F);
if (player.getMaxHealth() >= 3F){
player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(player.getMaxHealth() - 1.0F);
diff --git a/src/main/java/darkknight/jewelrycraft/curses/CurseList.java b/src/main/java/darkknight/jewelrycraft/curses/CurseList.java
index 4e796ff..a076e07 100644
--- a/src/main/java/darkknight/jewelrycraft/curses/CurseList.java
+++ b/src/main/java/darkknight/jewelrycraft/curses/CurseList.java
@@ -1,7 +1,7 @@
package darkknight.jewelrycraft.curses;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import darkknight.jewelrycraft.lib.Reference;
+import darkknight.jewelrycraft.util.Variables;
public class CurseList
{
@@ -14,11 +14,11 @@ public class CurseList
public static void preInit(FMLPreInitializationEvent e)
{
if (!isInitialized){
- rotten = new CurseRottenHeart(0, Reference.MODNAME + ":" + "Rotten Heart", 0);
- flaming = new CurseFlamingSoul(1, Reference.MODNAME + ":" + "Flaming Soul", 0);
- greed = new CurseGreed(2, Reference.MODNAME + ":" + "Greed", 0);
- blind = new CurseBlind(3, Reference.MODNAME + ":" + "Blind", 0);
- infamy = new CurseInfamy(4, Reference.MODNAME + ":" + "Infamy", 0);
+ rotten = new CurseRottenHeart(0, Variables.MODNAME + ":" + "Rotten Heart", 0);
+ flaming = new CurseFlamingSoul(1, Variables.MODNAME + ":" + "Flaming Soul", 0);
+ greed = new CurseGreed(2, Variables.MODNAME + ":" + "Greed", 0);
+ blind = new CurseBlind(3, Variables.MODNAME + ":" + "Blind", 0);
+ infamy = new CurseInfamy(4, Variables.MODNAME + ":" + "Infamy", 0);
isInitialized = true;
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/effects/EffectBlazePowder.java b/src/main/java/darkknight/jewelrycraft/effects/EffectBlazePowder.java
index 949d0d8..fdcdd3b 100644
--- a/src/main/java/darkknight/jewelrycraft/effects/EffectBlazePowder.java
+++ b/src/main/java/darkknight/jewelrycraft/effects/EffectBlazePowder.java
@@ -15,6 +15,7 @@ import darkknight.jewelrycraft.item.ItemNecklace;
import darkknight.jewelrycraft.item.ItemRing;
import darkknight.jewelrycraft.util.JewelryNBT;
import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
public class EffectBlazePowder extends ModifierEffects
{
@@ -26,70 +27,58 @@ public class EffectBlazePowder extends ModifierEffects
@Override
public void action(ItemStack item, EntityPlayer player, Item jewelry)
{
- int pos = JewelryNBT.doesModifierExist(item, modifier);
- if (jewelry instanceof ItemNecklace && pos != -1){
- //Positive for necklace
- player.extinguish();
-
- //Negative for necklace
- if (player.isInWater()) player.attackEntityFrom(DamageSource.drown, 1f);
+ boolean exists = JewelryNBT.doesModifierExist(item, modifier);
+ if (jewelry instanceof ItemNecklace && exists){
+ // Positive for necklace
+ if (player.isBurning() && rand.nextInt(JewelryNBT.numberOfModifiers(item)) == 0) player.extinguish();
+ // Negative for necklace
+ if (player.isInWater()) player.attackEntityFrom(DamageSource.drown, 1f + (JewelryNBT.numberOfModifiers(item) - 1) * 0.1F);
}
- //Negative for bracelet
- if (jewelry instanceof ItemBracelet && pos != -1 && player.isInWater()){
- player.motionX *= 0.6D;
- player.motionY *= 0.6D;
- player.motionZ *= 0.6D;
- player.motionY -= 0.02D;
+ // Negative for bracelet
+ if (jewelry instanceof ItemBracelet && exists && player.isInWater()){
+ double slowAmount = 0.6D + (JewelryNBT.numberOfModifiers(item) - 1) * 0.05D;
+ player.motionX *= slowAmount;
+ player.motionY *= slowAmount;
+ player.motionZ *= slowAmount;
+ player.motionY -= (0.02D + (JewelryNBT.numberOfModifiers(item) - 1) * 0.005D);
if (player.isCollidedHorizontally) player.motionY = 0.30000001192092896D;
}
-
- //Negative for earrings
- if (jewelry instanceof ItemEarrings && pos != -1){
+ // Negative for earrings
+ if (jewelry instanceof ItemEarrings && exists){
if (player.getAir() >= 300) player.setAir(player.getAir() / 2);
- else player.setAir(player.getAir() - 1);
- }
+ else player.setAir(player.getAir() - JewelryNBT.numberOfModifiers(item));
+ }
}
@Override
public boolean onEntityAttackedCacellable(ItemStack item, EntityPlayer player, Entity target, Item jewelry, float amount)
{
- int pos = JewelryNBT.doesModifierExist(item, modifier);
- //Balanced for ring
- if (jewelry instanceof ItemRing && pos != -1 && !player.isInWater()) target.setFire(2);
+ boolean exists = JewelryNBT.doesModifierExist(item, modifier);
+ // Balanced for ring
+ if (jewelry instanceof ItemRing && exists && !player.isInWater() && rand.nextInt(JewelryNBT.numberOfModifiers(item)) == 0) target.setFire(2);
return false;
}
@Override
public boolean onPlayerAttackedCacellable(ItemStack item, EntityPlayer player, DamageSource source, Item jewelry, float amount)
{
-// int pos = JewelryNBT.doesModifierExist(item, modifier);
-// if (jewelry instanceof ItemEarrings && pos != -1 && rand.nextInt(4) == 0) if (source == DamageSource.lava || source == DamageSource.inFire || source == DamageSource.onFire){
-// //Positive for earrings
-// int stackSize = JewelryNBT.modifier(item).get(pos).stackSize;
-// player.heal((float)(0.05 * stackSize));
-// return true;
-// }
-// //Positive for bracelet
-// if (jewelry instanceof ItemBracelet && pos != -1) if (source == DamageSource.inFire || source == DamageSource.onFire || source == DamageSource.lava && player.worldObj.isMaterialInBB(AxisAlignedBB.getBoundingBox(player.boundingBox.minX, player.boundingBox.minY, player.boundingBox.minZ, player.boundingBox.maxX, player.boundingBox.maxY - 0.7, player.boundingBox.maxZ), Material.lava) && !player.worldObj.isMaterialInBB(AxisAlignedBB.getBoundingBox(player.boundingBox.minX, player.boundingBox.minY + 0.9, player.boundingBox.minZ, player.boundingBox.maxX, player.boundingBox.maxY, player.boundingBox.maxZ), Material.lava)) return true;
return false;
}
public void onEntityAttacked(ItemStack item, EntityPlayer player, Entity target, Item jewelry, float amount)
- {
-
- }
+ {}
public void onPlayerAttacked(ItemStack item, EntityPlayer player, DamageSource source, Item jewelry, float amount)
{
- int pos = JewelryNBT.doesModifierExist(item, modifier);
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
- if (jewelry instanceof ItemEarrings && pos != -1 && rand.nextInt(4) == 0) if (source == DamageSource.lava || source == DamageSource.inFire || source == DamageSource.onFire){
- //Positive for earrings
- int stackSize = JewelryNBT.modifier(item).get(pos).stackSize;
- player.heal((float)(0.05 * stackSize));
+ boolean exists = JewelryNBT.doesModifierExist(item, modifier);
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
+ if (jewelry instanceof ItemEarrings && exists && rand.nextInt(4) == 0) if (source == DamageSource.lava || source == DamageSource.inFire || source == DamageSource.onFire){
+ // Positive for earrings
+ int stackSize = JewelryNBT.modifierSize(item, modifier);
+ player.heal(stackSize*0.05F - (JewelryNBT.numberOfModifiers(item) - 1)*0.01F);
playerInfo.setBoolean("negateDamage", true);
}
- //Positive for bracelet
- if (jewelry instanceof ItemBracelet && pos != -1) if (source == DamageSource.inFire || source == DamageSource.onFire || source == DamageSource.lava && player.worldObj.isMaterialInBB(AxisAlignedBB.getBoundingBox(player.boundingBox.minX, player.boundingBox.minY, player.boundingBox.minZ, player.boundingBox.maxX, player.boundingBox.maxY - 0.7, player.boundingBox.maxZ), Material.lava) && !player.worldObj.isMaterialInBB(AxisAlignedBB.getBoundingBox(player.boundingBox.minX, player.boundingBox.minY + 0.9, player.boundingBox.minZ, player.boundingBox.maxX, player.boundingBox.maxY, player.boundingBox.maxZ), Material.lava)) playerInfo.setBoolean("negateDamage", true);
+ // Positive for bracelet
+ if (jewelry instanceof ItemBracelet && exists) if (source == DamageSource.inFire || source == DamageSource.onFire || source == DamageSource.lava && player.worldObj.isMaterialInBB(AxisAlignedBB.getBoundingBox(player.boundingBox.minX, player.boundingBox.minY, player.boundingBox.minZ, player.boundingBox.maxX, player.boundingBox.maxY - 0.7, player.boundingBox.maxZ), Material.lava) && !player.worldObj.isMaterialInBB(AxisAlignedBB.getBoundingBox(player.boundingBox.minX, player.boundingBox.minY + 0.9, player.boundingBox.minZ, player.boundingBox.maxX, player.boundingBox.maxY, player.boundingBox.maxZ), Material.lava)) playerInfo.setBoolean("negateDamage", true);
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/effects/EffectEnderEye.java b/src/main/java/darkknight/jewelrycraft/effects/EffectEnderEye.java
index eb7bef7..4c36593 100644
--- a/src/main/java/darkknight/jewelrycraft/effects/EffectEnderEye.java
+++ b/src/main/java/darkknight/jewelrycraft/effects/EffectEnderEye.java
@@ -27,6 +27,7 @@ public class EffectEnderEye extends ModifierEffects
{
private boolean originalVD = false;
private float originalViewDistance;
+
public EffectEnderEye()
{
super(new ItemStack(Items.ender_eye));
@@ -35,8 +36,8 @@ public class EffectEnderEye extends ModifierEffects
@Override
public void action(ItemStack item, EntityPlayer player, Item jewelry)
{
- int pos = JewelryNBT.doesModifierExist(item, modifier);
- if (jewelry instanceof ItemEarrings && pos != -1 && !player.worldObj.isRemote){
+ boolean exists = JewelryNBT.doesModifierExist(item, modifier);
+ if (jewelry instanceof ItemEarrings && exists && !player.worldObj.isRemote){
for(Object e: player.worldObj.getEntitiesWithinAABB(EntityEnderman.class, player.boundingBox.expand(100D, 0D, 100D))){
EntityEnderman enderman = (EntityEnderman)e;
ReflectionHelper.setPrivateValue(EntityEnderman.class, enderman, -1, "stareTimer", "field_70826_g");
@@ -46,34 +47,41 @@ public class EffectEnderEye extends ModifierEffects
vec31 = vec31.normalize();
double d1 = vec3.dotProduct(vec31);
if (d1 > 1.0D - 0.025D / d0 && player.canEntityBeSeen(enderman)){
- enderman.setTarget(null);
- if (!player.isPotionActive(Potion.confusion) || player.getActivePotionEffect(Potion.confusion).getDuration() <= 80) player.addPotionEffect(new PotionEffect(Potion.confusion.id, 300, 2));
+ // Positive earrings
+ if (rand.nextInt(JewelryNBT.numberOfModifiers(item)) == 0) enderman.setTarget(null);
+ // Negative earrings
+ if (!player.isPotionActive(Potion.confusion) || player.getActivePotionEffect(Potion.confusion).getDuration() <= 80) player.addPotionEffect(new PotionEffect(Potion.confusion.id, 300, 2 + JewelryNBT.numberOfModifiers(item) / 4));
}
}
}
- if (jewelry instanceof ItemNecklace && pos != -1 && !player.worldObj.isRemote){
+ // Positive necklace
+ if (jewelry instanceof ItemNecklace && exists && !player.worldObj.isRemote){
ChunkPosition chunkposition = player.worldObj.findClosestStructure("Stronghold", (int)player.posX, (int)player.posY, (int)player.posZ);
if (chunkposition != null){
- Minecraft.getMinecraft().thePlayer.motionX += 0.01D * Math.signum((double)chunkposition.chunkPosX - player.posX);
- Minecraft.getMinecraft().thePlayer.motionZ += 0.01D * Math.signum((double)chunkposition.chunkPosZ - player.posZ);
+ Minecraft.getMinecraft().thePlayer.motionX += 0.01D * Math.signum((double)chunkposition.chunkPosX - player.posX) * (rand.nextInt(JewelryNBT.numberOfModifiers(item)) == 0 ? 1 : -1);
+ Minecraft.getMinecraft().thePlayer.motionZ += 0.01D * Math.signum((double)chunkposition.chunkPosZ - player.posZ) * (rand.nextInt(JewelryNBT.numberOfModifiers(item)) == 0 ? 1 : -1);
}
}
- if (jewelry instanceof ItemBracelet && pos != -1 && !player.worldObj.isRemote && player.worldObj.getBiomeGenForCoords((int)player.posX, (int)player.posZ) == BiomeGenBase.sky && (!player.isPotionActive(Potion.moveSpeed) || player.getActivePotionEffect(Potion.moveSpeed).getDuration() < 30)) player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 140, 1));
- if (jewelry instanceof ItemBracelet && pos != -1 && !player.worldObj.isRemote && rand.nextInt(500) == 15) player.setPositionAndUpdate(player.posX + rand.nextInt(30)*(rand.nextBoolean()?-1:1), player.posY, player.posZ + rand.nextInt(30)*(rand.nextBoolean()?-1:1));
- if (jewelry instanceof ItemRing && pos != -1 && rand.nextInt(200) == 12){
- Minecraft.getMinecraft().gameSettings.setOptionFloatValue(Options.RENDER_DISTANCE, 1.0F);
+ // Positive bracelet
+ if (jewelry instanceof ItemBracelet && exists && !player.worldObj.isRemote && player.worldObj.getBiomeGenForCoords((int)player.posX, (int)player.posZ) == BiomeGenBase.sky && (!player.isPotionActive(Potion.moveSpeed) || player.getActivePotionEffect(Potion.moveSpeed).getDuration() < 30)) player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 150 - JewelryNBT.numberOfModifiers(item) * 10, 2 - JewelryNBT.numberOfModifiers(item) / 5));
+ // Negative bracelet
+ if (jewelry instanceof ItemBracelet && exists && !player.worldObj.isRemote && rand.nextInt(520 - JewelryNBT.numberOfModifiers(item) * 20) == 15) player.setPositionAndUpdate(player.posX + rand.nextInt(30) * (rand.nextBoolean() ? -1 : 1), player.posY, player.posZ + rand.nextInt(30) * (rand.nextBoolean() ? -1 : 1));
+ // Negative ring
+ if (jewelry instanceof ItemRing && exists) Minecraft.getMinecraft().gameSettings.setOptionFloatValue(Options.RENDER_DISTANCE, 2.2F - JewelryNBT.numberOfModifiers(item) * 0.1F);
+ // Positive ring
+ if (jewelry instanceof ItemRing && exists && rand.nextInt(180 + JewelryNBT.numberOfModifiers(item)*20) == 12){
for(int i = (int)player.posX - 2; i <= (int)player.posX + 2; i++)
for(int j = (int)player.posY - 2; j <= (int)player.posY + 2; j++)
for(int k = (int)player.posZ - 2; k <= (int)player.posZ + 2; k++)
- if(player.worldObj.getBlock(i, j, k) instanceof BlockOre)
- player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GRAY + "You sense some " + player.worldObj.getBlock(i, j, k).getLocalizedName() + " around you."));
+ if (player.worldObj.getBlock(i, j, k) instanceof BlockOre) player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GRAY + "You sense some " + player.worldObj.getBlock(i, j, k).getLocalizedName() + " around you."));
}
}
@Override
public void onPlayerAttacked(ItemStack item, EntityPlayer player, DamageSource source, Item jewelry, float amount)
{
- int pos = JewelryNBT.doesModifierExist(item, modifier);
- if (jewelry instanceof ItemNecklace && pos != -1 && !player.worldObj.isRemote) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 1));
+ boolean exists = JewelryNBT.doesModifierExist(item, modifier);
+ // Negative necklace
+ if (jewelry instanceof ItemNecklace && exists && !player.worldObj.isRemote) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 100 + JewelryNBT.numberOfModifiers(item)*30, 1));
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java b/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java
index 2acaf76..512a25b 100644
--- a/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java
+++ b/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java
@@ -3,12 +3,15 @@ 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.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.DamageSource;
@@ -20,6 +23,7 @@ import darkknight.jewelrycraft.item.ItemNecklace;
import darkknight.jewelrycraft.item.ItemRing;
import darkknight.jewelrycraft.util.JewelryNBT;
import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
public class EffectFeather extends ModifierEffects
{
@@ -31,39 +35,42 @@ public class EffectFeather extends ModifierEffects
@Override
public void action(ItemStack item, EntityPlayer player, Item jewelry)
{
- int pos = JewelryNBT.doesModifierExist(item, modifier);
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ boolean exists = JewelryNBT.doesModifierExist(item, modifier);
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
// Positive earrings
- if (jewelry instanceof ItemEarrings && pos != -1){
+ if (jewelry instanceof ItemEarrings && exists){
AxisAlignedBB axisalignedbb = player.boundingBox.expand(1.0D, 1.0D, 1.0D);
List list = player.worldObj.getEntitiesWithinAABB(EntityArrow.class, axisalignedbb);
if (!player.worldObj.isRemote && list != null && !list.isEmpty()){
Iterator iterator = list.iterator();
while (iterator.hasNext()){
EntityArrow arrow = (EntityArrow)iterator.next();
- if (rand.nextInt(3) == 0 && (arrow.shootingEntity == null || !(arrow.shootingEntity.equals(player)) || arrow.canBePickedUp == 0)) arrow.setDead();
+ if ((arrow.shootingEntity == null || !(arrow.shootingEntity.equals(player)) || arrow.canBePickedUp == 0) && rand.nextInt(2 + JewelryNBT.numberOfModifiers(item)) == 0) arrow.setDead();
}
}
}
- // Positive bracelet
- if (jewelry instanceof ItemBracelet && pos != -1){
- if (player.motionY < 0) player.motionY *= 0.6D;
- player.setAIMoveSpeed(player.getAIMoveSpeed() / 2);
- player.fallDistance = 0F;
+ if (jewelry instanceof ItemBracelet && exists){
+ // Positive bracelet
+ if (player.motionY < 0) player.motionY *= (0.6D + (JewelryNBT.numberOfModifiers(item) - 1) * 0.03D);
+ if (rand.nextInt(JewelryNBT.numberOfModifiers(item)) == 0) player.fallDistance = 0F;
+ // Negative bracelet
+ if (!player.isPotionActive(Potion.moveSlowdown) || player.getActivePotionEffect(Potion.moveSlowdown).getDuration() < 30) player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 80 + JewelryNBT.numberOfModifiers(item) * 10, 1 + JewelryNBT.numberOfModifiers(item) / 4));
}
}
@Override
public void onEntityAttacked(ItemStack item, EntityPlayer player, Entity target, Item jewelry, float amount)
{
- int pos = JewelryNBT.doesModifierExist(item, modifier);
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ boolean exists = JewelryNBT.doesModifierExist(item, modifier);
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
NBTTagCompound enemyData = target.getEntityData();
- if (jewelry instanceof ItemRing && pos != -1 && enemyData.getInteger("reAttacked") == 0){
+ if (jewelry instanceof ItemRing && exists && enemyData.getInteger("reAttacked") == 0){
+ // Negative ring
enemyData.setInteger("reAttacked", enemyData.getInteger("reAttacked") + 1);
- target.attackEntityFrom(DamageSource.causePlayerDamage(player), amount / 2F);
+ target.attackEntityFrom(DamageSource.causePlayerDamage(player), amount / (2F + (JewelryNBT.numberOfModifiers(item)-1)*0.1F));
+ // Positive ring
if (rand.nextInt(2) == 0){
- enemyData.setInteger("stunTime", 50);
+ enemyData.setInteger("stunTime", 51 - JewelryNBT.numberOfModifiers(item));
enemyData.setBoolean("stunned", true);
}
playerInfo.setBoolean("weakDamage", true);
@@ -74,15 +81,16 @@ public class EffectFeather extends ModifierEffects
@Override
public void onPlayerAttacked(ItemStack item, EntityPlayer player, DamageSource source, Item jewelry, float amount)
{
- int pos = JewelryNBT.doesModifierExist(item, modifier);
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
- if (jewelry instanceof ItemNecklace && pos != -1 && rand.nextInt(4) == 0 && source != DamageSourceList.weak && source != DamageSource.inFire && source != DamageSource.onFire && source != DamageSource.lava){
+ boolean exists = JewelryNBT.doesModifierExist(item, modifier);
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
+ // Positive necklace
+ if (jewelry instanceof ItemNecklace && exists && rand.nextInt(3 + JewelryNBT.numberOfModifiers(item)) == 0 && source != DamageSourceList.weak && source != DamageSource.inFire && source != DamageSource.onFire && source != DamageSource.lava){
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GRAY + "The necklace protected you from taking damage!"));
playerInfo.setBoolean("negateDamage", true);
}
// Negative necklace
- if (jewelry instanceof ItemNecklace && pos != -1 && (source == DamageSource.inFire || source == DamageSource.onFire || source == DamageSource.lava) && source != DamageSourceList.weak) player.attackEntityFrom(DamageSourceList.weak, amount * 3F);
+ if (jewelry instanceof ItemNecklace && exists && (source == DamageSource.inFire || source == DamageSource.onFire || source == DamageSource.lava) && source != DamageSourceList.weak) player.attackEntityFrom(DamageSourceList.weak, amount * (3F + (JewelryNBT.numberOfModifiers(item) - 1)*0.1F));
// Negative earrings
- if (jewelry instanceof ItemEarrings && pos != -1 && source.damageType.equals("arrow") && source != DamageSourceList.weak) player.attackEntityFrom(DamageSourceList.weak, amount * 2F);
+ if (jewelry instanceof ItemEarrings && exists && source.damageType.equals("arrow") && source != DamageSourceList.weak) player.attackEntityFrom(DamageSourceList.weak, amount * (2F + (JewelryNBT.numberOfModifiers(item) - 1)*0.1F));
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/entities/EntityHalfHeart.java b/src/main/java/darkknight/jewelrycraft/entities/EntityHalfHeart.java
index 4fc1e39..4fad309 100644
--- a/src/main/java/darkknight/jewelrycraft/entities/EntityHalfHeart.java
+++ b/src/main/java/darkknight/jewelrycraft/entities/EntityHalfHeart.java
@@ -12,6 +12,7 @@ import net.minecraft.world.World;
import darkknight.jewelrycraft.JewelrycraftMod;
import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
/**
* @author Sorin
@@ -27,7 +28,7 @@ public class EntityHalfHeart extends EntityHeart
public void onCollideWithPlayer(EntityPlayer player)
{
if (!player.worldObj.isRemote){
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
if (getType().equals("Red") && player.getHealth() < player.getMaxHealth()){
player.heal(1f);
this.setDead();
@@ -35,8 +36,8 @@ public class EntityHalfHeart extends EntityHeart
playerInfo.setFloat(getType() + "Heart", 0F);
player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(player.getMaxHealth() + 2f);
this.setDead();
- }else if (!getType().equals("Red") && playerInfo.getFloat(getType() + "Heart") < 20f){
- playerInfo.setFloat(getType() + "Heart", playerInfo.getFloat(getType() + "Heart") + 1.0F <= 20f ? playerInfo.getFloat(getType() + "Heart") + 1.0F : 20f);
+ }else if (!getType().equals("Red")){
+ playerInfo.setFloat(getType() + "Heart", playerInfo.getFloat(getType() + "Heart") + 1.0F);
this.setDead();
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/entities/EntityHeart.java b/src/main/java/darkknight/jewelrycraft/entities/EntityHeart.java
index ebd64e7..899c075 100644
--- a/src/main/java/darkknight/jewelrycraft/entities/EntityHeart.java
+++ b/src/main/java/darkknight/jewelrycraft/entities/EntityHeart.java
@@ -8,6 +8,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import darkknight.jewelrycraft.JewelrycraftMod;
import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
@@ -45,13 +46,13 @@ public class EntityHeart extends EntityLiving
@Override
public void onCollideWithPlayer(EntityPlayer player)
{
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
if (getType() == "Red" && player.getHealth() < player.getMaxHealth()){
player.heal(2f);
this.setDead();
}
- else if (getType() != "Red" && playerInfo.getFloat(getType() + "Heart") < 20f){
- playerInfo.setFloat(getType() + "Heart", playerInfo.getFloat(getType() + "Heart") + 2.0F <= 20f ? playerInfo.getFloat(getType() + "Heart") + 2.0F : 20f);
+ else if (getType() != "Red"){
+ playerInfo.setFloat(getType() + "Heart", playerInfo.getFloat(getType() + "Heart") + 2.0F);
JewelrycraftMod.netWrapper.sendToServer(new PacketRequestPlayerInfo());
this.setDead();
}
diff --git a/src/main/java/darkknight/jewelrycraft/entities/renders/HeartRender.java b/src/main/java/darkknight/jewelrycraft/entities/renders/HeartRender.java
index 6005bb3..f015596 100644
--- a/src/main/java/darkknight/jewelrycraft/entities/renders/HeartRender.java
+++ b/src/main/java/darkknight/jewelrycraft/entities/renders/HeartRender.java
@@ -7,6 +7,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.util.Variables;
/**
* @author Sorin
@@ -33,7 +34,7 @@ public class HeartRender extends RenderLiving
GL11.glRotatef(55F, 1F, 0F, 0F);
String type = entity.getType();
if(type == "" || type == null) type = "Red";
- texture = new ResourceLocation("jewelrycraft", "textures/entities/"+type+"Heart.png");
+ texture = new ResourceLocation(Variables.MODID, "textures/entities/"+type+"Heart.png");
}
@Override
diff --git a/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java b/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java
index f9cbd19..f9152a7 100644
--- a/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java
+++ b/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java
@@ -48,7 +48,6 @@ import darkknight.jewelrycraft.entities.EntityHeart;
import darkknight.jewelrycraft.item.ItemBaseJewelry;
import darkknight.jewelrycraft.item.ItemBracelet;
import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.lib.Reference;
import darkknight.jewelrycraft.network.PacketClearColorCache;
import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
import darkknight.jewelrycraft.network.PacketSendCurseStats;
@@ -57,6 +56,7 @@ 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;
/**
* Code taken from OpenBlocks
@@ -74,7 +74,7 @@ public class EntityEventHandler
final Entity entity = event.entity;
if (!event.world.isRemote && entity instanceof EntityPlayer){
EntityPlayer player = (EntityPlayer)entity;
- NBTTagCompound persistTag = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound persistTag = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
boolean shouldGiveManual = ItemList.guide != null && !persistTag.getBoolean("givenGuide");
if (shouldGiveManual){
ItemStack manual = new ItemStack(ItemList.guide);
@@ -108,7 +108,7 @@ public class EntityEventHandler
}
if (entity instanceof EntityPlayer){
EntityPlayer player = (EntityPlayer)entity;
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
playerInfo.setBoolean("fancyRender", JewelrycraftMod.fancyRender);
if (playerInfo.getBoolean("stunned") && playerInfo.getInteger("stunTime") > 0){
player.motionX *= 0D;
@@ -124,7 +124,7 @@ public class EntityEventHandler
if (playerInfo.hasKey("ext" + i)){
NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- ((ItemBaseJewelry)item.getItem()).action(item, player);
+ if(item != null) ((ItemBaseJewelry)item.getItem()).action(item, player);
}
if (!player.worldObj.isRemote){
if (playerInfo.hasKey("reselectCurses") && !playerInfo.getBoolean("reselectCurses")){
@@ -133,7 +133,7 @@ public class EntityEventHandler
}
if (playerInfo.hasKey("playerCursePointsChanged") && playerInfo.getBoolean("playerCursePointsChanged")){
int points = playerInfo.getInteger("cursePoints");
- for(int i = 1; i <= JewelrycraftMod.MAX_CURSES; i++)
+ for(int i = 1; i <= Variables.MAX_CURSES; i++)
if (points > (i - 1) * 1750) addCurse(player, playerInfo, i);
if (!playerInfo.hasKey("curseTime") || !playerInfo.hasKey("reselectCurses") || playerInfo.getBoolean("reselectCurses")){
playerInfo.setInteger("curseTime", 23000);
@@ -161,7 +161,7 @@ public class EntityEventHandler
Entity entity = event.entityLiving;
if (entity instanceof EntityPlayer && !(event.source.getEntity() instanceof EntityPlayer)){
EntityPlayer player = (EntityPlayer)entity;
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ 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)){
@@ -220,7 +220,7 @@ public class EntityEventHandler
if (playerInfo.getInteger(curse.getName()) > 0) curse.attackedAction(player.worldObj, player);
}else if (event.source.getEntity() instanceof EntityPlayer){
EntityPlayer player = (EntityPlayer)event.source.getEntity();
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
for(int i = 0; i < 18; i++)
if (playerInfo.hasKey("ext" + i)){
NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
@@ -249,10 +249,10 @@ public class EntityEventHandler
{
EntityPlayer player = event.entityPlayer;
if (!player.worldObj.isRemote){
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
- if (playerInfo.hasKey("cursePoints") && playerInfo.getInteger("cursePoints") > 0){
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
+ if (playerInfo.hasKey("cursePoints")){
int points = playerInfo.getInteger("cursePoints");
- for(int i = 1; i <= JewelrycraftMod.MAX_CURSES; i++)
+ for(int i = 1; i <= Variables.MAX_CURSES; i++)
if (points > (i - 1) * 1750) addCurse(player, playerInfo, i);
if (!playerInfo.hasKey("curseTime") || !playerInfo.hasKey("reselectCurses") || playerInfo.getBoolean("reselectCurses")){
playerInfo.setInteger("curseTime", 23000);
@@ -298,7 +298,7 @@ public class EntityEventHandler
@SubscribeEvent
public void itemToss(ItemTossEvent event)
{
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(event.player, "Jewelrycraft");
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(event.player, Variables.MODID);
for(Curse curse: Curse.getCurseList())
if (playerInfo.getInteger(curse.getName()) > 0 && curse.itemToss()){
EntityItem entityitem = new EntityItem(event.player.worldObj, event.player.posX + 0.5D, event.player.posY + 0.5D, event.player.posZ + 0.5D, event.entityItem.getEntityItem());
@@ -354,7 +354,7 @@ public class EntityEventHandler
}
if (entity instanceof EntityPlayer){
EntityPlayer player = (EntityPlayer)entity;
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
playerInfo.setFloat("BlueHeart", 0f);
playerInfo.setFloat("BlackHeart", 0f);
playerInfo.setFloat("WhiteHeart", 0f);
@@ -381,8 +381,8 @@ public class EntityEventHandler
public void onWorldLoad(WorldEvent.Load event)
{
if (!event.world.isRemote){
- new File(JewelrycraftMod.dir + File.separator + "Jewelrycraft").mkdirs();
- JewelrycraftMod.liquidsConf = new File(JewelrycraftMod.dir + File.separator + "Jewelrycraft", "JLP" + event.world.getWorldInfo().getWorldName() + ".cfg");
+ new File(JewelrycraftMod.dir + File.separator + Variables.MODID).mkdirs();
+ JewelrycraftMod.liquidsConf = new File(JewelrycraftMod.dir + File.separator + Variables.MODID, "JLP" + event.world.getWorldInfo().getWorldName() + ".cfg");
try{
if (!JewelrycraftMod.liquidsConf.exists()) JewelrycraftMod.liquidsConf.createNewFile();
}
@@ -427,7 +427,7 @@ public class EntityEventHandler
{
if (event.entity instanceof EntityPlayer){
EntityPlayer player = (EntityPlayer)event.entity;
- NBTTagCompound persistTag = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound persistTag = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
if (persistTag.getBoolean("nearStartedRitual")){
event.red = 0f;
event.green = 0f;
@@ -454,7 +454,7 @@ public class EntityEventHandler
{
if (event.entity instanceof EntityPlayer){
EntityPlayer player = (EntityPlayer)event.entity;
- NBTTagCompound persistTag = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound persistTag = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
if (persistTag.getBoolean("nearStartedRitual")){
GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_EXP);
GL11.glFogf(GL11.GL_FOG_DENSITY, 0.6F);
diff --git a/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java b/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java
index a032047..948a422 100644
--- a/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java
+++ b/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java
@@ -7,11 +7,12 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.InputEvent;
import darkknight.jewelrycraft.JewelrycraftMod;
import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.util.Variables;
public class KeyBindings
{
- public static KeyBinding render = new KeyBinding("Pretty Render", Keyboard.KEY_Z, "Jewelrycraft");
- public static KeyBinding inventory = new KeyBinding("Jewelry Inventory", Keyboard.KEY_J, "Jewelrycraft");
+ public static KeyBinding render = new KeyBinding("Pretty Render", Keyboard.KEY_Z, Variables.MODNAME);
+ public static KeyBinding inventory = new KeyBinding("Jewelry Inventory", Keyboard.KEY_J, Variables.MODNAME);
/**
*
diff --git a/src/main/java/darkknight/jewelrycraft/events/PlayerRenderHandler.java b/src/main/java/darkknight/jewelrycraft/events/PlayerRenderHandler.java
index d85620a..146b7d6 100644
--- a/src/main/java/darkknight/jewelrycraft/events/PlayerRenderHandler.java
+++ b/src/main/java/darkknight/jewelrycraft/events/PlayerRenderHandler.java
@@ -1,40 +1,43 @@
package darkknight.jewelrycraft.events;
-import java.util.ArrayList;
import java.util.Iterator;
-import java.util.List;
import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.server.MinecraftServer;
+import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.lib.Reference;
-import darkknight.jewelrycraft.model.ModelMask;
-import darkknight.jewelrycraft.tileentity.renders.MaskRender;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.item.render.MaskRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
public class PlayerRenderHandler
{
- ModelMask maskModel = new ModelMask();
MaskRender mask = new MaskRender();
-
- public static String[] infamyCache = new String[] {};
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static String[] infamyCache = new String[]{};
@SubscribeEvent
public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- if (infamyCache != null)
- {
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
-
- while(players.hasNext())
- {
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (infamyCache != null){
+ while (players.hasNext()){
EntityPlayer player = players.next();
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()))
- {
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
+// System.out.println(event.entityPlayer + " | " + player + " | " + playerInfo);
+ if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
@@ -50,19 +53,71 @@ public class PlayerRenderHandler
mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
GL11.glPopMatrix();
}
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
+ float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
+ float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ GL11.glRotatef(yawOffset, 0, -1, 0);
+ GL11.glRotatef(yaw - 90, 0, 1, 0);
+ GL11.glRotatef(pitch, 0, 0, -1);
+ GL11.glRotatef(90F, 0, 1F, 0F);
+ RenderHelper.translateToHeadLevel(player);
+ GL11.glScalef(0.07f, 0.07f, 0.07f);
+ GL11.glTranslatef(0.0F, 3.0F, -2.0F);
+ int gemColor = -1;
+ int ingotColor = -1;
+ if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
+ GL11.glPopMatrix();
+ }
+ 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);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
+ if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
+ if (i / 12 == 1){
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
+ GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
+ GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
+ int gemColor = -1;
+ int ingotColor = -1;
+ if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
+ bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
+ }else{
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
+ GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
+ GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
+ int gemColor = -1;
+ int ingotColor = -1;
+ if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
+ bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
+ }
+ GL11.glPopMatrix();
+ }
}
}
}
-
+
/**
* @param string
* @return
*/
private boolean checkPlayerInfamy(String string)
{
- for (int i = 0; i < infamyCache.length; i++)
+ for(int i = 0; i < infamyCache.length; i++)
if (infamyCache[i].equals(string)) return true;
-
return false;
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java b/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java
index 7121f3e..5a7b728 100644
--- a/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java
+++ b/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java
@@ -13,6 +13,7 @@ import net.minecraftforge.event.entity.player.PlayerOpenContainerEvent;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.util.Variables;
public class ScreenHandler extends Gui
{
@@ -20,7 +21,7 @@ public class ScreenHandler extends Gui
public static NBTTagCompound tagCache = null;
public static int cooldown;
static ResourceLocation texture;
- static ResourceLocation hearts = new ResourceLocation("jewelrycraft", "textures/gui/hearts.png");
+ static ResourceLocation hearts = new ResourceLocation(Variables.MODID, "textures/gui/hearts.png");
public ScreenHandler(Minecraft mc, ResourceLocation tex)
{
@@ -32,21 +33,20 @@ public class ScreenHandler extends Gui
@SubscribeEvent
public void renderScreen(RenderGameOverlayEvent event)
{
-// if (event.type != ElementType.TEXT) Gui.drawRect(0, 0, mc.displayWidth, mc.displayHeight, 0xff000000);
if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
int count = 0;
int size = 32;
ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
- mc.renderEngine.bindTexture(texture);
+ mc.renderEngine.bindTexture(hearts);
for(Curse curse: Curse.getCurseList()){
if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
- Gui.drawRect(0, (size / 2 + 6) * count, 24 + mc.fontRenderer.getStringWidth(curse.getName().split(":")[1]), 4 + (size / 2 + 6) * count + 16, 0xaf000000);
- Gui.drawRect(2, 2 + (size / 2 + 6) * count, 22 + mc.fontRenderer.getStringWidth(curse.getName().split(":")[1]), 2 + (size / 2 + 6) * count + 16, 0x95700064);
+ drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
count++;
}
}
+ mc.renderEngine.bindTexture(texture);
count = 0;
for(Curse curse: Curse.getCurseList())
if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
@@ -54,8 +54,8 @@ public class ScreenHandler extends Gui
GL11.glPushMatrix();
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(GL11.GL_LIGHTING);
- GL11.glScalef(0.5f, 0.5f, 0.0f);
- drawTexturedModalRect(4, 4 + (size + 12) * count, tag % size * size, tag / size * size, size, size);
+ GL11.glScalef(0.45f, 0.45f, 0.0f);
+ drawTexturedModalRect(28, 18 + (size + 26) * count, tag % size * size, tag / size * size, size, size);
GL11.glPopMatrix();
count++;
}
@@ -64,14 +64,14 @@ public class ScreenHandler extends Gui
for(Curse curse: Curse.getCurseList())
if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
int tag = curse.getID();
- mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 20, 7 + (size + 6) * count, 16777215);
+ mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
if (tagCache.getInteger(curse.getName()) == 2){
mc.renderEngine.bindTexture(hearts);
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1f, 1f, 1f, 0.5f);
- drawTexturedModalRect(15 + mc.fontRenderer.getStringWidth(curse.getName().split(":")[1]), 8 + (size + 6) * count, 3 * size, 0, size, size);
+ drawTexturedModalRect(95, 7 + (size + 10) * count, 3 * size, 0, size, size);
GL11.glPopMatrix();
}
count++;
@@ -83,19 +83,19 @@ public class ScreenHandler extends Gui
count = 0;
size = 16;
if (tagCache.getFloat("BlueHeart") > 0){
- for(int i = 0; i < (int)tagCache.getFloat("BlueHeart") / 2; i++)
- drawTexturedModalRect(2 + 13 * i, resolution.getScaledHeight() / 2 - 25 + 16 * count, 0 * size, 0 * size, size, size);
- if (tagCache.getFloat("BlueHeart") % 2 != 0) drawTexturedModalRect(2 + 13 * ((int)tagCache.getFloat("BlueHeart") / 2), resolution.getScaledHeight() / 2 - 25 + 16 * count, 0 * size, 1 * size, size, size);
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 0 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
}
count++;
+ mc.renderEngine.bindTexture(hearts);
if (tagCache.getFloat("BlackHeart") > 0){
- for(int i = 0; i < MathHelper.ceiling_float_int((tagCache.getFloat("BlackHeart")) / 2.0F); i++)
- drawTexturedModalRect(2 + 13 * i, resolution.getScaledHeight() / 2 - 25 + 16 * count, 1 * size, 0 * size, size, size);
- if (tagCache.getFloat("BlackHeart") % 2 != 0) drawTexturedModalRect(2 + 13 * ((int)tagCache.getFloat("BlackHeart") / 2), resolution.getScaledHeight() / 2 - 25 + 16 * count, 1 * size, 1 * size, size, size);
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 1 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
}
count++;
+ mc.renderEngine.bindTexture(hearts);
if (tagCache.getFloat("WhiteHeart") > 0)
- drawTexturedModalRect(2, resolution.getScaledHeight() / 2 - 25 + 16 * count, 2 * size, 1 * size, size, size);
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 2 * size, 1 * size, size, size);
GL11.glPopMatrix();
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemBracelet.java b/src/main/java/darkknight/jewelrycraft/item/ItemBracelet.java
index b754186..d5c7c32 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemBracelet.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemBracelet.java
@@ -4,6 +4,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
public class ItemBracelet extends ItemBaseJewelry
{
@@ -21,8 +22,8 @@ public class ItemBracelet extends ItemBaseJewelry
@Override
public void registerIcons(IIconRegister iconRegister)
{
- itemIcon = iconRegister.registerIcon("jewelrycraft:bracelet");
- gem = iconRegister.registerIcon("jewelrycraft:jewelBracelet");
+ itemIcon = iconRegister.registerIcon(Variables.MODID + ":bracelet");
+ gem = iconRegister.registerIcon(Variables.MODID + ":jewelBracelet");
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemClayMolds.java b/src/main/java/darkknight/jewelrycraft/item/ItemClayMolds.java
index 9f99857..efaac51 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemClayMolds.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemClayMolds.java
@@ -9,6 +9,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import darkknight.jewelrycraft.util.Variables;
public class ItemClayMolds extends Item
{
@@ -82,6 +83,6 @@ public class ItemClayMolds extends Item
{
moldsIcons = new IIcon[moldsItemNames.length];
for(int i = 0; i < moldsItemNames.length; ++i)
- moldsIcons[i] = par1IconRegister.registerIcon("jewelrycraft:" + moldsItemNames[i] + getIconString());
+ moldsIcons[i] = par1IconRegister.registerIcon(Variables.MODID + ":" + moldsItemNames[i] + getIconString());
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemCrystal.java b/src/main/java/darkknight/jewelrycraft/item/ItemCrystal.java
index ca6b58d..43e6b5b 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemCrystal.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemCrystal.java
@@ -10,6 +10,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import darkknight.jewelrycraft.util.Variables;
public class ItemCrystal extends Item
{
@@ -32,8 +33,8 @@ public class ItemCrystal extends Item
@Override
public void registerIcons(IIconRegister iconRegister)
{
- itemIcon = iconRegister.registerIcon("jewelrycraft:crystal");
- overlay = iconRegister.registerIcon("jewelrycraft:crystalOverlay");
+ itemIcon = iconRegister.registerIcon(Variables.MODID + ":crystal");
+ overlay = iconRegister.registerIcon(Variables.MODID + ":crystalOverlay");
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemEarrings.java b/src/main/java/darkknight/jewelrycraft/item/ItemEarrings.java
index 2321df0..d263ea8 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemEarrings.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemEarrings.java
@@ -4,6 +4,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
public class ItemEarrings extends ItemBaseJewelry
{
@@ -21,8 +22,8 @@ public class ItemEarrings extends ItemBaseJewelry
@Override
public void registerIcons(IIconRegister iconRegister)
{
- itemIcon = iconRegister.registerIcon("jewelrycraft:earrings");
- gem = iconRegister.registerIcon("jewelrycraft:jewelEarrings");
+ itemIcon = iconRegister.registerIcon(Variables.MODID + ":earrings");
+ gem = iconRegister.registerIcon(Variables.MODID + ":jewelEarrings");
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemGuide.java b/src/main/java/darkknight/jewelrycraft/item/ItemGuide.java
index ed85dc4..28d0c76 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemGuide.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemGuide.java
@@ -8,21 +8,11 @@ import darkknight.jewelrycraft.JewelrycraftMod;
public class ItemGuide extends Item
{
-
- /**
- *
- */
public ItemGuide()
{
super();
}
- /**
- * @param stack
- * @param world
- * @param player
- * @return
- */
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemJewelryModifier.java b/src/main/java/darkknight/jewelrycraft/item/ItemJewelryModifier.java
new file mode 100644
index 0000000..0ffed2c
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemJewelryModifier.java
@@ -0,0 +1,23 @@
+package darkknight.jewelrycraft.item;
+
+import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import darkknight.jewelrycraft.JewelrycraftMod;
+
+public class ItemJewelryModifier extends Item
+{
+ public ItemJewelryModifier()
+ {
+ super();
+ }
+
+ @Override
+ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
+ {
+ if (!world.isRemote && player.capabilities.isCreativeMode) player.openGui(JewelrycraftMod.instance, 3, world, 0, 0, 0);
+ return stack;
+ }
+} \ No newline at end of file
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemList.java b/src/main/java/darkknight/jewelrycraft/item/ItemList.java
index b9acd96..f14d9fc 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemList.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemList.java
@@ -4,6 +4,7 @@ import net.minecraft.item.Item;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.util.Variables;
public class ItemList
{
@@ -17,6 +18,7 @@ public class ItemList
public static ItemBracelet bracelet;
public static ItemEarrings earrings;
public static Item guide;
+ public static Item jewelryModifier;
public static ItemMoltenMetalBucket bucket;
public static ItemMoltenMetal metal;
private static boolean isInitialized = false;
@@ -27,18 +29,19 @@ public class ItemList
public static void preInit(FMLPreInitializationEvent e)
{
if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName("Jewelrycraft.thiefGloves").setTextureName("jewelrycraft:thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName("Jewelrycraft.ingotShadow").setTextureName("jewelrycraft:ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName("Jewelrycraft.mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName("Jewelrycraft.mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName("Jewelrycraft.ring").setTextureName("jewelrycraft:ring");
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName("Jewelrycraft.necklace").setTextureName("jewelrycraft:necklace");
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName("Jewelrycraft.bracelet").setTextureName("jewelrycraft:bracelet");
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName("Jewelrycraft.earrings").setTextureName("jewelrycraft:earrings");
- crystal = new ItemCrystal().setUnlocalizedName("Jewelrycraft.crystal").setTextureName("jewelrycraft:crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName("Jewelrycraft.guide").setTextureName("jewelrycraft:guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName("Jewelrycraft.bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName("Jewelrycraft.bucket");
+ thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
+ metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
+ jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
GameRegistry.registerItem(thiefGloves, "thiefGloves");
GameRegistry.registerItem(shadowIngot, "shadowIngot");
GameRegistry.registerItem(molds, "molds");
@@ -51,6 +54,7 @@ public class ItemList
GameRegistry.registerItem(guide, "guide");
GameRegistry.registerItem(bucket, "moltenMetalBucket");
GameRegistry.registerItem(metal, "moltenMetal");
+ GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
isInitialized = true;
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemMolds.java b/src/main/java/darkknight/jewelrycraft/item/ItemMolds.java
index 106fcbe..42daa65 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemMolds.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemMolds.java
@@ -9,6 +9,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import darkknight.jewelrycraft.util.Variables;
public class ItemMolds extends Item
{
@@ -82,6 +83,6 @@ public class ItemMolds extends Item
{
moldsIcons = new IIcon[moldsItemNames.length];
for(int i = 0; i < moldsItemNames.length; ++i)
- moldsIcons[i] = par1IconRegister.registerIcon("jewelrycraft:" + moldsItemNames[i] + getIconString());
+ moldsIcons[i] = par1IconRegister.registerIcon(Variables.MODID + ":" + moldsItemNames[i] + getIconString());
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java b/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java
index 0638da7..29e678f 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java
@@ -18,6 +18,7 @@ import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
public class ItemMoltenMetal extends Item
{
@@ -37,7 +38,7 @@ public class ItemMoltenMetal extends Item
@Override
public void registerIcons(IIconRegister iconRegister)
{
- itemIcon = iconRegister.registerIcon("jewelrycraft:moltenMetalStill");
+ itemIcon = iconRegister.registerIcon(Variables.MODID + ":moltenMetalStill");
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java b/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java
index 9365224..4fe0bd2 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java
@@ -22,6 +22,7 @@ import darkknight.jewelrycraft.JewelrycraftMod;
import darkknight.jewelrycraft.block.BlockList;
import darkknight.jewelrycraft.network.PacketSendLiquidData;
import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
public class ItemMoltenMetalBucket extends Item
{
@@ -142,7 +143,7 @@ public class ItemMoltenMetalBucket extends Item
public void registerIcons(IIconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon("bucket_empty");
- liquid = iconRegister.registerIcon("jewelrycraft:bucketOverlay");
+ liquid = iconRegister.registerIcon(Variables.MODID + ":bucketOverlay");
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemNecklace.java b/src/main/java/darkknight/jewelrycraft/item/ItemNecklace.java
index 9668589..a0c16f0 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemNecklace.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemNecklace.java
@@ -4,6 +4,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
public class ItemNecklace extends ItemBaseJewelry
{
@@ -21,8 +22,8 @@ public class ItemNecklace extends ItemBaseJewelry
@Override
public void registerIcons(IIconRegister iconRegister)
{
- itemIcon = iconRegister.registerIcon("jewelrycraft:necklace");
- gem = iconRegister.registerIcon("jewelrycraft:jewelNecklace");
+ itemIcon = iconRegister.registerIcon(Variables.MODID + ":necklace");
+ gem = iconRegister.registerIcon(Variables.MODID + ":jewelNecklace");
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemRing.java b/src/main/java/darkknight/jewelrycraft/item/ItemRing.java
index 4472324..d250017 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemRing.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemRing.java
@@ -4,6 +4,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
public class ItemRing extends ItemBaseJewelry
{
@@ -21,8 +22,8 @@ public class ItemRing extends ItemBaseJewelry
@Override
public void registerIcons(IIconRegister iconRegister)
{
- itemIcon = iconRegister.registerIcon("jewelrycraft:ring");
- gem = iconRegister.registerIcon("jewelrycraft:jewelRing");
+ itemIcon = iconRegister.registerIcon(Variables.MODID + ":ring");
+ gem = iconRegister.registerIcon(Variables.MODID + ":jewelRing");
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemThiefGloves.java b/src/main/java/darkknight/jewelrycraft/item/ItemThiefGloves.java
index e9cbeca..1a99cf8 100644
--- a/src/main/java/darkknight/jewelrycraft/item/ItemThiefGloves.java
+++ b/src/main/java/darkknight/jewelrycraft/item/ItemThiefGloves.java
@@ -86,7 +86,7 @@ public class ItemThiefGloves extends Item
s.setTagCompound(recipe.getItemToSell().getTagCompound());
if (player.inventory.addItemStackToInventory(s)) ;
else villager.entityDropItem(s, 0);
- JewelrycraftUtil.addCursePoints(player, 5);
+ if (!player.capabilities.isCreativeMode) JewelrycraftUtil.addCursePoints(player, 5);
player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + ": Hmmm... I seem to have lost my " + s.getDisplayName() + "!"));
stack.damageItem(1, player);
}
@@ -99,7 +99,7 @@ public class ItemThiefGloves extends Item
player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "dwell on."));
}else{
stack.damageItem(1, player);
- JewelrycraftUtil.addCursePoints(player, 25);
+ if (!player.capabilities.isCreativeMode) JewelrycraftUtil.addCursePoints(player, 25);
if (player.isPotionActive(Potion.invisibility)){
player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " sensed a strange presence around him, making him cling on to his items. You didn't get anything."));
}
diff --git a/src/main/java/darkknight/jewelrycraft/item/render/BraceletRender.java b/src/main/java/darkknight/jewelrycraft/item/render/BraceletRender.java
new file mode 100644
index 0000000..15b6be4
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/item/render/BraceletRender.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.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.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);
+ bracelet.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/EarringsRender.java b/src/main/java/darkknight/jewelrycraft/item/render/EarringsRender.java
new file mode 100644
index 0000000..56aabd5
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/item/render/EarringsRender.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.ModelEarrings;
+import darkknight.jewelrycraft.util.Variables;
+
+public class EarringsRender extends TileEntitySpecialRenderer
+{
+ ModelEarrings earrings = new ModelEarrings();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Earrings.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);
+ earrings.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/tileentity/renders/ItemRender.java b/src/main/java/darkknight/jewelrycraft/item/render/ItemRender.java
index 31e5676..144b2af 100644
--- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/ItemRender.java
+++ b/src/main/java/darkknight/jewelrycraft/item/render/ItemRender.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.tileentity.renders;
+package darkknight.jewelrycraft.item.render;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/MaskRender.java b/src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java
index 1e26107..5c54002 100644
--- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/MaskRender.java
+++ b/src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.tileentity.renders;
+package darkknight.jewelrycraft.item.render;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
@@ -9,11 +9,12 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import darkknight.jewelrycraft.model.ModelMask;
import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.util.Variables;
public class MaskRender extends TileEntitySpecialRenderer
{
ModelMask mask = new ModelMask();
- ResourceLocation texture = new ResourceLocation("jewelrycraft", "textures/entities/Mask.png");
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Mask.png");
@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
diff --git a/src/main/java/darkknight/jewelrycraft/lib/Reference.java b/src/main/java/darkknight/jewelrycraft/lib/Reference.java
deleted file mode 100644
index 03dac51..0000000
--- a/src/main/java/darkknight/jewelrycraft/lib/Reference.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package darkknight.jewelrycraft.lib;
-
-public class Reference
-{
- public static final String MODID = "Jewelrycraft";
- public static final String MODNAME = "Jewelrycraft";
- public static final String VERSION = "2.0";
- public static final String PACKET_CHANNEL = "Jewelrycraft";
-}
diff --git a/src/main/java/darkknight/jewelrycraft/model/ModelBracelet.java b/src/main/java/darkknight/jewelrycraft/model/ModelBracelet.java
new file mode 100644
index 0000000..b8e8da2
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/model/ModelBracelet.java
@@ -0,0 +1,184 @@
+package darkknight.jewelrycraft.model;
+
+import java.awt.Color;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * ModelBiped - Either Mojang or a mod author Created using Tabula 4.1.1
+ */
+public class ModelBracelet extends ModelBase
+{
+ public ModelRenderer metal1;
+ public ModelRenderer metal2;
+ public ModelRenderer metal3;
+ public ModelRenderer metal4;
+ public ModelRenderer gem1;
+ public ModelRenderer gem2;
+ public ModelRenderer gem3;
+ public ModelRenderer gem4;
+ public ModelRenderer gem5;
+ public ModelRenderer gem6;
+ public ModelRenderer gem7;
+ public ModelRenderer gem8;
+ public ModelRenderer gem9;
+
+ public ModelBracelet()
+ {
+ this.textureWidth = 16;
+ this.textureHeight = 16;
+ this.metal4 = new ModelRenderer(this, 0, 8);
+ this.metal4.setRotationPoint(-5.0F, 12.0F, -2.0F);
+ this.metal4.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem4 = new ModelRenderer(this, 0, 0);
+ this.gem4.setRotationPoint(-3.0F, 12.8F, -3.5F);
+ this.gem4.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.setRotateAngle(gem4, 0.0F, 0.008901179185171082F, 0.0F);
+ this.gem3 = new ModelRenderer(this, 0, 0);
+ this.gem3.setRotationPoint(-4.8F, 12.2F, -3.5F);
+ this.gem3.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem2 = new ModelRenderer(this, 0, 0);
+ this.gem2.setRotationPoint(-1.5F, 12.8F, -3.5F);
+ this.gem2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem1 = new ModelRenderer(this, 0, 0);
+ this.gem1.setRotationPoint(0.3F, 12.2F, -3.5F);
+ this.gem1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.metal1 = new ModelRenderer(this, 0, 8);
+ this.metal1.setRotationPoint(-5.0F, 12.0F, -3.0F);
+ this.metal1.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem6 = new ModelRenderer(this, 0, 0);
+ this.gem6.setRotationPoint(-4.3F, 12.7F, -3.5F);
+ this.gem6.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.gem7 = new ModelRenderer(this, 0, 0);
+ this.gem7.setRotationPoint(-3.8F, 12.7F, -3.5F);
+ this.gem7.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem8 = new ModelRenderer(this, 0, 0);
+ this.gem8.setRotationPoint(-0.2F, 12.7F, -3.5F);
+ this.gem8.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.metal2 = new ModelRenderer(this, 0, 8);
+ this.metal2.setRotationPoint(-5.0F, 12.0F, 2.0F);
+ this.metal2.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem5 = new ModelRenderer(this, 0, 0);
+ this.gem5.setRotationPoint(-2.5F, 12.3F, -3.5F);
+ this.gem5.addBox(0.0F, 0.0F, 0.0F, 2, 3, 1, 0.0F);
+ this.metal3 = new ModelRenderer(this, 0, 8);
+ this.metal3.setRotationPoint(0.0F, 12.0F, -2.0F);
+ this.metal3.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem9 = new ModelRenderer(this, 0, 0);
+ this.gem9.setRotationPoint(-0.7F, 12.7F, -3.5F);
+ this.gem9.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.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);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ 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.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.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.5D, 0.5D, 0.5D);
+ 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.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.5D, 0.5D, 0.5D);
+ 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.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.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/ModelEarrings.java b/src/main/java/darkknight/jewelrycraft/model/ModelEarrings.java
new file mode 100644
index 0000000..f983332
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/model/ModelEarrings.java
@@ -0,0 +1,120 @@
+package darkknight.jewelrycraft.model;
+
+import org.lwjgl.opengl.GL11;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelEarrings extends ModelBase
+{
+ // fields
+ ModelRenderer MetalPart00;
+ ModelRenderer MetalPart10;
+ ModelRenderer MetalPart20;
+ ModelRenderer Gem0;
+ ModelRenderer Gem1;
+ ModelRenderer MetalPart01;
+ ModelRenderer MetalPart11;
+ ModelRenderer MetalPart21;
+
+ public ModelEarrings()
+ {
+ textureWidth = 32;
+ textureHeight = 32;
+ MetalPart00 = new ModelRenderer(this, 0, 0);
+ MetalPart00.addBox(0F, 0F, 0F, 1, 3, 1);
+ MetalPart00.setRotationPoint(4F, -4F, 0F);
+ MetalPart00.setTextureSize(32, 32);
+ MetalPart00.mirror = true;
+ setRotation(MetalPart00, 0F, 0F, 0F);
+ MetalPart10 = new ModelRenderer(this, 0, 0);
+ MetalPart10.addBox(0F, 0F, 0F, 1, 1, 1);
+ MetalPart10.setRotationPoint(4F, -3F, -1F);
+ MetalPart10.setTextureSize(32, 32);
+ MetalPart10.mirror = true;
+ setRotation(MetalPart10, 0F, 0F, 0F);
+ MetalPart20 = new ModelRenderer(this, 0, 0);
+ MetalPart20.addBox(0F, 0F, 0F, 1, 1, 1);
+ MetalPart20.setRotationPoint(4F, -3F, 1F);
+ MetalPart20.setTextureSize(32, 32);
+ MetalPart20.mirror = true;
+ setRotation(MetalPart20, 0F, 0F, 0F);
+ Gem0 = new ModelRenderer(this, 5, 0);
+ Gem0.addBox(0F, 0F, 0F, 1, 1, 1);
+ Gem0.setRotationPoint(4.5F, -3F, 0F);
+ Gem0.setTextureSize(32, 32);
+ Gem0.mirror = true;
+ setRotation(Gem0, 0F, 0F, 0F);
+ Gem1 = new ModelRenderer(this, 5, 0);
+ Gem1.addBox(0F, 0F, 0F, 1, 1, 1);
+ Gem1.setRotationPoint(-5.5F, -3F, 0F);
+ Gem1.setTextureSize(32, 32);
+ Gem1.mirror = true;
+ setRotation(Gem1, 0F, 0F, 0F);
+ MetalPart01 = new ModelRenderer(this, 0, 0);
+ MetalPart01.addBox(0F, 0F, 0F, 1, 3, 1);
+ MetalPart01.setRotationPoint(-5F, -4F, 0F);
+ MetalPart01.setTextureSize(32, 32);
+ MetalPart01.mirror = true;
+ setRotation(MetalPart01, 0F, 0F, 0F);
+ MetalPart11 = new ModelRenderer(this, 0, 0);
+ MetalPart11.addBox(0F, 0F, 0F, 1, 1, 1);
+ MetalPart11.setRotationPoint(-5F, -3F, -1F);
+ MetalPart11.setTextureSize(32, 32);
+ MetalPart11.mirror = true;
+ setRotation(MetalPart11, 0F, 0F, 0F);
+ MetalPart21 = new ModelRenderer(this, 0, 0);
+ MetalPart21.addBox(0F, 0F, 0F, 1, 1, 1);
+ MetalPart21.setRotationPoint(-5F, -3F, 1F);
+ MetalPart21.setTextureSize(32, 32);
+ MetalPart21.mirror = true;
+ setRotation(MetalPart21, 0F, 0F, 0F);
+ }
+
+ public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
+ {
+ super.render(entity, f, f1, f2, f3, f4, f5);
+ setRotationAngles(f, f1, f2, f3, f4, f5);
+ GL11.glPushMatrix();
+ 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);
+ MetalPart00.render(f5);
+ MetalPart10.render(f5);
+ MetalPart20.render(f5);
+ MetalPart01.render(f5);
+ MetalPart11.render(f5);
+ MetalPart21.render(f5);
+ }
+ if ((int)f4 != -1){
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ 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);
+ Gem0.render(f5);
+ Gem1.render(f5);
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glPopMatrix();
+ }
+
+ 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);
+ }
+}
diff --git a/src/main/java/darkknight/jewelrycraft/network/PacketRequestPlayerInfo.java b/src/main/java/darkknight/jewelrycraft/network/PacketRequestPlayerInfo.java
index 8491132..e6c7b40 100644
--- a/src/main/java/darkknight/jewelrycraft/network/PacketRequestPlayerInfo.java
+++ b/src/main/java/darkknight/jewelrycraft/network/PacketRequestPlayerInfo.java
@@ -5,6 +5,7 @@ import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
public class PacketRequestPlayerInfo implements IMessage, IMessageHandler<PacketRequestPlayerInfo, IMessage>
{
@@ -23,7 +24,7 @@ public class PacketRequestPlayerInfo implements IMessage, IMessageHandler<Packet
@Override
public IMessage onMessage(PacketRequestPlayerInfo message, MessageContext ctx)
{
- return new PacketSendPlayerInfo(PlayerUtils.getModPlayerPersistTag(ctx.getServerHandler().playerEntity, "Jewelrycraft"));
+ return new PacketSendPlayerInfo(PlayerUtils.getModPlayerPersistTag(ctx.getServerHandler().playerEntity, Variables.MODID));
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/network/PacketRequestSetSlot.java b/src/main/java/darkknight/jewelrycraft/network/PacketRequestSetSlot.java
new file mode 100644
index 0000000..79b92f2
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/network/PacketRequestSetSlot.java
@@ -0,0 +1,64 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.network;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import io.netty.buffer.ByteBuf;
+import cpw.mods.fml.common.network.ByteBufUtils;
+import cpw.mods.fml.common.network.simpleimpl.IMessage;
+import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
+import cpw.mods.fml.common.network.simpleimpl.MessageContext;
+import darkknight.jewelrycraft.client.gui.container.ContainerJewelryModifier;
+import darkknight.jewelrycraft.client.gui.container.ContainerJewelryTab;
+
+/**
+ * @author Sorin
+ *
+ */
+public class PacketRequestSetSlot implements IMessage, IMessageHandler<PacketRequestSetSlot, IMessage>
+{
+ ItemStack stack;
+
+ public PacketRequestSetSlot()
+ {}
+
+ public PacketRequestSetSlot(ItemStack stack)
+ {
+ this.stack = stack;
+ }
+
+ /**
+ * @param message
+ * @param ctx
+ * @return
+ */
+ @Override
+ public IMessage onMessage(PacketRequestSetSlot message, MessageContext ctx)
+ {
+ if (ctx.getServerHandler().playerEntity.openContainer instanceof ContainerJewelryModifier)
+ {
+ ((ContainerJewelryModifier)ctx.getServerHandler().playerEntity.openContainer).modInv.setInventorySlotContents(36, message.stack);
+ }
+ return null;
+ }
+
+ /**
+ * @param buf
+ */
+ @Override
+ public void fromBytes(ByteBuf buf)
+ {
+ stack = ByteBufUtils.readItemStack(buf);
+ }
+
+ /**
+ * @param buf
+ */
+ @Override
+ public void toBytes(ByteBuf buf)
+ {
+ ByteBufUtils.writeItemStack(buf, stack);
+ }
+}
diff --git a/src/main/java/darkknight/jewelrycraft/network/PacketSendCurseStats.java b/src/main/java/darkknight/jewelrycraft/network/PacketSendCurseStats.java
index 3457235..0559f17 100644
--- a/src/main/java/darkknight/jewelrycraft/network/PacketSendCurseStats.java
+++ b/src/main/java/darkknight/jewelrycraft/network/PacketSendCurseStats.java
@@ -14,8 +14,8 @@ import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import darkknight.jewelrycraft.events.PlayerRenderHandler;
-import darkknight.jewelrycraft.lib.Reference;
import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
/**
* @author Sorin
@@ -63,7 +63,7 @@ public class PacketSendCurseStats implements IMessage, IMessageHandler<PacketSen
while (players.hasNext())
{
EntityPlayer current = players.next();
- if(PlayerUtils.getModPlayerPersistTag(current, "Jewelrycraft").getInteger(Reference.MODNAME + ":" + "Infamy") > 0)
+ if(PlayerUtils.getModPlayerPersistTag(current, Variables.MODID).getInteger(Variables.MODNAME + ":" + "Infamy") > 0)
infamyPlayers = infamyPlayers + (infamyPlayers == "" ? "" : ";") + current.getDisplayName();
}
ByteBufUtils.writeUTF8String(buf, infamyPlayers);
diff --git a/src/main/java/darkknight/jewelrycraft/client/ClientProxy.java b/src/main/java/darkknight/jewelrycraft/proxy/ClientProxy.java
index 9baadcb..08b9b0d 100644
--- a/src/main/java/darkknight/jewelrycraft/client/ClientProxy.java
+++ b/src/main/java/darkknight/jewelrycraft/proxy/ClientProxy.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft.client;
+package darkknight.jewelrycraft.proxy;
import net.minecraft.client.Minecraft;
import net.minecraft.item.Item;
@@ -8,13 +8,16 @@ import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.registry.VillagerRegistry;
-import darkknight.jewelrycraft.CommonProxy;
import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.InventoryTabVanilla;
+import darkknight.jewelrycraft.client.TabJewelry;
+import darkknight.jewelrycraft.client.TabRegistry;
import darkknight.jewelrycraft.entities.EntityHalfHeart;
import darkknight.jewelrycraft.entities.EntityHeart;
import darkknight.jewelrycraft.entities.renders.HeartRender;
import darkknight.jewelrycraft.events.PlayerRenderHandler;
import darkknight.jewelrycraft.events.ScreenHandler;
+import darkknight.jewelrycraft.item.render.ItemRender;
import darkknight.jewelrycraft.model.ModelDisplayer;
import darkknight.jewelrycraft.model.ModelHalfHeart;
import darkknight.jewelrycraft.model.ModelHandPedestal;
@@ -31,7 +34,6 @@ import darkknight.jewelrycraft.tileentity.TileEntityMolder;
import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
-import darkknight.jewelrycraft.tileentity.renders.ItemRender;
import darkknight.jewelrycraft.tileentity.renders.TileEntityDisplayerRender;
import darkknight.jewelrycraft.tileentity.renders.TileEntityHandPedestalRender;
import darkknight.jewelrycraft.tileentity.renders.TileEntityJewelrsCraftingTableRender;
@@ -40,15 +42,16 @@ import darkknight.jewelrycraft.tileentity.renders.TileEntityShadowEyeRender;
import darkknight.jewelrycraft.tileentity.renders.TileEntityShadowHandRender;
import darkknight.jewelrycraft.tileentity.renders.TileEntitySmelterRender;
import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
public class ClientProxy extends CommonProxy
{
@Override
public void preInit()
{
- ResourceLocation pedestalResourceLocation = new ResourceLocation("jewelrycraft", "textures/tileentities/BricksPedestal.png");
+ ResourceLocation pedestalResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(pedestalResourceLocation), pedestalResourceLocation);
- ResourceLocation shadowResourceLocation = new ResourceLocation("jewelrycraft", "textures/tileentities/ShadowHand.png");
+ ResourceLocation shadowResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(shadowResourceLocation), shadowResourceLocation);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmelter.class, new TileEntitySmelterRender());
@@ -66,7 +69,7 @@ public class ClientProxy extends CommonProxy
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowEye), new ItemRender(new TileEntityShadowEyeRender(), new TileEntityShadowEye(), new ModelShadowEye()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.handPedestal), new ItemRender(pedestalRender, new TileEntityHandPedestal(), new ModelHandPedestal(pedestalResourceLocation)));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowHand), new ItemRender(shadowHandRender, new TileEntityShadowHand(), new ModelShadowHand(shadowResourceLocation)));
- VillagerRegistry.instance().registerVillagerSkin(3000, new ResourceLocation("jewelrycraft", "textures/entities/jeweler.png"));
+ VillagerRegistry.instance().registerVillagerSkin(3000, new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png"));
RenderingRegistry.registerEntityRenderingHandler(EntityHeart.class, new HeartRender(new ModelHeart(), 0.25F));
RenderingRegistry.registerEntityRenderingHandler(EntityHalfHeart.class, new HeartRender(new ModelHalfHeart(), 0.25F));
@@ -75,7 +78,7 @@ public class ClientProxy extends CommonProxy
TabRegistry.registerTab(new TabJewelry());
MinecraftForge.EVENT_BUS.register(new TabRegistry());
MinecraftForge.EVENT_BUS.register(new PlayerRenderHandler());
- ResourceLocation jeweleryTexture = new ResourceLocation("jewelrycraft", "textures/gui/curses.png");
+ ResourceLocation jeweleryTexture = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), jeweleryTexture));
}
diff --git a/src/main/java/darkknight/jewelrycraft/CommonProxy.java b/src/main/java/darkknight/jewelrycraft/proxy/CommonProxy.java
index c6fa39f..03ffdf6 100644
--- a/src/main/java/darkknight/jewelrycraft/CommonProxy.java
+++ b/src/main/java/darkknight/jewelrycraft/proxy/CommonProxy.java
@@ -1,4 +1,4 @@
-package darkknight.jewelrycraft;
+package darkknight.jewelrycraft.proxy;
/**
* The Class CommonProxy.
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java
index e02cac2..c6e9da5 100644
--- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java
+++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java
@@ -16,18 +16,18 @@ import darkknight.jewelrycraft.block.BlockHandPedestal;
import darkknight.jewelrycraft.block.BlockList;
import darkknight.jewelrycraft.particles.EntityShadowsFX;
import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
public class TileEntityShadowEye extends TileEntity
{
public int opening, timer, t = 20;
- public boolean active;
+ public boolean active, shouldAddData;
public ArrayList<ItemStack> pedestalItems = new ArrayList<ItemStack>();
- ResourceLocation particleTexture = new ResourceLocation("jewelrycraft", "textures/particle/shadows.png");
+ ResourceLocation particleTexture = new ResourceLocation(Variables.MODID, "textures/particle/shadows.png");
+ public EntityPlayer target;
- /**
- *
- */
public TileEntityShadowEye()
{
opening = 1;
@@ -45,6 +45,7 @@ public class TileEntityShadowEye extends TileEntity
nbt.setInteger("opening", opening);
nbt.setInteger("timer", timer);
nbt.setBoolean("active", active);
+ nbt.setBoolean("shouldAddData", shouldAddData);
}
/**
@@ -57,6 +58,7 @@ public class TileEntityShadowEye extends TileEntity
opening = nbt.getInteger("opening");
timer = nbt.getInteger("timer");
active = nbt.getBoolean("active");
+ shouldAddData = nbt.getBoolean("shouldAddData");
}
/**
@@ -68,6 +70,11 @@ public class TileEntityShadowEye extends TileEntity
super.updateEntity();
boolean valid = isValidStructure(worldObj, xCoord, yCoord, zCoord, blockMetadata);
if (active) timer--;
+ if (active && target != null && this.getDistanceFrom(target.posX, target.posY, target.posZ) > 30D){
+ active = false;
+ timer = -1;
+ shouldAddData = false;
+ }
if (opening == 4 && timer <= 0) active = false;
if (!active && timer <= 0 && opening != 1){
if (t > 0) t--;
@@ -76,7 +83,7 @@ public class TileEntityShadowEye extends TileEntity
t = 20;
}
}
- if (opening == 2 && timer <= 0 && t == 10){
+ if (opening == 2 && timer <= 0 && t == 10 && shouldAddData){
addData(worldObj, xCoord, yCoord, zCoord);
TileEntityHandPedestal target = (TileEntityHandPedestal)worldObj.getTileEntity(xCoord, yCoord - 3, zCoord);
if (target != null && target.getHeldItemStack() != null) JewelryNBT.addModifiers(target.getHeldItemStack(), pedestalItems);
@@ -92,11 +99,11 @@ public class TileEntityShadowEye extends TileEntity
timer = -1;
}
}
- EntityPlayer player1 = worldObj.getClosestPlayer(xCoord, yCoord, zCoord, 7F);
- if (player1 != null){
- NBTTagCompound persistTag = PlayerUtils.getModPlayerPersistTag(player1, "Jewelrycraft");
- persistTag.setBoolean("nearStartedRitual", false);
- }
+ for(Object player: worldObj.getEntitiesWithinAABB(EntityPlayer.class, getRenderBoundingBox().expand(10D, 10D, 10D)))
+ if (player != null){
+ NBTTagCompound persistTag = PlayerUtils.getModPlayerPersistTag((EntityPlayer)player, Variables.MODID);
+ persistTag.setBoolean("nearStartedRitual", false);
+ }
if (active && opening == 4){
float din = 6F;
int i = Minecraft.getMinecraft().gameSettings.particleSetting;
@@ -105,11 +112,11 @@ public class TileEntityShadowEye extends TileEntity
if (x * x + z * z >= din * din - 1 && x * x + z * z <= din * din + 1) Minecraft.getMinecraft().effectRenderer.addEffect(new EntityShadowsFX(worldObj, xCoord + x + 0.5F, yCoord - 0.5F, zCoord + z + 0.5F, 15F, 0.04F - 0.01F * i, particleTexture));
for(int l = 0; l <= 2 - i; l++)
worldObj.spawnParticle("depthsuspend", xCoord + 6.5F - worldObj.rand.nextInt(9) - worldObj.rand.nextFloat(), yCoord - 2F + worldObj.rand.nextFloat(), zCoord + 6.5F - worldObj.rand.nextInt(9) - worldObj.rand.nextFloat(), 0, 0, 0);
- EntityPlayer player = worldObj.getClosestPlayer(xCoord, yCoord, zCoord, 6F);
- if (player != null){
- NBTTagCompound persistTag = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
- persistTag.setBoolean("nearStartedRitual", true);
- }
+ for(Object player: worldObj.getEntitiesWithinAABB(EntityPlayer.class, getRenderBoundingBox().expand(10D, 10D, 10D)))
+ if (player != null){
+ NBTTagCompound persistTag = PlayerUtils.getModPlayerPersistTag((EntityPlayer)player, Variables.MODID);
+ persistTag.setBoolean("nearStartedRitual", true);
+ }
}
}
@@ -247,6 +254,7 @@ public class TileEntityShadowEye extends TileEntity
pedestal.removeHeldItemStack();
pedestal.openHand();
}
+ else if(pedestal != null && target != null) JewelrycraftUtil.addCursePoints(target, 20);
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityDisplayerRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityDisplayerRender.java
index 8cff8bc..ab073fa 100644
--- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityDisplayerRender.java
+++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityDisplayerRender.java
@@ -21,6 +21,7 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import darkknight.jewelrycraft.model.ModelDisplayer;
import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.util.Variables;
public class TileEntityDisplayerRender extends TileEntitySpecialRenderer
{
@@ -60,7 +61,7 @@ public class TileEntityDisplayerRender extends TileEntitySpecialRenderer
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
TileEntityDisplayer disp = (TileEntityDisplayer)te;
- ResourceLocation blockTexture = new ResourceLocation("jewelrycraft", texture);
+ ResourceLocation blockTexture = new ResourceLocation(Variables.MODID, texture);
Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityJewelrsCraftingTableRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityJewelrsCraftingTableRender.java
index 7a8e35b..248ac2e 100644
--- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityJewelrsCraftingTableRender.java
+++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityJewelrsCraftingTableRender.java
@@ -14,6 +14,7 @@ import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import darkknight.jewelrycraft.model.ModelJewlersCraftingBench;
import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
+import darkknight.jewelrycraft.util.Variables;
public class TileEntityJewelrsCraftingTableRender extends TileEntitySpecialRenderer
{
@@ -32,7 +33,7 @@ public class TileEntityJewelrsCraftingTableRender extends TileEntitySpecialRende
{
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
- ResourceLocation blockTexture = new ResourceLocation("jewelrycraft", texture);
+ ResourceLocation blockTexture = new ResourceLocation(Variables.MODID, texture);
Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
TileEntityJewelrsCraftingTable jt = (TileEntityJewelrsCraftingTable)te;
GL11.glPushMatrix();
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java
index 9685e2e..f54b175 100644
--- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java
+++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java
@@ -21,6 +21,7 @@ import darkknight.jewelrycraft.item.ItemList;
import darkknight.jewelrycraft.model.ModelMolder;
import darkknight.jewelrycraft.tileentity.TileEntityMolder;
import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
public class TileEntityMolderRender extends TileEntitySpecialRenderer
{
@@ -40,7 +41,7 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
TileEntityMolder me = (TileEntityMolder)te;
String texture = "textures/tileentities/Molder.png";
- ResourceLocation blockTexture = new ResourceLocation("jewelrycraft", texture);
+ ResourceLocation blockTexture = new ResourceLocation(Variables.MODID, texture);
Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java
index 7bf2363..0bdca50 100644
--- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java
+++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java
@@ -13,6 +13,7 @@ import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import darkknight.jewelrycraft.model.ModelShadowEye;
import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
+import darkknight.jewelrycraft.util.Variables;
public class TileEntityShadowEyeRender extends TileEntitySpecialRenderer
{
@@ -32,7 +33,7 @@ public class TileEntityShadowEyeRender extends TileEntitySpecialRenderer
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.6F, (float)z + 0.5F);
TileEntityShadowEye eyeS = (TileEntityShadowEye)te;
String texture = "textures/tileentities/ShadowEye" + eyeS.opening + ".png";
- ResourceLocation blockTexture = new ResourceLocation("jewelrycraft", texture);
+ ResourceLocation blockTexture = new ResourceLocation(Variables.MODID, texture);
Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntitySmelterRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntitySmelterRender.java
index e6a92a5..2892ead 100644
--- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntitySmelterRender.java
+++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntitySmelterRender.java
@@ -19,6 +19,7 @@ import darkknight.jewelrycraft.item.ItemList;
import darkknight.jewelrycraft.model.ModelSmelter;
import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
public class TileEntitySmelterRender extends TileEntitySpecialRenderer
{
@@ -38,7 +39,7 @@ public class TileEntitySmelterRender extends TileEntitySpecialRenderer
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
String texture = "textures/tileentities/Smelter.png";
- ResourceLocation blockTexture = new ResourceLocation("jewelrycraft", texture);
+ ResourceLocation blockTexture = new ResourceLocation(Variables.MODID, texture);
Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
TileEntitySmelter st = (TileEntitySmelter)te;
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
diff --git a/src/main/java/darkknight/jewelrycraft/util/JewelryNBT.java b/src/main/java/darkknight/jewelrycraft/util/JewelryNBT.java
index 9526a4d..f16c074 100644
--- a/src/main/java/darkknight/jewelrycraft/util/JewelryNBT.java
+++ b/src/main/java/darkknight/jewelrycraft/util/JewelryNBT.java
@@ -376,13 +376,29 @@ public class JewelryNBT
* @param modifier
* @return
*/
- public static int doesModifierExist(ItemStack stack, ItemStack modifier)
+ public static boolean doesModifierExist(ItemStack stack, ItemStack modifier)
{
if (modifier(stack) != null){
ArrayList<ItemStack> list = modifier(stack);
for(int i = 0; i < list.size(); i++)
- if (list.get(i).getItem() == modifier.getItem() && list.get(i).getItemDamage() == modifier.getItemDamage()) return i;
+ if (list.get(i).getItem() == modifier.getItem() && list.get(i).getItemDamage() == modifier.getItemDamage()) return true;
}
+ return false;
+ }
+
+ public static int modifierSize(ItemStack stack, ItemStack modifier)
+ {
+ if (modifier(stack) != null){
+ ArrayList<ItemStack> list = modifier(stack);
+ for(int i = 0; i < list.size(); i++)
+ if (list.get(i).getItem() == modifier.getItem() && list.get(i).getItemDamage() == modifier.getItemDamage()) return list.get(i).stackSize;
+ }
+ return -1;
+ }
+
+ public static int numberOfModifiers(ItemStack stack)
+ {
+ if (modifier(stack) != null) return modifier(stack).size();
return -1;
}
diff --git a/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java b/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java
index cd2328c..1d6e4b1 100644
--- a/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java
+++ b/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java
@@ -66,14 +66,14 @@ public class JewelrycraftUtil
*/
public static void addCursePoints(EntityPlayer player, int points)
{
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
playerInfo.setInteger("cursePoints", playerInfo.hasKey("cursePoints") ? (playerInfo.getInteger("cursePoints") + points) : points);
playerInfo.setBoolean("playerCursePointsChanged", true);
}
public static int getCursePoints(EntityPlayer player)
{
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft");
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
return playerInfo.getInteger("cursePoints");
}
diff --git a/src/main/java/darkknight/jewelrycraft/util/Variables.java b/src/main/java/darkknight/jewelrycraft/util/Variables.java
new file mode 100644
index 0000000..f45f5c6
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/util/Variables.java
@@ -0,0 +1,10 @@
+package darkknight.jewelrycraft.util;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+ public static final int MAX_CURSES = 10;
+}
diff --git a/src/main/resources/assets/jewelrycraft/lang/en_US.lang b/src/main/resources/assets/jewelrycraft/lang/en_US.lang
deleted file mode 100644
index da7c88f..0000000
--- a/src/main/resources/assets/jewelrycraft/lang/en_US.lang
+++ /dev/null
@@ -1,79 +0,0 @@
-item.Jewelrycraft.thiefGloves.name=Thiefing Gloves
-item.Jewelrycraft.ingotShadow.name=Shadow Ingot
-item.Jewelrycraft.mold.ingot.name=Ingot Mold
-item.Jewelrycraft.mold.ring.name=Ring Mold
-item.Jewelrycraft.mold.necklace.name=Necklace Mold
-item.Jewelrycraft.mold.bracelet.name=Bracelet Mold
-item.Jewelrycraft.mold.earrings.name=Earrings Mold
-item.Jewelrycraft.mold.clayIngot.name=Clay Ingot Mold
-item.Jewelrycraft.mold.clayRing.name=Clay Ring Mold
-item.Jewelrycraft.mold.clayNecklace.name=Clay Necklace Mold
-item.Jewelrycraft.mold.clayBracelet.name=Clay Bracelet Mold
-item.Jewelrycraft.mold.clayEarrings.name=Clay Earrings Mold
-item.Jewelrycraft.ring.name=Ring
-item.Jewelrycraft.necklace.name=Necklace
-item.Jewelrycraft.bracelet.name=Bracelet
-item.Jewelrycraft.earrings.name=Earrings
-item.Jewelrycraft.guide.name=Jewelrycraft Guide
-item.Jewelrycraft.bucket.name=Bucket of Molten
-
-item.Jewelrycraft.crystal.0.name=Black Crystal
-item.Jewelrycraft.crystal.1.name=Red Crystal
-item.Jewelrycraft.crystal.2.name=Green Crystal
-item.Jewelrycraft.crystal.3.name=Brown Crystal
-item.Jewelrycraft.crystal.4.name=Blue Crystal
-item.Jewelrycraft.crystal.5.name=Purple Crystal
-item.Jewelrycraft.crystal.6.name=Cyan Crystal
-item.Jewelrycraft.crystal.7.name=Light Gray Crystal
-item.Jewelrycraft.crystal.8.name=Gray Crystal
-item.Jewelrycraft.crystal.9.name=Pink Crystal
-item.Jewelrycraft.crystal.10.name=Lime Crystal
-item.Jewelrycraft.crystal.11.name=Yellow Crystal
-item.Jewelrycraft.crystal.12.name=Light Blue Crystal
-item.Jewelrycraft.crystal.13.name=Magenta Crystal
-item.Jewelrycraft.crystal.14.name=Orange Crystal
-item.Jewelrycraft.crystal.15.name=White Crystal
-
-tile.Jewelrycraft.oreShadow.name=Shadow Ore
-tile.Jewelrycraft.blockShadow.name=Shadow Block
-tile.Jewelrycraft.glow.name=Glow
-tile.Jewelrycraft.smelter.name=Smelter
-tile.Jewelrycraft.molder.name=Molder
-tile.Jewelrycraft.displayer.name=Storage Displayer
-tile.Jewelrycraft.jewelCraftingTable.name=Jeweler's Crafting Table
-tile.Jewelrycraft.altar.name=Jewel Altar
-tile.Jewelrycraft.moltenMetal.name=Molten
-tile.Jewelrycraft.shadowHand.name=Shadow Hand
-tile.Jewelrycraft.shadowEye.name=Cursed Eye
-tile.Jewelrycraft.handPedestal.name=Hand Pedestal
-
-itemGroup.JewelryCraft=Jewelrycraft
-itemGroup.Liquids=Liquids
-
-chatmessage.Jewelrycraft.molder.addedmold=Added %s to molder.
-chatmessage.Jewelrycraft.molder.metaliscooling=Molten metal is cooling...
-chatmessage.Jewelrycraft.molder.moldisempty=Mold is currently empty.
-chatmessage.Jewelrycraft.molder.moldismissing=Molder does not contain a mold.
-chatmessage.Jewelrycraft.molder.hasmoltenmetal=You can't remove the mold. It contains molten metal!
-chatmessage.Jewelrycraft.smelter.alreadyhasingot=The Smelter already contains a %s
-chatmessage.Jewelrycraft.smelter.hasmolteningot=The Smelter contains a molten %s
-chatmessage.Jewelrycraft.smelter.itemneedstobeingot=The item needs to be an ingot!
-chatmessage.Jewelrycraft.smelter.itemrenamedtoingot=Nice try, but renaming it to an ingot doesn't make it an ingot :p You can't fool me player!
-chatmessage.Jewelrycraft.smelter.molderhasmoltenmetal=The Molder already has molten metal in it!
-chatmessage.Jewelrycraft.smelter.molderhasnomold=The Molder doesn't have a mold in it! You might as well pour this stuff on the ground, eh?
-chatmessage.Jewelrycraft.smelter.modlerhasitem=The Molder contains an item in it. Now you wouldn't want it to be destroyed, would you?
-chatmessage.Jewelrycraft.smelter.molderismissing=You need a Molder in front of this block in order to pour the molten metal!
-chatmessage.Jewelrycraft.smelter.nowsmeltingingot=Smelter is now smelting a %s.
-chatmessage.Jewelrycraft.smelter.metalismelting=%s is being melted.
-chatmessage.Jewelrycraft.smelter.empty=The Smelter is empty.
-chatmessage.Jewelrycraft.table.hasenditem=First take out the crafted jewel before inserting new stuff.
-chatmessage.Jewelrycraft.table.missinggem=You need a gem.
-chatmessage.Jewelrycraft.table.missingjewelry=You're missing a piece of jewelry.
-chatmessage.Jewelrycraft.table.iscrafting=The %s is being modified.
-chatmessage.Jewelrycraft.table.jewelrymodifiedfull=This piece of jewelry is already modified at maxium. You can't modify it anymore!
-chatmessage.Jewelrycraft.table.jewelrycontainsmodifier=The piece of jewelry already contains a modifier.
-chatmessage.Jewelrycraft.table.jewelrycontainsjewel=The piece of jewelry already contains a jewel.
-
-death.attack.weak=%1$s was weakened by a piece of jewelry and died
-death.attack.shadows=%1$s was consumed by the shadows
-death.attack.blackHeart=%1$s was killed by %2$s's curse \ No newline at end of file
diff --git a/src/main/resources/assets/jewelrycraft/textures/gui/curses.png b/src/main/resources/assets/jewelrycraft/textures/gui/curses.png
deleted file mode 100644
index 1ef90c1..0000000
--- a/src/main/resources/assets/jewelrycraft/textures/gui/curses.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/gui/hearts.png b/src/main/resources/assets/jewelrycraft/textures/gui/hearts.png
deleted file mode 100644
index 10407a7..0000000
--- a/src/main/resources/assets/jewelrycraft/textures/gui/hearts.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/Changelog.txt b/src/main/resources/assets/jewelrycraft2/Changelog.txt
index eef8146..eef8146 100644
--- a/src/main/resources/assets/jewelrycraft/Changelog.txt
+++ b/src/main/resources/assets/jewelrycraft2/Changelog.txt
diff --git a/src/main/resources/assets/jewelrycraft2/lang/en_US.lang b/src/main/resources/assets/jewelrycraft2/lang/en_US.lang
new file mode 100644
index 0000000..05a9bf9
--- /dev/null
+++ b/src/main/resources/assets/jewelrycraft2/lang/en_US.lang
@@ -0,0 +1,83 @@
+item.jewelrycraft2.thiefGloves.name=Thiefing Gloves
+item.jewelrycraft2.ingotShadow.name=Shadow Ingot
+item.jewelrycraft2.mold.ingot.name=Ingot Mold
+item.jewelrycraft2.mold.ring.name=Ring Mold
+item.jewelrycraft2.mold.necklace.name=Necklace Mold
+item.jewelrycraft2.mold.bracelet.name=Bracelet Mold
+item.jewelrycraft2.mold.earrings.name=Earrings Mold
+item.jewelrycraft2.mold.clayIngot.name=Clay Ingot Mold
+item.jewelrycraft2.mold.clayRing.name=Clay Ring Mold
+item.jewelrycraft2.mold.clayNecklace.name=Clay Necklace Mold
+item.jewelrycraft2.mold.clayBracelet.name=Clay Bracelet Mold
+item.jewelrycraft2.mold.clayEarrings.name=Clay Earrings Mold
+item.jewelrycraft2.ring.name=Ring
+item.jewelrycraft2.necklace.name=Necklace
+item.jewelrycraft2.bracelet.name=Bracelet
+item.jewelrycraft2.earrings.name=Earrings
+item.jewelrycraft2.guide.name=Jewelrycraft 2 Guide
+item.jewelrycraft2.bucket.name=Bucket of Molten
+
+item.jewelrycraft2.crystal.0.name=Black Crystal
+item.jewelrycraft2.crystal.1.name=Red Crystal
+item.jewelrycraft2.crystal.2.name=Green Crystal
+item.jewelrycraft2.crystal.3.name=Brown Crystal
+item.jewelrycraft2.crystal.4.name=Blue Crystal
+item.jewelrycraft2.crystal.5.name=Purple Crystal
+item.jewelrycraft2.crystal.6.name=Cyan Crystal
+item.jewelrycraft2.crystal.7.name=Light Gray Crystal
+item.jewelrycraft2.crystal.8.name=Gray Crystal
+item.jewelrycraft2.crystal.9.name=Pink Crystal
+item.jewelrycraft2.crystal.10.name=Lime Crystal
+item.jewelrycraft2.crystal.11.name=Yellow Crystal
+item.jewelrycraft2.crystal.12.name=Light Blue Crystal
+item.jewelrycraft2.crystal.13.name=Magenta Crystal
+item.jewelrycraft2.crystal.14.name=Orange Crystal
+item.jewelrycraft2.crystal.15.name=White Crystal
+item.jewelrycraft2.jewelryModifier.name=Jewelry Modifier (Creative Only)
+
+tile.jewelrycraft2.oreShadow.name=Shadow Ore
+tile.jewelrycraft2.blockShadow.name=Shadow Block
+tile.jewelrycraft2.glow.name=Glow
+tile.jewelrycraft2.smelter.name=Smelter
+tile.jewelrycraft2.molder.name=Molder
+tile.jewelrycraft2.displayer.name=Storage Displayer
+tile.jewelrycraft2.jewelCraftingTable.name=Jeweler's Crafting Table
+tile.jewelrycraft2.altar.name=Jewel Altar
+tile.jewelrycraft2.moltenMetal.name=Molten
+tile.jewelrycraft2.shadowHand.name=Shadow Hand
+tile.jewelrycraft2.shadowEye.name=Cursed Eye
+tile.jewelrycraft2.handPedestal.name=Hand Pedestal
+
+itemGroup.jewelrycraft2=Jewelrycraft 2
+itemGroup.Liquids=Liquids
+
+chatmessage.jewelrycraft2.molder.addedmold=Added %s to molder.
+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.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.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.jewelrycontainsmodifier=The piece of jewelry already contains a modifier.
+chatmessage.jewelrycraft2.table.jewelrycontainsjewel=The piece of jewelry already contains a jewel.
+
+death.attack.weak=%1$s was weakened by a piece of jewelry and died
+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
diff --git a/src/main/resources/assets/jewelrycraft/pack.mcmeta b/src/main/resources/assets/jewelrycraft2/pack.mcmeta
index 0b04ef8..0b04ef8 100644
--- a/src/main/resources/assets/jewelrycraft/pack.mcmeta
+++ b/src/main/resources/assets/jewelrycraft2/pack.mcmeta
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_bottom.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.png
index 7ca4c6a..7ca4c6a 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_bottom.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_side.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.png
index 3a69977..3a69977 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_side.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_top.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.png
index 39210c3..39210c3 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_top.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow0.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow0.png
index 0b5323d..0b5323d 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow0.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow0.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow1.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow1.png
index 16f9908..16f9908 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow1.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow1.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow10.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow10.png
index be70eb5..be70eb5 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow10.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow10.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow11.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow11.png
index 1684d9a..1684d9a 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow11.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow11.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow12.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow12.png
index ed4ea49..ed4ea49 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow12.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow12.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow13.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow13.png
index 9b2100a..9b2100a 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow13.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow13.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow14.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow14.png
index ea00725..ea00725 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow14.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow14.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow15.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow15.png
index 2140624..2140624 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow15.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow15.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow2.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow2.png
index f95b111..f95b111 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow2.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow2.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow3.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow3.png
index 0dd5633..0dd5633 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow3.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow3.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow4.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow4.png
index a4e926c..a4e926c 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow4.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow4.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow5.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow5.png
index 8461ac4..8461ac4 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow5.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow5.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow6.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow6.png
index 352d3e4..352d3e4 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow6.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow6.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow7.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow7.png
index 9aa0e03..9aa0e03 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow7.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow7.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow8.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow8.png
index ad21447..ad21447 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow8.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow8.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow9.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow9.png
index 01c0fa4..01c0fa4 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow9.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow9.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/displayer.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/displayer.png
index 155fa53..155fa53 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/displayer.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/displayer.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/jewelrsCraftingTable.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/jewelrsCraftingTable.png
index e826bbe..e826bbe 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/jewelrsCraftingTable.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/jewelrsCraftingTable.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/molder.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/molder.png
index 5a08164..5a08164 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/molder.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/molder.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png
index 8e9a452..8e9a452 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png.mcmeta b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png.mcmeta
index 8e55e43..8e55e43 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png.mcmeta
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png.mcmeta
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png
index 1eff844..1eff844 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png.mcmeta b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png.mcmeta
index 7ceb363..7ceb363 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png.mcmeta
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png.mcmeta
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/oreShadow.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/oreShadow.png
index ffc48dc..ffc48dc 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/oreShadow.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/oreShadow.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/smelter.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/smelter.png
index 4da0c0a..4da0c0a 100644
--- a/src/main/resources/assets/jewelrycraft/textures/blocks/smelter.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/smelter.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/BlackHeart.png b/src/main/resources/assets/jewelrycraft2/textures/entities/BlackHeart.png
index 3fd03f2..3fd03f2 100644
--- a/src/main/resources/assets/jewelrycraft/textures/entities/BlackHeart.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/entities/BlackHeart.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/BlueHeart.png b/src/main/resources/assets/jewelrycraft2/textures/entities/BlueHeart.png
index f664372..f664372 100644
--- a/src/main/resources/assets/jewelrycraft/textures/entities/BlueHeart.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/entities/BlueHeart.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/Bracelet.png b/src/main/resources/assets/jewelrycraft2/textures/entities/Bracelet.png
new file mode 100644
index 0000000..6f936e4
--- /dev/null
+++ b/src/main/resources/assets/jewelrycraft2/textures/entities/Bracelet.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/Earrings.png b/src/main/resources/assets/jewelrycraft2/textures/entities/Earrings.png
new file mode 100644
index 0000000..9b716ef
--- /dev/null
+++ b/src/main/resources/assets/jewelrycraft2/textures/entities/Earrings.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/Mask.png b/src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png
index 0daa053..0daa053 100644
--- a/src/main/resources/assets/jewelrycraft/textures/entities/Mask.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/RedHeart.png b/src/main/resources/assets/jewelrycraft2/textures/entities/RedHeart.png
index 8f8623c..8f8623c 100644
--- a/src/main/resources/assets/jewelrycraft/textures/entities/RedHeart.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/entities/RedHeart.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/WhiteHeart.png b/src/main/resources/assets/jewelrycraft2/textures/entities/WhiteHeart.png
index 1f8d528..1f8d528 100644
--- a/src/main/resources/assets/jewelrycraft/textures/entities/WhiteHeart.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/entities/WhiteHeart.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/jeweler.png b/src/main/resources/assets/jewelrycraft2/textures/entities/jeweler.png
index fbd01cb..fbd01cb 100644
--- a/src/main/resources/assets/jewelrycraft/textures/entities/jeweler.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/entities/jeweler.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/gui/chest_ring.png b/src/main/resources/assets/jewelrycraft2/textures/gui/chest_ring.png
index 66f00cc..66f00cc 100644
--- a/src/main/resources/assets/jewelrycraft/textures/gui/chest_ring.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/gui/chest_ring.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft2/textures/gui/curses.png b/src/main/resources/assets/jewelrycraft2/textures/gui/curses.png
new file mode 100644
index 0000000..d12c83d
--- /dev/null
+++ b/src/main/resources/assets/jewelrycraft2/textures/gui/curses.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/gui/guidePage.png b/src/main/resources/assets/jewelrycraft2/textures/gui/guidePage.png
index 7387be5..7387be5 100644
--- a/src/main/resources/assets/jewelrycraft/textures/gui/guidePage.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/gui/guidePage.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/gui/guidePageFlip.png b/src/main/resources/assets/jewelrycraft2/textures/gui/guidePageFlip.png
index 92f2705..92f2705 100644
--- a/src/main/resources/assets/jewelrycraft/textures/gui/guidePageFlip.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/gui/guidePageFlip.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft2/textures/gui/hearts.png b/src/main/resources/assets/jewelrycraft2/textures/gui/hearts.png
new file mode 100644
index 0000000..3371ea5
--- /dev/null
+++ b/src/main/resources/assets/jewelrycraft2/textures/gui/hearts.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_modifier.png b/src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_modifier.png
new file mode 100644
index 0000000..2aad1f5
--- /dev/null
+++ b/src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_modifier.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/gui/jewelry_tab.png b/src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_tab.png
index 376249b..376249b 100644
--- a/src/main/resources/assets/jewelrycraft/textures/gui/jewelry_tab.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_tab.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/blockMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/blockMold.png
index e1c2d7b..e1c2d7b 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/blockMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/blockMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/bracelet.png b/src/main/resources/assets/jewelrycraft2/textures/items/bracelet.png
index 8dde1d3..8dde1d3 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/bracelet.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/bracelet.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/braceletMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/braceletMold.png
index 03f56ac..03f56ac 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/braceletMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/braceletMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/bucketOverlay.png b/src/main/resources/assets/jewelrycraft2/textures/items/bucketOverlay.png
index fc2e2a9..fc2e2a9 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/bucketOverlay.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/bucketOverlay.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayBlockMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayBlockMold.png
index 0dd9029..0dd9029 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/clayBlockMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/clayBlockMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayBraceletMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayBraceletMold.png
index e3d929a..e3d929a 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/clayBraceletMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/clayBraceletMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayEarringsMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayEarringsMold.png
index f6e60a9..f6e60a9 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/clayEarringsMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/clayEarringsMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayIngotMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayIngotMold.png
index 0fecb22..0fecb22 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/clayIngotMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/clayIngotMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayNecklaceMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayNecklaceMold.png
index 455f094..455f094 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/clayNecklaceMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/clayNecklaceMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayRingMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayRingMold.png
index 49d2ab1..49d2ab1 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/clayRingMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/clayRingMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/crystal.png b/src/main/resources/assets/jewelrycraft2/textures/items/crystal.png
index 563a41f..563a41f 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/crystal.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/crystal.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/crystalOverlay.png b/src/main/resources/assets/jewelrycraft2/textures/items/crystalOverlay.png
index d17e909..d17e909 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/crystalOverlay.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/crystalOverlay.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/earrings.png b/src/main/resources/assets/jewelrycraft2/textures/items/earrings.png
index 7bf3a63..7bf3a63 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/earrings.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/earrings.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/earringsMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/earringsMold.png
index e59ca7d..e59ca7d 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/earringsMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/earringsMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/guide.png b/src/main/resources/assets/jewelrycraft2/textures/items/guide.png
index c015875..c015875 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/guide.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/guide.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingot3.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingot3.png
index 47c9cb8..47c9cb8 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/ingot3.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/ingot3.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingot4.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingot4.png
index 78894d0..78894d0 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/ingot4.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/ingot4.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingot6.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingot6.png
index e025782..e025782 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/ingot6.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/ingot6.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingot7.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingot7.png
index b378e29..b378e29 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/ingot7.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/ingot7.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingotMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingotMold.png
index 0575de5..0575de5 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/ingotMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/ingotMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingotShadow.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingotShadow.png
index e3b3aed..e3b3aed 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/ingotShadow.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/ingotShadow.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/jewelBracelet.png b/src/main/resources/assets/jewelrycraft2/textures/items/jewelBracelet.png
index f6fc3c8..f6fc3c8 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/jewelBracelet.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/jewelBracelet.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/jewelEarrings.png b/src/main/resources/assets/jewelrycraft2/textures/items/jewelEarrings.png
index 713e5c7..713e5c7 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/jewelEarrings.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/jewelEarrings.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/jewelNecklace.png b/src/main/resources/assets/jewelrycraft2/textures/items/jewelNecklace.png
index 41244d4..41244d4 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/jewelNecklace.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/jewelNecklace.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/jewelRing.png b/src/main/resources/assets/jewelrycraft2/textures/items/jewelRing.png
index 4875772..4875772 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/jewelRing.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/jewelRing.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/jewelryModifier.png b/src/main/resources/assets/jewelrycraft2/textures/items/jewelryModifier.png
new file mode 100644
index 0000000..5deb768
--- /dev/null
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/jewelryModifier.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png b/src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png
index 1eff844..1eff844 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png.mcmeta b/src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png.mcmeta
index 7ceb363..7ceb363 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png.mcmeta
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png.mcmeta
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/necklace.png b/src/main/resources/assets/jewelrycraft2/textures/items/necklace.png
index 054744d..054744d 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/necklace.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/necklace.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/necklaceMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/necklaceMold.png
index 0df4b65..0df4b65 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/necklaceMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/necklaceMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ring.png b/src/main/resources/assets/jewelrycraft2/textures/items/ring.png
index ae59f5a..ae59f5a 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/ring.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/ring.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ringMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/ringMold.png
index 7bab639..7bab639 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/ringMold.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/ringMold.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/test/ingot2.png b/src/main/resources/assets/jewelrycraft2/textures/items/test/ingot2.png
index 8bd47da..8bd47da 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/test/ingot2.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/test/ingot2.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/test/ingot5.png b/src/main/resources/assets/jewelrycraft2/textures/items/test/ingot5.png
index 968b53d..968b53d 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/test/ingot5.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/test/ingot5.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/items/thiefGloves.png b/src/main/resources/assets/jewelrycraft2/textures/items/thiefGloves.png
index b56e925..b56e925 100644
--- a/src/main/resources/assets/jewelrycraft/textures/items/thiefGloves.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/items/thiefGloves.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/particle/shadows.png b/src/main/resources/assets/jewelrycraft2/textures/particle/shadows.png
index 51b1160..51b1160 100644
--- a/src/main/resources/assets/jewelrycraft/textures/particle/shadows.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/particle/shadows.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/BricksPedestal.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/BricksPedestal.png
index 08ca87b..08ca87b 100644
--- a/src/main/resources/assets/jewelrycraft/textures/tileentities/BricksPedestal.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/tileentities/BricksPedestal.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/Displayer.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Displayer.png
index 200637b..200637b 100644
--- a/src/main/resources/assets/jewelrycraft/textures/tileentities/Displayer.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Displayer.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/JewelrsCraftingBench.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/JewelrsCraftingBench.png
index 1ee75d0..1ee75d0 100644
--- a/src/main/resources/assets/jewelrycraft/textures/tileentities/JewelrsCraftingBench.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/tileentities/JewelrsCraftingBench.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/Molder.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Molder.png
index c5acc88..c5acc88 100644
--- a/src/main/resources/assets/jewelrycraft/textures/tileentities/Molder.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Molder.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye1.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye1.png
index 8916dc4..8916dc4 100644
--- a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye1.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye1.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye2.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye2.png
index 3c53104..3c53104 100644
--- a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye2.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye2.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye3.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye3.png
index a6340fb..a6340fb 100644
--- a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye3.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye3.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye4.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye4.png
index 0ba066e..0ba066e 100644
--- a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye4.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye4.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowHand.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowHand.png
index e2b82c7..e2b82c7 100644
--- a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowHand.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowHand.png
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/Smelter.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Smelter.png
index 6ec3595..6ec3595 100644
--- a/src/main/resources/assets/jewelrycraft/textures/tileentities/Smelter.png
+++ b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Smelter.png
Binary files differ