From 4f29b0ed24e393be7074abd851e207aadab38196 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Sun, 12 Apr 2015 16:29:24 +0300 Subject: I rearranged files and added a few cool stuff. --- .../java/darkknight/jewelrycraft/CommonProxy.java | 13 -- .../darkknight/jewelrycraft/JewelrycraftMod.java | 27 ++- .../jewelrycraft/block/BlockDisplayer.java | 3 +- .../block/BlockJewelrsCraftingTable.java | 11 +- .../darkknight/jewelrycraft/block/BlockList.java | 39 ++-- .../darkknight/jewelrycraft/block/BlockMolder.java | 13 +- .../jewelrycraft/block/BlockMoltenMetal.java | 7 +- .../jewelrycraft/block/BlockShadowEye.java | 9 +- .../jewelrycraft/block/BlockSmelter.java | 21 +- .../jewelrycraft/client/ClientProxy.java | 87 -------- .../darkknight/jewelrycraft/client/GuiGuide.java | 241 --------------------- .../darkknight/jewelrycraft/client/GuiJewelry.java | 69 ------ .../jewelrycraft/client/GuiRingChest.java | 50 ----- .../jewelrycraft/client/JewelryInventory.java | 166 ++++++++++++++ .../java/darkknight/jewelrycraft/client/Page.java | 198 +++++++++++++++++ .../jewelrycraft/client/gui/GuiGuide.java | 233 ++++++++++++++++++++ .../jewelrycraft/client/gui/GuiHandler.java | 87 ++++++++ .../jewelrycraft/client/gui/GuiJewelry.java | 71 ++++++ .../client/gui/GuiJewelryModifier.java | 204 +++++++++++++++++ .../jewelrycraft/client/gui/GuiRectangle.java | 96 ++++++++ .../jewelrycraft/client/gui/GuiRingChest.java | 50 +++++ .../darkknight/jewelrycraft/client/gui/GuiTab.java | 83 +++++++ .../jewelrycraft/client/gui/GuiTabBlocks.java | 161 ++++++++++++++ .../client/gui/GuiTabGemsAndIngots.java | 77 +++++++ .../client/gui/GuiTabIntroduction.java | 52 +++++ .../jewelrycraft/client/gui/GuiTabItems.java | 166 ++++++++++++++ .../jewelrycraft/client/gui/GuiTabModifiers.java | 74 +++++++ .../jewelrycraft/client/gui/GuiTabRitual.java | 125 +++++++++++ .../client/gui/container/ContainerGuide.java | 27 +++ .../gui/container/ContainerJewelryModifier.java | 50 +++++ .../client/gui/container/ContainerJewelryTab.java | 91 ++++++++ .../client/gui/container/ContainerRingChest.java | 64 ++++++ .../client/gui/container/slots/SlotBracelet.java | 52 +++++ .../client/gui/container/slots/SlotEarrings.java | 52 +++++ .../client/gui/container/slots/SlotNecklace.java | 52 +++++ .../client/gui/container/slots/SlotRing.java | 52 +++++ .../client/gui/container/slots/SlotRingChest.java | 55 +++++ .../commands/JewelrycraftCommands.java | 35 +-- .../jewelrycraft/config/ConfigHandler.java | 3 +- .../jewelrycraft/container/ContainerGuide.java | 27 --- .../container/ContainerJewelryTab.java | 87 -------- .../jewelrycraft/container/ContainerRingChest.java | 63 ------ .../jewelrycraft/container/GuiHandler.java | 78 ------- .../jewelrycraft/container/GuiRectangle.java | 97 --------- .../darkknight/jewelrycraft/container/GuiTab.java | 84 ------- .../jewelrycraft/container/GuiTabBlocks.java | 176 --------------- .../container/GuiTabGemsAndIngots.java | 78 ------- .../jewelrycraft/container/GuiTabIntroduction.java | 52 ----- .../jewelrycraft/container/GuiTabItems.java | 166 -------------- .../jewelrycraft/container/GuiTabModifiers.java | 74 ------- .../jewelrycraft/container/GuiTabRitual.java | 125 ----------- .../jewelrycraft/container/JewelryInventory.java | 165 -------------- .../darkknight/jewelrycraft/container/Page.java | 197 ----------------- .../jewelrycraft/container/SlotBracelet.java | 52 ----- .../jewelrycraft/container/SlotEarrings.java | 52 ----- .../jewelrycraft/container/SlotNecklace.java | 52 ----- .../jewelrycraft/container/SlotRing.java | 52 ----- .../jewelrycraft/container/SlotRingChest.java | 55 ----- .../jewelrycraft/curses/CurseInfamy.java | 3 +- .../darkknight/jewelrycraft/curses/CurseList.java | 12 +- .../jewelrycraft/effects/EffectBlazePowder.java | 71 +++--- .../jewelrycraft/effects/EffectEnderEye.java | 38 ++-- .../jewelrycraft/effects/EffectFeather.java | 46 ++-- .../jewelrycraft/entities/EntityHalfHeart.java | 7 +- .../jewelrycraft/entities/EntityHeart.java | 7 +- .../jewelrycraft/entities/renders/HeartRender.java | 3 +- .../jewelrycraft/events/EntityEventHandler.java | 32 +-- .../jewelrycraft/events/KeyBindings.java | 5 +- .../jewelrycraft/events/PlayerRenderHandler.java | 97 +++++++-- .../jewelrycraft/events/ScreenHandler.java | 32 +-- .../darkknight/jewelrycraft/item/ItemBracelet.java | 5 +- .../jewelrycraft/item/ItemClayMolds.java | 3 +- .../darkknight/jewelrycraft/item/ItemCrystal.java | 5 +- .../darkknight/jewelrycraft/item/ItemEarrings.java | 5 +- .../darkknight/jewelrycraft/item/ItemGuide.java | 10 - .../jewelrycraft/item/ItemJewelryModifier.java | 23 ++ .../darkknight/jewelrycraft/item/ItemList.java | 28 ++- .../darkknight/jewelrycraft/item/ItemMolds.java | 3 +- .../jewelrycraft/item/ItemMoltenMetal.java | 3 +- .../jewelrycraft/item/ItemMoltenMetalBucket.java | 3 +- .../darkknight/jewelrycraft/item/ItemNecklace.java | 5 +- .../darkknight/jewelrycraft/item/ItemRing.java | 5 +- .../jewelrycraft/item/ItemThiefGloves.java | 4 +- .../jewelrycraft/item/render/BraceletRender.java | 29 +++ .../jewelrycraft/item/render/EarringsRender.java | 29 +++ .../jewelrycraft/item/render/ItemRender.java | 65 ++++++ .../jewelrycraft/item/render/MaskRender.java | 31 +++ .../darkknight/jewelrycraft/lib/Reference.java | 9 - .../jewelrycraft/model/ModelBracelet.java | 184 ++++++++++++++++ .../jewelrycraft/model/ModelEarrings.java | 120 ++++++++++ .../network/PacketRequestPlayerInfo.java | 3 +- .../jewelrycraft/network/PacketRequestSetSlot.java | 64 ++++++ .../jewelrycraft/network/PacketSendCurseStats.java | 4 +- .../darkknight/jewelrycraft/proxy/ClientProxy.java | 90 ++++++++ .../darkknight/jewelrycraft/proxy/CommonProxy.java | 13 ++ .../tileentity/TileEntityShadowEye.java | 40 ++-- .../tileentity/renders/ItemRender.java | 65 ------ .../tileentity/renders/MaskRender.java | 30 --- .../renders/TileEntityDisplayerRender.java | 3 +- .../TileEntityJewelrsCraftingTableRender.java | 3 +- .../tileentity/renders/TileEntityMolderRender.java | 3 +- .../renders/TileEntityShadowEyeRender.java | 3 +- .../renders/TileEntitySmelterRender.java | 3 +- .../darkknight/jewelrycraft/util/JewelryNBT.java | 20 +- .../jewelrycraft/util/JewelrycraftUtil.java | 4 +- .../darkknight/jewelrycraft/util/Variables.java | 10 + .../resources/assets/jewelrycraft/Changelog.txt | 81 ------- .../resources/assets/jewelrycraft/lang/en_US.lang | 79 ------- src/main/resources/assets/jewelrycraft/pack.mcmeta | 6 - .../jewelrycraft/textures/blocks/altar_bottom.png | Bin 391 -> 0 bytes .../jewelrycraft/textures/blocks/altar_side.png | Bin 3220 -> 0 bytes .../jewelrycraft/textures/blocks/altar_top.png | Bin 3125 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow0.png | Bin 177 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow1.png | Bin 315 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow10.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow11.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow12.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow13.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow14.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow15.png | Bin 288 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow2.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow3.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow4.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow5.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow6.png | Bin 312 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow7.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow8.png | Bin 315 -> 0 bytes .../jewelrycraft/textures/blocks/blockShadow9.png | Bin 316 -> 0 bytes .../jewelrycraft/textures/blocks/displayer.png | Bin 3800 -> 0 bytes .../textures/blocks/jewelrsCraftingTable.png | Bin 2064 -> 0 bytes .../assets/jewelrycraft/textures/blocks/molder.png | Bin 1060 -> 0 bytes .../textures/blocks/moltenMetalFlow.png | Bin 10676 -> 0 bytes .../textures/blocks/moltenMetalFlow.png.mcmeta | 5 - .../textures/blocks/moltenMetalStill.png | Bin 9922 -> 0 bytes .../textures/blocks/moltenMetalStill.png.mcmeta | 45 ---- .../jewelrycraft/textures/blocks/oreShadow.png | Bin 462 -> 0 bytes .../jewelrycraft/textures/blocks/smelter.png | Bin 537 -> 0 bytes .../jewelrycraft/textures/entities/BlackHeart.png | Bin 2259 -> 0 bytes .../jewelrycraft/textures/entities/BlueHeart.png | Bin 2313 -> 0 bytes .../assets/jewelrycraft/textures/entities/Mask.png | Bin 331 -> 0 bytes .../jewelrycraft/textures/entities/RedHeart.png | Bin 2405 -> 0 bytes .../jewelrycraft/textures/entities/WhiteHeart.png | Bin 2297 -> 0 bytes .../jewelrycraft/textures/entities/jeweler.png | Bin 1265 -> 0 bytes .../jewelrycraft/textures/gui/chest_ring.png | Bin 1993 -> 0 bytes .../assets/jewelrycraft/textures/gui/curses.png | Bin 2516 -> 0 bytes .../assets/jewelrycraft/textures/gui/guidePage.png | Bin 36869 -> 0 bytes .../jewelrycraft/textures/gui/guidePageFlip.png | Bin 34450 -> 0 bytes .../assets/jewelrycraft/textures/gui/hearts.png | Bin 2362 -> 0 bytes .../jewelrycraft/textures/gui/jewelry_tab.png | Bin 2330 -> 0 bytes .../jewelrycraft/textures/items/blockMold.png | Bin 1328 -> 0 bytes .../jewelrycraft/textures/items/bracelet.png | Bin 314 -> 0 bytes .../jewelrycraft/textures/items/braceletMold.png | Bin 1369 -> 0 bytes .../jewelrycraft/textures/items/bucketOverlay.png | Bin 293 -> 0 bytes .../jewelrycraft/textures/items/clayBlockMold.png | Bin 464 -> 0 bytes .../textures/items/clayBraceletMold.png | Bin 545 -> 0 bytes .../textures/items/clayEarringsMold.png | Bin 624 -> 0 bytes .../jewelrycraft/textures/items/clayIngotMold.png | Bin 493 -> 0 bytes .../textures/items/clayNecklaceMold.png | Bin 584 -> 0 bytes .../jewelrycraft/textures/items/clayRingMold.png | Bin 606 -> 0 bytes .../assets/jewelrycraft/textures/items/crystal.png | Bin 285 -> 0 bytes .../jewelrycraft/textures/items/crystalOverlay.png | Bin 274 -> 0 bytes .../jewelrycraft/textures/items/earrings.png | Bin 273 -> 0 bytes .../jewelrycraft/textures/items/earringsMold.png | Bin 1401 -> 0 bytes .../assets/jewelrycraft/textures/items/guide.png | Bin 316 -> 0 bytes .../assets/jewelrycraft/textures/items/ingot3.png | Bin 315 -> 0 bytes .../assets/jewelrycraft/textures/items/ingot4.png | Bin 308 -> 0 bytes .../assets/jewelrycraft/textures/items/ingot6.png | Bin 314 -> 0 bytes .../assets/jewelrycraft/textures/items/ingot7.png | Bin 307 -> 0 bytes .../jewelrycraft/textures/items/ingotMold.png | Bin 500 -> 0 bytes .../jewelrycraft/textures/items/ingotShadow.png | Bin 467 -> 0 bytes .../jewelrycraft/textures/items/jewelBracelet.png | Bin 245 -> 0 bytes .../jewelrycraft/textures/items/jewelEarrings.png | Bin 227 -> 0 bytes .../jewelrycraft/textures/items/jewelNecklace.png | Bin 241 -> 0 bytes .../jewelrycraft/textures/items/jewelRing.png | Bin 244 -> 0 bytes .../textures/items/moltenMetalStill.png | Bin 9922 -> 0 bytes .../textures/items/moltenMetalStill.png.mcmeta | 45 ---- .../jewelrycraft/textures/items/necklace.png | Bin 284 -> 0 bytes .../jewelrycraft/textures/items/necklaceMold.png | Bin 551 -> 0 bytes .../assets/jewelrycraft/textures/items/ring.png | Bin 272 -> 0 bytes .../jewelrycraft/textures/items/ringMold.png | Bin 580 -> 0 bytes .../jewelrycraft/textures/items/test/ingot2.png | Bin 313 -> 0 bytes .../jewelrycraft/textures/items/test/ingot5.png | Bin 301 -> 0 bytes .../jewelrycraft/textures/items/thiefGloves.png | Bin 290 -> 0 bytes .../jewelrycraft/textures/particle/shadows.png | Bin 307 -> 0 bytes .../textures/tileentities/BricksPedestal.png | Bin 616 -> 0 bytes .../textures/tileentities/Displayer.png | Bin 1232 -> 0 bytes .../textures/tileentities/JewelrsCraftingBench.png | Bin 2005 -> 0 bytes .../jewelrycraft/textures/tileentities/Molder.png | Bin 1020 -> 0 bytes .../textures/tileentities/ShadowEye1.png | Bin 1437 -> 0 bytes .../textures/tileentities/ShadowEye2.png | Bin 1437 -> 0 bytes .../textures/tileentities/ShadowEye3.png | Bin 1446 -> 0 bytes .../textures/tileentities/ShadowEye4.png | Bin 1464 -> 0 bytes .../textures/tileentities/ShadowHand.png | Bin 1523 -> 0 bytes .../jewelrycraft/textures/tileentities/Smelter.png | Bin 886 -> 0 bytes .../resources/assets/jewelrycraft2/Changelog.txt | 81 +++++++ .../resources/assets/jewelrycraft2/lang/en_US.lang | 83 +++++++ .../resources/assets/jewelrycraft2/pack.mcmeta | 6 + .../jewelrycraft2/textures/blocks/altar_bottom.png | Bin 0 -> 391 bytes .../jewelrycraft2/textures/blocks/altar_side.png | Bin 0 -> 3220 bytes .../jewelrycraft2/textures/blocks/altar_top.png | Bin 0 -> 3125 bytes .../jewelrycraft2/textures/blocks/blockShadow0.png | Bin 0 -> 177 bytes .../jewelrycraft2/textures/blocks/blockShadow1.png | Bin 0 -> 315 bytes .../textures/blocks/blockShadow10.png | Bin 0 -> 316 bytes .../textures/blocks/blockShadow11.png | Bin 0 -> 316 bytes .../textures/blocks/blockShadow12.png | Bin 0 -> 316 bytes .../textures/blocks/blockShadow13.png | Bin 0 -> 316 bytes .../textures/blocks/blockShadow14.png | Bin 0 -> 316 bytes .../textures/blocks/blockShadow15.png | Bin 0 -> 288 bytes .../jewelrycraft2/textures/blocks/blockShadow2.png | Bin 0 -> 316 bytes .../jewelrycraft2/textures/blocks/blockShadow3.png | Bin 0 -> 316 bytes .../jewelrycraft2/textures/blocks/blockShadow4.png | Bin 0 -> 316 bytes .../jewelrycraft2/textures/blocks/blockShadow5.png | Bin 0 -> 316 bytes .../jewelrycraft2/textures/blocks/blockShadow6.png | Bin 0 -> 312 bytes .../jewelrycraft2/textures/blocks/blockShadow7.png | Bin 0 -> 316 bytes .../jewelrycraft2/textures/blocks/blockShadow8.png | Bin 0 -> 315 bytes .../jewelrycraft2/textures/blocks/blockShadow9.png | Bin 0 -> 316 bytes .../jewelrycraft2/textures/blocks/displayer.png | Bin 0 -> 3800 bytes .../textures/blocks/jewelrsCraftingTable.png | Bin 0 -> 2064 bytes .../jewelrycraft2/textures/blocks/molder.png | Bin 0 -> 1060 bytes .../textures/blocks/moltenMetalFlow.png | Bin 0 -> 10676 bytes .../textures/blocks/moltenMetalFlow.png.mcmeta | 5 + .../textures/blocks/moltenMetalStill.png | Bin 0 -> 9922 bytes .../textures/blocks/moltenMetalStill.png.mcmeta | 45 ++++ .../jewelrycraft2/textures/blocks/oreShadow.png | Bin 0 -> 462 bytes .../jewelrycraft2/textures/blocks/smelter.png | Bin 0 -> 537 bytes .../jewelrycraft2/textures/entities/BlackHeart.png | Bin 0 -> 2259 bytes .../jewelrycraft2/textures/entities/BlueHeart.png | Bin 0 -> 2313 bytes .../jewelrycraft2/textures/entities/Bracelet.png | Bin 0 -> 580 bytes .../jewelrycraft2/textures/entities/Earrings.png | Bin 0 -> 212 bytes .../jewelrycraft2/textures/entities/Mask.png | Bin 0 -> 331 bytes .../jewelrycraft2/textures/entities/RedHeart.png | Bin 0 -> 2405 bytes .../jewelrycraft2/textures/entities/WhiteHeart.png | Bin 0 -> 2297 bytes .../jewelrycraft2/textures/entities/jeweler.png | Bin 0 -> 1265 bytes .../jewelrycraft2/textures/gui/chest_ring.png | Bin 0 -> 1993 bytes .../assets/jewelrycraft2/textures/gui/curses.png | Bin 0 -> 3898 bytes .../jewelrycraft2/textures/gui/guidePage.png | Bin 0 -> 36869 bytes .../jewelrycraft2/textures/gui/guidePageFlip.png | Bin 0 -> 34450 bytes .../assets/jewelrycraft2/textures/gui/hearts.png | Bin 0 -> 18141 bytes .../textures/gui/jewelry_modifier.png | Bin 0 -> 1936 bytes .../jewelrycraft2/textures/gui/jewelry_tab.png | Bin 0 -> 2330 bytes .../jewelrycraft2/textures/items/blockMold.png | Bin 0 -> 1328 bytes .../jewelrycraft2/textures/items/bracelet.png | Bin 0 -> 314 bytes .../jewelrycraft2/textures/items/braceletMold.png | Bin 0 -> 1369 bytes .../jewelrycraft2/textures/items/bucketOverlay.png | Bin 0 -> 293 bytes .../jewelrycraft2/textures/items/clayBlockMold.png | Bin 0 -> 464 bytes .../textures/items/clayBraceletMold.png | Bin 0 -> 545 bytes .../textures/items/clayEarringsMold.png | Bin 0 -> 624 bytes .../jewelrycraft2/textures/items/clayIngotMold.png | Bin 0 -> 493 bytes .../textures/items/clayNecklaceMold.png | Bin 0 -> 584 bytes .../jewelrycraft2/textures/items/clayRingMold.png | Bin 0 -> 606 bytes .../jewelrycraft2/textures/items/crystal.png | Bin 0 -> 285 bytes .../textures/items/crystalOverlay.png | Bin 0 -> 274 bytes .../jewelrycraft2/textures/items/earrings.png | Bin 0 -> 273 bytes .../jewelrycraft2/textures/items/earringsMold.png | Bin 0 -> 1401 bytes .../assets/jewelrycraft2/textures/items/guide.png | Bin 0 -> 316 bytes .../assets/jewelrycraft2/textures/items/ingot3.png | Bin 0 -> 315 bytes .../assets/jewelrycraft2/textures/items/ingot4.png | Bin 0 -> 308 bytes .../assets/jewelrycraft2/textures/items/ingot6.png | Bin 0 -> 314 bytes .../assets/jewelrycraft2/textures/items/ingot7.png | Bin 0 -> 307 bytes .../jewelrycraft2/textures/items/ingotMold.png | Bin 0 -> 500 bytes .../jewelrycraft2/textures/items/ingotShadow.png | Bin 0 -> 467 bytes .../jewelrycraft2/textures/items/jewelBracelet.png | Bin 0 -> 245 bytes .../jewelrycraft2/textures/items/jewelEarrings.png | Bin 0 -> 227 bytes .../jewelrycraft2/textures/items/jewelNecklace.png | Bin 0 -> 241 bytes .../jewelrycraft2/textures/items/jewelRing.png | Bin 0 -> 244 bytes .../textures/items/jewelryModifier.png | Bin 0 -> 413 bytes .../textures/items/moltenMetalStill.png | Bin 0 -> 9922 bytes .../textures/items/moltenMetalStill.png.mcmeta | 45 ++++ .../jewelrycraft2/textures/items/necklace.png | Bin 0 -> 284 bytes .../jewelrycraft2/textures/items/necklaceMold.png | Bin 0 -> 551 bytes .../assets/jewelrycraft2/textures/items/ring.png | Bin 0 -> 272 bytes .../jewelrycraft2/textures/items/ringMold.png | Bin 0 -> 580 bytes .../jewelrycraft2/textures/items/test/ingot2.png | Bin 0 -> 313 bytes .../jewelrycraft2/textures/items/test/ingot5.png | Bin 0 -> 301 bytes .../jewelrycraft2/textures/items/thiefGloves.png | Bin 0 -> 290 bytes .../jewelrycraft2/textures/particle/shadows.png | Bin 0 -> 307 bytes .../textures/tileentities/BricksPedestal.png | Bin 0 -> 616 bytes .../textures/tileentities/Displayer.png | Bin 0 -> 1232 bytes .../textures/tileentities/JewelrsCraftingBench.png | Bin 0 -> 2005 bytes .../jewelrycraft2/textures/tileentities/Molder.png | Bin 0 -> 1020 bytes .../textures/tileentities/ShadowEye1.png | Bin 0 -> 1437 bytes .../textures/tileentities/ShadowEye2.png | Bin 0 -> 1437 bytes .../textures/tileentities/ShadowEye3.png | Bin 0 -> 1446 bytes .../textures/tileentities/ShadowEye4.png | Bin 0 -> 1464 bytes .../textures/tileentities/ShadowHand.png | Bin 0 -> 1523 bytes .../textures/tileentities/Smelter.png | Bin 0 -> 886 bytes 286 files changed, 3644 insertions(+), 2860 deletions(-) delete mode 100644 src/main/java/darkknight/jewelrycraft/CommonProxy.java delete mode 100644 src/main/java/darkknight/jewelrycraft/client/ClientProxy.java delete mode 100644 src/main/java/darkknight/jewelrycraft/client/GuiGuide.java delete mode 100644 src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java delete mode 100644 src/main/java/darkknight/jewelrycraft/client/GuiRingChest.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/Page.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelry.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelryModifier.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiRectangle.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiRingChest.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiTab.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiTabModifiers.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/GuiTabRitual.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerGuide.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryModifier.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryTab.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerRingChest.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotBracelet.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java create mode 100644 src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRingChest.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/ContainerGuide.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/ContainerJewelryTab.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/ContainerRingChest.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/GuiHandler.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/GuiRectangle.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/GuiTab.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/GuiTabBlocks.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/GuiTabGemsAndIngots.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/GuiTabIntroduction.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/GuiTabItems.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/GuiTabModifiers.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/GuiTabRitual.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/JewelryInventory.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/Page.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/SlotBracelet.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/SlotEarrings.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/SlotNecklace.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/SlotRing.java delete mode 100644 src/main/java/darkknight/jewelrycraft/container/SlotRingChest.java create mode 100644 src/main/java/darkknight/jewelrycraft/item/ItemJewelryModifier.java create mode 100644 src/main/java/darkknight/jewelrycraft/item/render/BraceletRender.java create mode 100644 src/main/java/darkknight/jewelrycraft/item/render/EarringsRender.java create mode 100644 src/main/java/darkknight/jewelrycraft/item/render/ItemRender.java create mode 100644 src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java delete mode 100644 src/main/java/darkknight/jewelrycraft/lib/Reference.java create mode 100644 src/main/java/darkknight/jewelrycraft/model/ModelBracelet.java create mode 100644 src/main/java/darkknight/jewelrycraft/model/ModelEarrings.java create mode 100644 src/main/java/darkknight/jewelrycraft/network/PacketRequestSetSlot.java create mode 100644 src/main/java/darkknight/jewelrycraft/proxy/ClientProxy.java create mode 100644 src/main/java/darkknight/jewelrycraft/proxy/CommonProxy.java delete mode 100644 src/main/java/darkknight/jewelrycraft/tileentity/renders/ItemRender.java delete mode 100644 src/main/java/darkknight/jewelrycraft/tileentity/renders/MaskRender.java create mode 100644 src/main/java/darkknight/jewelrycraft/util/Variables.java delete mode 100644 src/main/resources/assets/jewelrycraft/Changelog.txt delete mode 100644 src/main/resources/assets/jewelrycraft/lang/en_US.lang delete mode 100644 src/main/resources/assets/jewelrycraft/pack.mcmeta delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/altar_bottom.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/altar_side.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/altar_top.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow0.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow1.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow10.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow11.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow12.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow13.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow14.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow15.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow2.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow3.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow4.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow5.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow6.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow7.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow8.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow9.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/displayer.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/jewelrsCraftingTable.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/molder.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png.mcmeta delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png.mcmeta delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/oreShadow.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/blocks/smelter.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/entities/BlackHeart.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/entities/BlueHeart.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/entities/Mask.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/entities/RedHeart.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/entities/WhiteHeart.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/entities/jeweler.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/gui/chest_ring.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/gui/curses.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/gui/guidePage.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/gui/guidePageFlip.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/gui/hearts.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/gui/jewelry_tab.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/blockMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/bracelet.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/braceletMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/bucketOverlay.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/clayBlockMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/clayBraceletMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/clayEarringsMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/clayIngotMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/clayNecklaceMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/clayRingMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/crystal.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/crystalOverlay.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/earrings.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/earringsMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/guide.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/ingot3.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/ingot4.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/ingot6.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/ingot7.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/ingotMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/ingotShadow.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/jewelBracelet.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/jewelEarrings.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/jewelNecklace.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/jewelRing.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png.mcmeta delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/necklace.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/necklaceMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/ring.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/ringMold.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/test/ingot2.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/test/ingot5.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/items/thiefGloves.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/particle/shadows.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/tileentities/BricksPedestal.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/tileentities/Displayer.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/tileentities/JewelrsCraftingBench.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/tileentities/Molder.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye1.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye2.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye3.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye4.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowHand.png delete mode 100644 src/main/resources/assets/jewelrycraft/textures/tileentities/Smelter.png create mode 100644 src/main/resources/assets/jewelrycraft2/Changelog.txt create mode 100644 src/main/resources/assets/jewelrycraft2/lang/en_US.lang create mode 100644 src/main/resources/assets/jewelrycraft2/pack.mcmeta create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow0.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow1.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow10.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow11.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow12.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow13.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow14.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow15.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow2.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow3.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow4.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow5.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow6.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow7.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow8.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow9.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/displayer.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/jewelrsCraftingTable.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/molder.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png.mcmeta create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png.mcmeta create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/oreShadow.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/blocks/smelter.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/entities/BlackHeart.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/entities/BlueHeart.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/entities/Bracelet.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/entities/Earrings.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/entities/RedHeart.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/entities/WhiteHeart.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/entities/jeweler.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/gui/chest_ring.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/gui/curses.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/gui/guidePage.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/gui/guidePageFlip.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/gui/hearts.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_modifier.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_tab.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/blockMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/bracelet.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/braceletMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/bucketOverlay.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/clayBlockMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/clayBraceletMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/clayEarringsMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/clayIngotMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/clayNecklaceMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/clayRingMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/crystal.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/crystalOverlay.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/earrings.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/earringsMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/guide.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/ingot3.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/ingot4.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/ingot6.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/ingot7.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/ingotMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/ingotShadow.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/jewelBracelet.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/jewelEarrings.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/jewelNecklace.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/jewelRing.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/jewelryModifier.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png.mcmeta create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/necklace.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/necklaceMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/ring.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/ringMold.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/test/ingot2.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/test/ingot5.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/items/thiefGloves.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/particle/shadows.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/tileentities/BricksPedestal.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/tileentities/Displayer.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/tileentities/JewelrsCraftingBench.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/tileentities/Molder.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye1.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye2.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye3.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye4.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowHand.png create mode 100644 src/main/resources/assets/jewelrycraft2/textures/tileentities/Smelter.png (limited to 'src') diff --git a/src/main/java/darkknight/jewelrycraft/CommonProxy.java b/src/main/java/darkknight/jewelrycraft/CommonProxy.java deleted file mode 100644 index c6fa39f..0000000 --- a/src/main/java/darkknight/jewelrycraft/CommonProxy.java +++ /dev/null @@ -1,13 +0,0 @@ -package darkknight.jewelrycraft; - -/** - * The Class CommonProxy. - */ -public class CommonProxy -{ - public void preInit() - {} - - public void postInit() - {} -} \ No newline at end of file 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 authorList = new ArrayList(); - 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/client/ClientProxy.java b/src/main/java/darkknight/jewelrycraft/client/ClientProxy.java deleted file mode 100644 index 9baadcb..0000000 --- a/src/main/java/darkknight/jewelrycraft/client/ClientProxy.java +++ /dev/null @@ -1,87 +0,0 @@ -package darkknight.jewelrycraft.client; - -import net.minecraft.client.Minecraft; -import net.minecraft.item.Item; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.MinecraftForgeClient; -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.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.model.ModelDisplayer; -import darkknight.jewelrycraft.model.ModelHalfHeart; -import darkknight.jewelrycraft.model.ModelHandPedestal; -import darkknight.jewelrycraft.model.ModelHeart; -import darkknight.jewelrycraft.model.ModelJewlersCraftingBench; -import darkknight.jewelrycraft.model.ModelMolder; -import darkknight.jewelrycraft.model.ModelShadowEye; -import darkknight.jewelrycraft.model.ModelShadowHand; -import darkknight.jewelrycraft.model.ModelSmelter; -import darkknight.jewelrycraft.tileentity.TileEntityDisplayer; -import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal; -import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable; -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; -import darkknight.jewelrycraft.tileentity.renders.TileEntityMolderRender; -import darkknight.jewelrycraft.tileentity.renders.TileEntityShadowEyeRender; -import darkknight.jewelrycraft.tileentity.renders.TileEntityShadowHandRender; -import darkknight.jewelrycraft.tileentity.renders.TileEntitySmelterRender; -import darkknight.jewelrycraft.util.JewelrycraftUtil; - -public class ClientProxy extends CommonProxy -{ - @Override - public void preInit() - { - ResourceLocation pedestalResourceLocation = new ResourceLocation("jewelrycraft", "textures/tileentities/BricksPedestal.png"); - TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(pedestalResourceLocation), pedestalResourceLocation); - ResourceLocation shadowResourceLocation = new ResourceLocation("jewelrycraft", "textures/tileentities/ShadowHand.png"); - TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(shadowResourceLocation), shadowResourceLocation); - - ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmelter.class, new TileEntitySmelterRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMolder.class, new TileEntityMolderRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJewelrsCraftingTable.class, new TileEntityJewelrsCraftingTableRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDisplayer.class, new TileEntityDisplayerRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShadowEye.class, new TileEntityShadowEyeRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHandPedestal.class, pedestalRender); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShadowHand.class, shadowHandRender); - - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.displayer), new ItemRender(new TileEntityDisplayerRender(), new TileEntityDisplayer(), new ModelDisplayer())); - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.jewelCraftingTable), new ItemRender(new TileEntityJewelrsCraftingTableRender(), new TileEntityJewelrsCraftingTable(), new ModelJewlersCraftingBench())); - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.smelter), new ItemRender(new TileEntitySmelterRender(), new TileEntitySmelter(), new ModelSmelter())); - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.molder), new ItemRender(new TileEntityMolderRender(), new TileEntityMolder(), new ModelMolder())); - 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")); - - RenderingRegistry.registerEntityRenderingHandler(EntityHeart.class, new HeartRender(new ModelHeart(), 0.25F)); - RenderingRegistry.registerEntityRenderingHandler(EntityHalfHeart.class, new HeartRender(new ModelHalfHeart(), 0.25F)); - - TabRegistry.registerTab(new InventoryTabVanilla()); - 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"); - MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), jeweleryTexture)); - } - - @Override - public void postInit() - { - JewelrycraftUtil.addStuff(); - } -} diff --git a/src/main/java/darkknight/jewelrycraft/client/GuiGuide.java b/src/main/java/darkknight/jewelrycraft/client/GuiGuide.java deleted file mode 100644 index 09fc6a3..0000000 --- a/src/main/java/darkknight/jewelrycraft/client/GuiGuide.java +++ /dev/null @@ -1,241 +0,0 @@ -package darkknight.jewelrycraft.client; - -import java.util.ArrayList; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.block.BlockAir; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.inventory.Container; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -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 -{ - public int page, rot, del; - public boolean prevHover, nextHover; - World world; - private final GuiTab[] tabs; - private GuiTab activeTab; - ResourceLocation pageTexture, flippedPageTexture; - - /** - * @param container - * @param world - * @param pageTex - * @param flipPageTex - */ - public GuiGuide(Container container, World world, ResourceLocation pageTex, ResourceLocation flipPageTex) - { - super(container); - page = 1; - rot = 0; - del = 0; - this.world = world; - tabs = new GuiTab[]{new GuiTabIntroduction(0), new GuiTabBlocks(1), new GuiTabItems(2), new GuiTabGemsAndIngots(3), new GuiTabModifiers(4), new GuiTabRitual(5)}; - activeTab = tabs[0]; - pageTexture = pageTex; - flippedPageTexture = flipPageTex; - } - - /** - * @param f - * @param i - * @param j - */ - @Override - protected void drawGuiContainerBackgroundLayer(float f, int i, int j) - { - nextHover = false; - prevHover = false; - if (del == 0) rot++; - del++; - if (del >= 2) del = 0; - Minecraft.getMinecraft().getTextureManager().bindTexture(pageTexture); - drawTexturedModalRect(guiLeft + 147 / 2 + 20, guiTop - 10, 0, 0, 145, 180); - Minecraft.getMinecraft().getTextureManager().bindTexture(flippedPageTexture); - drawTexturedModalRect(guiLeft - 147 / 2 + 21, guiTop - 10, 0, 0, 145, 180); - for(GuiRectangle tab: tabs){ - int srcX = 24; - int sizeX = 19; - if (tab == activeTab){ - srcX += 38; - sizeX += 3; - }else if (tab.inRect(this, i, j)) srcX += 19; - tab.draw(this, srcX, 180, sizeX, 18); - } - if (i >= guiLeft + 195 + 20 && i <= guiLeft + 195 + 20 + 11 && j >= guiTop + 127 + 20 && j <= guiTop + 127 + 20 + 14 && page + 2 <= activeTab.getMaxPages()){ - drawTexturedModalRect(guiLeft + 195 + 20, guiTop + 127 + 20, 0, 180, 11, 14); - nextHover = true; - } - if (i >= guiLeft + 20 - 61 && i <= guiLeft - 61 + 20 + 11 && j >= guiTop + 127 + 20 && j <= guiTop + 127 + 20 + 14 && page - 2 > 0){ - drawTexturedModalRect(guiLeft - 61 + 20, guiTop + 127 + 20, 11, 180, 11, 14); - prevHover = true; - } - activeTab.drawBackground(this, i, j, page); - activeTab.drawBackground(this, i, j, page + 1); - ArrayList text = new ArrayList(); - text.add(Integer.toString(page)); - drawHoveringText(text, guiLeft - 10 + 20 - text.get(0).length(), guiTop + 150 + 20, fontRendererObj); - text.remove(Integer.toString(page)); - text.add(Integer.toString(page + 1)); - drawHoveringText(text, guiLeft - 10 + 20 + 147 - text.get(0).length(), guiTop + 150 + 20, fontRendererObj); - for(int tab = 0; tab < tabs.length; tab++) - renderItem(tabs[tab].getIcon(), guiLeft - 52, guiTop + 26 + tab * 19, activeTab.getIcon()); - } - - /** - * @param x - * @param y - */ - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) - { - activeTab.drawForeground(this, x, y, page); - activeTab.drawForeground(this, x, y, page + 1); - for(GuiTab tab: tabs) - tab.drawString(this, x, y, tab.getName()); - } - - /** - * @param x - * @param y - * @param button - */ - @Override - protected void mouseClicked(int x, int y, int button) - { - if (nextHover && page + 2 <= activeTab.getMaxPages()) page += 2; - else if (prevHover && page > 1) page -= 2; - activeTab.mouseClick(this, x, y, button); - for(GuiTab tab: tabs) - if (activeTab != tab) if (tab.inRect(this, x, y)){ - activeTab = tab; - page = 1; - break; - } - } - - /** - * @param item - * @param x - * @param y - * @param activeIcon - */ - public void renderItem(ItemStack item, float x, float y, ItemStack activeIcon) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - EntityItem entityitem = new EntityItem(world, 0.0D, 0.0D, 0.0D, item); - entityitem.hoverStart = 0.0F; - if (item.isItemEqual(new ItemStack(BlockList.jewelAltar))) y -= 4; - GL11.glTranslatef(x, y, 100); - float scale = 30F; - GL11.glScalef(-scale, scale, scale); - if (activeIcon != null && item.isItemEqual(activeIcon)) GL11.glRotatef(rot, 0, 1, 0); - if (item.isItemEqual(new ItemStack(BlockList.jewelAltar))){ - GL11.glRotatef(160.0F, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); - }else if (item.isItemEqual(new ItemStack(BlockList.handPedestal))){ - GL11.glScalef(1.2F, 1.2F, 1.2F); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); - GL11.glTranslatef(0F, 0.05F, 0F); - }else GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); - if (!(Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockAir)) RenderHelper.enableStandardItemLighting(); - if (RenderManager.instance.options.fancyGraphics) RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); - else{ - GL11.glRotatef(180F, 0F, 1F, 0F); - RenderManager.instance.options.fancyGraphics = true; - RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); - RenderManager.instance.options.fancyGraphics = false; - } - if (!(Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockAir)) RenderHelper.disableStandardItemLighting(); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - /** - * @param item - * @param x - * @param y - * @param scale - */ - public void renderItem(ItemStack item, float x, float y, float scale, boolean rotate, float xRot, float yRot, float zRot) - { - GL11.glPushMatrix(); - EntityItem entityitem = new EntityItem(world, 0.0D, 0.0D, 0.0D, item); - entityitem.hoverStart = 0.0F; - GL11.glTranslatef(x, y, 100); - GL11.glScalef(-scale, scale, scale); - GL11.glRotatef(160.0F, 1.0F, 0.0F, 0.0F); - if (rotate) GL11.glRotatef(rot, 0.0F, 1.0F, 0.0F); - else{ - // GL11.glRotatef(entityitem.getEntityItem().getItemDamage() % 8 / 8F * 360, 0, 1, 0); - GL11.glRotatef(xRot, 1, 0, 0); - GL11.glRotatef(yRot, 0, 1, 0); - GL11.glRotatef(zRot, 0, 0, 1); - if (xRot >= 90F || zRot >= 90F) GL11.glTranslatef(0F, -0.2F, 0F); - if (Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockShadowEye) GL11.glTranslatef(0F, 0F, 0.025F); - } - if (!(Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockAir)) RenderHelper.enableStandardItemLighting(); - if (RenderManager.instance.options.fancyGraphics) RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); - else{ - RenderManager.instance.options.fancyGraphics = true; - RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); - RenderManager.instance.options.fancyGraphics = false; - } - if (!(Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockAir)) RenderHelper.disableStandardItemLighting(); - GL11.glPopMatrix(); - } - - /** - * @return - */ - public int getLeft() - { - return guiLeft; - } - - /** - * @return - */ - public int getTop() - { - return guiTop; - } - - /** - * @return - */ - public FontRenderer getFont() - { - return fontRendererObj; - } - - /** - * @param lst - * @param x - * @param y - */ - @SuppressWarnings ("rawtypes") - public void drawHoverString(List lst, int x, int y) - { - drawHoveringText(lst, x, y, fontRendererObj); - } -} \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java b/src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java deleted file mode 100644 index 0f8e59a..0000000 --- a/src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java +++ /dev/null @@ -1,69 +0,0 @@ -package darkknight.jewelrycraft.client; - -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.events.KeyBindings; - -public class GuiJewelry extends GuiContainer -{ - ResourceLocation texture; - - /** - * @param containerJewelryTab - * @param texture - */ - public GuiJewelry(ContainerJewelryTab containerJewelryTab, ResourceLocation texture) - { - super(containerJewelryTab); - xSize = 194; - ySize = 166; - this.texture = texture; - } - - /** - * @param f - * @param mouseX - * @param mouseY - */ - @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); - } - - /** - * @param mouseX - * @param mouseY - */ - @Override - public void drawGuiContainerForegroundLayer(int mouseX, int mouseY) - {} - - /** - * @param charecter - * @param key - */ - @Override - protected void keyTyped(char charecter, int key) - { - super.keyTyped(charecter, key); - if (key == KeyBindings.inventory.getKeyCode()) mc.thePlayer.closeScreen(); - } - - @Override - public void initGui () - { - super.initGui(); - int cornerX = guiLeft; - int cornerY = guiTop; - this.buttonList.clear(); - TabRegistry.updateTabValues(cornerX, cornerY, TabJewelry.class); - TabRegistry.addTabsToList(this.buttonList); - } -} diff --git a/src/main/java/darkknight/jewelrycraft/client/GuiRingChest.java b/src/main/java/darkknight/jewelrycraft/client/GuiRingChest.java deleted file mode 100644 index 2504d6f..0000000 --- a/src/main/java/darkknight/jewelrycraft/client/GuiRingChest.java +++ /dev/null @@ -1,50 +0,0 @@ -package darkknight.jewelrycraft.client; - -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; - -public class GuiRingChest extends GuiContainer -{ - public ContainerRingChest container; - ResourceLocation texture; - - /** - * @param container - * @param texture - */ - public GuiRingChest(ContainerRingChest container, ResourceLocation texture) - { - super(container); - this.container = container; - xSize = 176; - ySize = 166; - this.texture = texture; - } - - /** - * @param f - * @param mouseX - * @param mouseY - */ - @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); - } - - /** - * @param mouseX - * @param mouseY - */ - @Override - public void drawGuiContainerForegroundLayer(int mouseX, int mouseY) - { - fontRendererObj.drawString("Linked Chest", 8, 6, 0x404040); - fontRendererObj.drawString("Inventory", 8, 72, 0x404040); - } -} diff --git a/src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java b/src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java new file mode 100644 index 0000000..cf8543e --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java @@ -0,0 +1,166 @@ +package darkknight.jewelrycraft.client; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import darkknight.jewelrycraft.item.ItemBracelet; +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 +{ + public EntityPlayer player; + public ItemStack[] inventory = new ItemStack[18]; + + /** + * @param player + */ + public JewelryInventory(EntityPlayer player) + { + this.player = player; + NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID); + for(int i = 0; i < 18; i++) + inventory[i] = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("ext" + i)); + } + + /** + * @return + */ + @Override + public int getSizeInventory() + { + return inventory.length; + } + + /** + * @param slot + * @return + */ + @Override + public ItemStack getStackInSlot(int slot) + { + return inventory[slot]; + } + + /** + * @param slot + * @param amount + * @return + */ + @Override + public ItemStack decrStackSize(int slot, int amount) + { + ItemStack stack = getStackInSlot(slot); + if (stack != null) if (stack.stackSize > amount){ + stack = stack.splitStack(amount); + markDirty(); + }else setInventorySlotContents(slot, null); + return stack; + } + + /** + * @param slot + * @return + */ + @Override + public ItemStack getStackInSlotOnClosing(int slot) + { + ItemStack stack = getStackInSlot(slot); + setInventorySlotContents(slot, null); + return stack; + } + + /** + * @param slot + * @param stack + */ + @Override + public void setInventorySlotContents(int slot, ItemStack stack) + { + inventory[slot] = stack; + if (stack != null && stack.stackSize > getInventoryStackLimit()) stack.stackSize = getInventoryStackLimit(); + markDirty(); + } + + /** + * @return + */ + @Override + public String getInventoryName() + { + return "Jewelry"; + } + + /** + * @return + */ + @Override + public boolean hasCustomInventoryName() + { + return false; + } + + /** + * @return + */ + @Override + public int getInventoryStackLimit() + { + return 1; + } + + /** + * + */ + @Override + public void markDirty() + { + 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); + } + + /** + * @param player + * @return + */ + @Override + public boolean isUseableByPlayer(EntityPlayer player) + { + return true; + } + + /** + * + */ + @Override + public void openInventory() + {} + + /** + * + */ + @Override + public void closeInventory() + {} + + /** + * @param slot + * @param stack + * @return + */ + @Override + public boolean isItemValidForSlot(int slot, ItemStack stack) + { + if (slot >= 0 && slot <= 9 && stack.getItem() instanceof ItemRing) return true; + else if (slot >= 10 && slot <= 13 && stack.getItem() instanceof ItemBracelet) return true; + else if (slot >= 14 && slot <= 16 && stack.getItem() instanceof ItemNecklace) return true; + else if (slot == 17 && stack.getItem() instanceof ItemEarrings) return true; + return false; + } +} \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/client/Page.java b/src/main/java/darkknight/jewelrycraft/client/Page.java new file mode 100644 index 0000000..f6973a9 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/Page.java @@ -0,0 +1,198 @@ +package darkknight.jewelrycraft.client; + +import java.util.ArrayList; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; +import darkknight.jewelrycraft.client.gui.GuiGuide; +import darkknight.jewelrycraft.util.Variables; + +public class Page +{ + static ResourceLocation pageFlipped = new ResourceLocation(Variables.MODID, "textures/gui/guidePageFlip.png"); + + /** + * @param gui + * @param x + * @param y + * @param isSmall + * @param text + * @param mouseX + * @param mouseY + * @param items + */ + public static void addCraftingRecipeTextPage(GuiGuide gui, int x, int y, boolean isSmall, String text, int mouseX, int mouseY, boolean rotate, ItemStack ... items) + { + y += 5; + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + items[0].getDisplayName(), x + Math.abs(70 - gui.getFont().getStringWidth(items[0].getDisplayName()) / 2) - 10, y - 2, 0); + GL11.glColor4f(1, 1, 1, 1); + Minecraft.getMinecraft().getTextureManager().bindTexture(pageFlipped); + ArrayList name = new ArrayList(); + if (isSmall){ + gui.drawTexturedModalRect(x, y + 10, 145, 54, 111, 46); + gui.renderItem(items[0], x + 89, y + 22 + 10, 30f, rotate, 0, 0, 0); + for(int i = 1; i <= 4; i++) + if (items.length > i && items[i] != null){ + int posX = x + 8 + (i - 1) % 2 * 22; + int posY = y + 26 + (i - 1) / 2 * 22; + gui.renderItem(items[i], posX, posY, 30f, rotate, 0, 0, 0); + name.add(items[i].getDisplayName()); + if (mouseX >= posX - 8 && mouseX <= posX + 8 && mouseY >= posY - 16 && mouseY <= posY) gui.drawHoverString(name, posX - 20, posY - 14); + name.removeAll(name); + GL11.glDisable(GL11.GL_LIGHTING); + } + drawText(gui, text, x, y + 25); + }else{ + gui.drawTexturedModalRect(x, y + 12, 145, 0, 111, 54); + gui.renderItem(items[0], x + 91, y + 28 + 10, 30f, rotate, 0, 0, 0); + for(int i = 1; i <= 9; i++) + if (items.length > i && items[i] != null){ + int posX = x + 8 + (i - 1) % 3 * 19; + int posY = y + 22 + (i - 1) / 3 * 17; + gui.renderItem(items[i], posX, posY, 30f, rotate, 0, 0, 0); + name.add(items[i].getDisplayName()); + if (mouseX >= posX - 8 && mouseX <= posX + 8 && mouseY >= posY - 10 && mouseY <= posY) gui.drawHoverString(name, posX - 20, posY - 12); + name.removeAll(name); + GL11.glDisable(GL11.GL_LIGHTING); + } + drawText(gui, text, x, y + 32); + GL11.glColor4f(1, 1, 1, 1); + } + GL11.glDisable(GL11.GL_BLEND); + } + + /** + * @param gui + * @param x + * @param y + * @param text + * @param mouseX + * @param mouseY + * @param items + */ + public static void addSmeltingRecipeTextPage(GuiGuide gui, int x, int y, String text, int mouseX, int mouseY, boolean rotate, ItemStack ... items) + { + ArrayList name = new ArrayList(); + gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + items[1].getDisplayName(), x + 30 - items[0].getDisplayName().length() / 2, y + 2, 0); + GL11.glColor4f(1, 1, 1, 1); + Minecraft.getMinecraft().getTextureManager().bindTexture(pageFlipped); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + gui.drawTexturedModalRect(x, y + 10, 145, 100, 111, 52); + gui.renderItem(items[0], x + 13, y + 20 + 10, 35f, rotate, 0, 0, 0); + name.add(items[0].getDisplayName()); + if (mouseX >= x && mouseX <= x + 20 && mouseY >= y + 20 && mouseY <= y + 20 + 16) gui.drawHoverString(name, x, y + 20); + name.removeAll(name); + GL11.glDisable(GL11.GL_LIGHTING); + gui.renderItem(items[1], x + 77, y + 28 + 10, 35f, rotate, 0, 0, 0); + drawText(gui, text, x, y + 30); + GL11.glColor4f(1, 1, 1, 1); + GL11.glDisable(GL11.GL_BLEND); + } + + /** + * @param gui + * @param x + * @param y + * @param item + * @param text + * @param size + */ + public static void addImageTextPage(GuiGuide gui, int x, int y, ItemStack item, String text, float size, boolean rotate) + { + y += 5; + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + item.getDisplayName(), x + Math.abs(70 - gui.getFont().getStringWidth(item.getDisplayName()) / 2) - 10, y + (int)size/5, 0); + GL11.glColor4f(1, 1, 1, 1); + gui.renderItem(item, x + 13, y + 18, size, rotate, 0, 0, 0); + drawText(gui, text, x - 2, y - (int)(250 / size)); + GL11.glDisable(GL11.GL_BLEND); + } + + public static void addSlotItem(GuiGuide gui, int x, int y, int mouseX, int mouseY, ItemStack item, float xRot, float yRot, float zRot) + { + ArrayList name = new ArrayList(); + GL11.glColor4f(1, 1, 1, 1); + Minecraft.getMinecraft().getTextureManager().bindTexture(pageFlipped); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + gui.drawTexturedModalRect(x + 9, y + 19, 148, 153, 12, 12); + if(item.getItem() != null){ + name.add(item.getDisplayName()); + if (mouseX >= x + 10 && mouseX <= x + 20 && mouseY >= y + 20 && mouseY <= y + 30) gui.drawHoverString(name, x, y + 10); + name.removeAll(name); + } + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glColor4f(1, 1, 1, 1); + if(item.getItem() != null) gui.renderItem(item, x + 15, y + 25, 40f, false, xRot, yRot, zRot); + GL11.glDisable(GL11.GL_BLEND); + } + + /** + * @param gui + * @param x + * @param y + * @param item + * @param text + * @param size + * @param txtX + * @param txtY + * @param showName + * @param imgX + * @param imgY + */ + public static void addImageTextPage(GuiGuide gui, int x, int y, ItemStack item, String text, float size, int txtX, int txtY, boolean showName, int imgX, int imgY, boolean rotate) + { + y += 5; + GL11.glEnable(GL11.GL_BLEND); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + if (showName) gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + item.getDisplayName(), x + Math.abs(70 - gui.getFont().getStringWidth(item.getDisplayName()) / 2) - 10, y + 2, 0); + GL11.glColor4f(1, 1, 1, 1); + gui.renderItem(item, x + 13 + imgX, y + 18 + imgY, size, rotate, 0, 0, 0); + drawText(gui, text, x + txtX, y + txtY); + GL11.glDisable(GL11.GL_BLEND); + } + + /** + * @param gui + * @param x + * @param y + * @param text + */ + public static void addTextPage(GuiGuide gui, int x, int y, String text) + { + y -= 25; + drawText(gui, text, x, y); + GL11.glColor4f(1, 1, 1, 1); + } + + /** + * @param gui + * @param text + * @param x + * @param y + */ + public static void drawText(GuiGuide gui, String text, int x, int y) + { + String[] s = text.split(" "); + String displayText = ""; + ArrayList textLines = new ArrayList(); + for(String element: s) + if ((displayText + element + " ").length() <= 24) displayText += element + " "; + else{ + textLines.add(displayText.trim()); + displayText = element + " "; + } + textLines.add(displayText.trim()); + for(int i = 0; i < textLines.size(); i++) + gui.getFont().drawString(textLines.get(i), x, y + 30 + i * 12, 0); + } +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java new file mode 100644 index 0000000..34a5c3d --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java @@ -0,0 +1,233 @@ +package darkknight.jewelrycraft.client.gui; + +import java.util.ArrayList; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.block.BlockAir; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.inventory.Container; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import org.lwjgl.opengl.GL11; +import darkknight.jewelrycraft.block.BlockList; +import darkknight.jewelrycraft.block.BlockShadowEye; + +public class GuiGuide extends GuiContainer +{ + public int page, rot, del; + public boolean prevHover, nextHover; + World world; + private final GuiTab[] tabs; + private GuiTab activeTab; + ResourceLocation pageTexture, flippedPageTexture; + + /** + * @param container + * @param world + * @param pageTex + * @param flipPageTex + */ + public GuiGuide(Container container, World world, ResourceLocation pageTex, ResourceLocation flipPageTex) + { + super(container); + page = 1; + rot = 0; + del = 0; + this.world = world; + tabs = new GuiTab[]{new GuiTabIntroduction(0), new GuiTabBlocks(1), new GuiTabItems(2), new GuiTabGemsAndIngots(3), new GuiTabModifiers(4), new GuiTabRitual(5)}; + activeTab = tabs[0]; + pageTexture = pageTex; + flippedPageTexture = flipPageTex; + } + + /** + * @param f + * @param i + * @param j + */ + @Override + protected void drawGuiContainerBackgroundLayer(float f, int i, int j) + { + nextHover = false; + prevHover = false; + if (del == 0) rot++; + del++; + if (del >= 2) del = 0; + Minecraft.getMinecraft().getTextureManager().bindTexture(pageTexture); + drawTexturedModalRect(guiLeft + 147 / 2 + 20, guiTop - 10, 0, 0, 145, 180); + Minecraft.getMinecraft().getTextureManager().bindTexture(flippedPageTexture); + drawTexturedModalRect(guiLeft - 147 / 2 + 21, guiTop - 10, 0, 0, 145, 180); + for(GuiRectangle tab: tabs){ + int srcX = 24; + int sizeX = 19; + if (tab == activeTab){ + srcX += 38; + sizeX += 3; + }else if (tab.inRect(this, i, j)) srcX += 19; + tab.draw(this, srcX, 180, sizeX, 18); + } + if (i >= guiLeft + 195 + 20 && i <= guiLeft + 195 + 20 + 11 && j >= guiTop + 127 + 20 && j <= guiTop + 127 + 20 + 14 && page + 2 <= activeTab.getMaxPages()){ + drawTexturedModalRect(guiLeft + 195 + 20, guiTop + 127 + 20, 0, 180, 11, 14); + nextHover = true; + } + if (i >= guiLeft + 20 - 61 && i <= guiLeft - 61 + 20 + 11 && j >= guiTop + 127 + 20 && j <= guiTop + 127 + 20 + 14 && page - 2 > 0){ + drawTexturedModalRect(guiLeft - 61 + 20, guiTop + 127 + 20, 11, 180, 11, 14); + prevHover = true; + } + activeTab.drawBackground(this, i, j, page); + activeTab.drawBackground(this, i, j, page + 1); + ArrayList text = new ArrayList(); + text.add(Integer.toString(page)); + drawHoveringText(text, guiLeft - 10 + 20 - text.get(0).length(), guiTop + 150 + 20, fontRendererObj); + text.remove(Integer.toString(page)); + text.add(Integer.toString(page + 1)); + drawHoveringText(text, guiLeft - 10 + 20 + 147 - text.get(0).length(), guiTop + 150 + 20, fontRendererObj); + for(int tab = 0; tab < tabs.length; tab++) + renderItem(tabs[tab].getIcon(), guiLeft - 52, guiTop + 26 + tab * 19, activeTab.getIcon()); + } + + /** + * @param x + * @param y + */ + @Override + protected void drawGuiContainerForegroundLayer(int x, int y) + { + activeTab.drawForeground(this, x, y, page); + activeTab.drawForeground(this, x, y, page + 1); + for(GuiTab tab: tabs) + tab.drawString(this, x, y, tab.getName()); + } + + /** + * @param x + * @param y + * @param button + */ + @Override + protected void mouseClicked(int x, int y, int button) + { + if (nextHover && page + 2 <= activeTab.getMaxPages()) page += 2; + else if (prevHover && page > 1) page -= 2; + activeTab.mouseClick(this, x, y, button); + for(GuiTab tab: tabs) + if (activeTab != tab) if (tab.inRect(this, x, y)){ + activeTab = tab; + page = 1; + break; + } + } + + /** + * @param item + * @param x + * @param y + * @param activeIcon + */ + public void renderItem(ItemStack item, float x, float y, ItemStack activeIcon) + { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + EntityItem entityitem = new EntityItem(world, 0.0D, 0.0D, 0.0D, item); + entityitem.hoverStart = 0.0F; + if (item.isItemEqual(new ItemStack(BlockList.jewelAltar))) y -= 4; + GL11.glTranslatef(x, y, 100); + float scale = 30F; + GL11.glScalef(-scale, scale, scale); + if (activeIcon != null && item.isItemEqual(activeIcon)) GL11.glRotatef(rot, 0, 1, 0); + if (item.isItemEqual(new ItemStack(BlockList.jewelAltar))){ + GL11.glRotatef(160.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); + }else if (item.isItemEqual(new ItemStack(BlockList.handPedestal))){ + GL11.glScalef(1.2F, 1.2F, 1.2F); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); + GL11.glTranslatef(0F, 0.05F, 0F); + }else GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); + if (!(Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockAir)) RenderHelper.enableStandardItemLighting(); + if (RenderManager.instance.options.fancyGraphics) RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + else{ + GL11.glRotatef(180F, 0F, 1F, 0F); + RenderManager.instance.options.fancyGraphics = true; + RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance.options.fancyGraphics = false; + } + if (!(Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockAir)) RenderHelper.disableStandardItemLighting(); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + /** + * @param item + * @param x + * @param y + * @param scale + */ + public void renderItem(ItemStack item, float x, float y, float scale, boolean rotate, float xRot, float yRot, float zRot) + { + GL11.glPushMatrix(); + EntityItem entityitem = new EntityItem(world, 0.0D, 0.0D, 0.0D, item); + entityitem.hoverStart = 0.0F; + GL11.glTranslatef(x, y, 100); + GL11.glScalef(-scale, scale, scale); + GL11.glRotatef(160.0F, 1.0F, 0.0F, 0.0F); + if (rotate) GL11.glRotatef(rot, 0.0F, 1.0F, 0.0F); + else{ + // GL11.glRotatef(entityitem.getEntityItem().getItemDamage() % 8 / 8F * 360, 0, 1, 0); + GL11.glRotatef(xRot, 1, 0, 0); + GL11.glRotatef(yRot, 0, 1, 0); + GL11.glRotatef(zRot, 0, 0, 1); + if (xRot >= 90F || zRot >= 90F) GL11.glTranslatef(0F, -0.2F, 0F); + if (Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockShadowEye) GL11.glTranslatef(0F, 0F, 0.025F); + } + if (!(Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockAir)) RenderHelper.enableStandardItemLighting(); + if (RenderManager.instance.options.fancyGraphics) RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + else{ + RenderManager.instance.options.fancyGraphics = true; + RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance.options.fancyGraphics = false; + } + if (!(Block.getBlockFromItem(entityitem.getEntityItem().getItem()) instanceof BlockAir)) RenderHelper.disableStandardItemLighting(); + GL11.glPopMatrix(); + } + + /** + * @return + */ + public int getLeft() + { + return guiLeft; + } + + /** + * @return + */ + public int getTop() + { + return guiTop; + } + + /** + * @return + */ + public FontRenderer getFont() + { + return fontRendererObj; + } + + /** + * @param lst + * @param x + * @param y + */ + @SuppressWarnings ("rawtypes") + public void drawHoverString(List lst, int x, int y) + { + drawHoveringText(lst, x, y, fontRendererObj); + } +} \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java new file mode 100644 index 0000000..d04fd73 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiHandler.java @@ -0,0 +1,87 @@ +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.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(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"); + + /** + * + */ + public GuiHandler() + { + NetworkRegistry.INSTANCE.registerGuiHandler(JewelrycraftMod.instance, this); + } + + /** + * @param ID + * @param player + * @param world + * @param x + * @param y + * @param z + * @return + */ + @Override + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) + { + switch(ID) + { + case 0: + return new ContainerRingChest(player.inventory, (TileEntityChest)world.getTileEntity(x, y, z)); + case 1: + 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; + } + } + + /** + * @param ID + * @param player + * @param world + * @param x + * @param y + * @param z + * @return + */ + @Override + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) + { + switch(ID) + { + case 0: + return new GuiRingChest((ContainerRingChest)getServerGuiElement(ID, player, world, x, y, z), chestTexture); + case 1: + 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/gui/GuiJewelry.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelry.java new file mode 100644 index 0000000..44d312b --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelry.java @@ -0,0 +1,71 @@ +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.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 +{ + ResourceLocation texture; + + /** + * @param containerJewelryTab + * @param texture + */ + public GuiJewelry(ContainerJewelryTab containerJewelryTab, ResourceLocation texture) + { + super(containerJewelryTab); + xSize = 194; + ySize = 166; + this.texture = texture; + } + + /** + * @param f + * @param mouseX + * @param mouseY + */ + @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); + } + + /** + * @param mouseX + * @param mouseY + */ + @Override + public void drawGuiContainerForegroundLayer(int mouseX, int mouseY) + {} + + /** + * @param charecter + * @param key + */ + @Override + protected void keyTyped(char charecter, int key) + { + super.keyTyped(charecter, key); + if (key == KeyBindings.inventory.getKeyCode()) mc.thePlayer.closeScreen(); + } + + @Override + public void initGui () + { + super.initGui(); + int cornerX = guiLeft; + int cornerY = guiTop; + this.buttonList.clear(); + TabRegistry.updateTabValues(cornerX, cornerY, TabJewelry.class); + TabRegistry.addTabsToList(this.buttonList); + } +} 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 selectedItems = new ArrayList(); + private List>> selectedItemsPos = new ArrayList>>(); + 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> itemPage = new HashMap>(); + Map pos = new HashMap(); + 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 list = new ArrayList(); + 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/client/gui/GuiRectangle.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiRectangle.java new file mode 100644 index 0000000..f4c35fb --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiRectangle.java @@ -0,0 +1,96 @@ +package darkknight.jewelrycraft.client.gui; + +import java.util.Arrays; +import net.minecraft.item.ItemStack; + +public class GuiRectangle +{ + private int x; + private int y; + private int w; + private int h; + + /** + * @param x + * @param y + * @param w + * @param h + */ + public GuiRectangle(int x, int y, int w, int h) + { + this.x = x; + this.y = y; + this.w = w; + this.h = h; + } + + /** + * @param gui + * @param mouseX + * @param mouseY + * @return + */ + public boolean inRect(GuiGuide gui, int mouseX, int mouseY) + { + mouseX -= gui.getLeft(); + mouseY -= gui.getTop(); + return x <= mouseX && mouseX <= x + w && y <= mouseY && mouseY <= y + h; + } + + /** + * @param x + */ + public void setX(int x) + { + this.x = x; + } + + /** + * @param y + */ + public void setY(int y) + { + this.y = y; + } + + /** + * @param gui + * @param srcX + * @param srcY + */ + public void draw(GuiGuide gui, int srcX, int srcY) + { + gui.drawTexturedModalRect(gui.getLeft() + x, gui.getTop() + y, srcX, srcY, w, h); + } + + /** + * @param gui + * @param srcX + * @param srcY + * @param width + * @param height + */ + public void draw(GuiGuide gui, int srcX, int srcY, int width, int height) + { + gui.drawTexturedModalRect(gui.getLeft() + x, gui.getTop() + y, srcX, srcY, width, height); + } + + /** + * @param gui + * @param mouseX + * @param mouseY + * @param str + */ + public void drawString(GuiGuide gui, int mouseX, int mouseY, String str) + { + if (inRect(gui, mouseX, mouseY)) gui.drawHoverString(Arrays.asList(str.split("\n")), mouseX - gui.getLeft(), mouseY - gui.getTop()); + } + + /** + * @return + */ + public ItemStack getIcon() + { + return null; + } +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiRingChest.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiRingChest.java new file mode 100644 index 0000000..e72fd81 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiRingChest.java @@ -0,0 +1,50 @@ +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.client.gui.container.ContainerRingChest; + +public class GuiRingChest extends GuiContainer +{ + public ContainerRingChest container; + ResourceLocation texture; + + /** + * @param container + * @param texture + */ + public GuiRingChest(ContainerRingChest container, ResourceLocation texture) + { + super(container); + this.container = container; + xSize = 176; + ySize = 166; + this.texture = texture; + } + + /** + * @param f + * @param mouseX + * @param mouseY + */ + @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); + } + + /** + * @param mouseX + * @param mouseY + */ + @Override + public void drawGuiContainerForegroundLayer(int mouseX, int mouseY) + { + fontRendererObj.drawString("Linked Chest", 8, 6, 0x404040); + fontRendererObj.drawString("Inventory", 8, 72, 0x404040); + } +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTab.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTab.java new file mode 100644 index 0000000..98b34f9 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTab.java @@ -0,0 +1,83 @@ +package darkknight.jewelrycraft.client.gui; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +@SideOnly (Side.CLIENT) +public abstract class GuiTab extends GuiRectangle +{ + int values, del; + private String name; + + /** + * @param name + * @param id + */ + public GuiTab(String name, int id) + { + super(-62, 10 + 19 * id, 19, 18); + this.name = name; + values = 0; + del = 0; + } + + /** + * @return + */ + public String getName() + { + return name; + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + public abstract void drawBackground(GuiGuide gui, int x, int y, int page); + + /** + * @param gui + * @param x + * @param y + * @param page + */ + public abstract void drawForeground(GuiGuide gui, int x, int y, int page); + + /** + * @param gui + * @param x + * @param y + * @param button + */ + public void mouseClick(GuiGuide gui, int x, int y, int button) + {} + + /** + * @param gui + * @param x + * @param y + * @param button + * @param timeSinceClicked + */ + public void mouseMoveClick(GuiGuide gui, int x, int y, int button, long timeSinceClicked) + {} + + /** + * @param gui + * @param x + * @param y + * @param button + */ + public void mouseReleased(GuiGuide gui, int x, int y, int button) + {} + + /** + * @return + */ + public int getMaxPages() + { + return 1; + } +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java new file mode 100644 index 0000000..8ba6c6a --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java @@ -0,0 +1,161 @@ +package darkknight.jewelrycraft.client.gui; + +import java.awt.Desktop; +import java.net.URL; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import darkknight.jewelrycraft.block.BlockList; +import darkknight.jewelrycraft.client.Page; +import darkknight.jewelrycraft.item.ItemList; + +public class GuiTabBlocks extends GuiTab +{ + + /** + * @param id + */ + public GuiTabBlocks(int id) + { + super("Blocks", id); + } + + /** + * @return + */ + @Override + public ItemStack getIcon() + { + return new ItemStack(BlockList.jewelAltar); + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + @Override + public void drawBackground(GuiGuide gui, int x, int y, int page) + { + String text = ""; + int xPos = page % 2 == 0 ? 107 : -35; + switch(page) + { + case 1: + text = "This ore is extremely rare and can be found only between Y-level 5 and 8. It can only be mined using a diamond pickaxe."; + Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop(), new ItemStack(BlockList.shadowOre), text, 90f, true); + break; + case 2: + text = "The Shadow Block is crafted using 9 shadow ingots. Magicians believed it held the ability to merge with the shadows. It becomes more transparent as it"; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.shadowBlock), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot)); + break; + case 3: + text = "gets darker. If a comparator is attached to it, the output strength will be equal to the value of darkness it is in."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 4: + text = "The smelter is one of the first blocks needed to get started with Jewelrycraft. Requiring just some cobble and a couple buckets. It is required in order to"; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.smelter), new ItemStack(Blocks.cobblestone), new ItemStack(Items.bucket), new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.cobblestone)); + break; + case 5: + text = "melt ingots or even ores which can be made into rings, necklaces, bracelets or earrings. To use the block all you need to do is right click on it with any ore or ingot. It can melt multimple ingots/ores at a time. Crouch (default: Shift) + Right Click will remove all items"; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 6: + text = "added. If right clicked when done smelting, it will say what the block contains."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 7: + text = "The molder is a key piece in creating jewellery. You need to pour the molten metal out of the smelter somewhere. That somewhere is the"; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.molder), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone)); + break; + case 8: + text = "molder. But before pouring the molten metal in it, you must first add a mold. You can do that by simply right clicking the block with the mold of your choice. If you want to get the mold out, simply crouch and Right Click it with an empty hand. Once you"; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 9: + text = "have a mold inside, left click on the smelter and wait for the metal to cool down. When it's done, left click on the molder to get the jewellery. Be aware that this block must be placed directly in front of the smelter, otherwise it won't work!"; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 10: + text = "This table allows you to add a gem to a piece of jewellery. Right click the block while holding a jewellery to add it in. Then do the same with a gem (you"; + if (del == 0) values++; + del++; + if (del >= 300) del = 0; + if (values >= 4) values = 0; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.jewelCraftingTable), new ItemStack(Blocks.planks, 1, values), new ItemStack(Blocks.planks, 1, values), new ItemStack(Blocks.planks, 1, values), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone)); + break; + case 11: + text = "can find a list with all possible gems in this guide). Crouch + Right Click to retreive placed items. Left Click the block to see the progress the crafting has made. Once the crafting is done, Left Click the block to get the item. You are able to recraft a"; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 12: + text = "jewellery by readding the modified version to this block and adding a different gem to it. Once the crafting is done, the current gem will be replaced by the new one. There is also a 50% chance that you will get back the old gem."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 13: + text = "This block can store any jewellery in it and activate their effects as it were a player. To do that simply right click the block with a jewellery. Crouch +"; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.jewelAltar), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.wool, 1, 5), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.wool, 1, 5), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick)); + break; + case 14: + text = "Right Click to retreive the jewellery."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 15: + text = "The Storage Displayer, as the name suggests, can store a large amount (Up to: " + Integer.MAX_VALUE + ") of a single item/block placed in it. It will"; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.displayer), null, new ItemStack(Items.iron_ingot), null, new ItemStack(Items.iron_ingot), new ItemStack(Items.iron_ingot), new ItemStack(Items.iron_ingot), new ItemStack(Blocks.emerald_block), new ItemStack(Blocks.emerald_block), new ItemStack(Blocks.emerald_block)); + break; + case 16: + text = "display all possible infromation about the object in it, such as the name, durability, enchantments etc. To store something in it simply right click with that object on it and the whole amount of items or blocks you are holding will be immediately stored inside."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 17: + text = "If a displayer already contains an item and you have that in your inventory, you can simply hold right click on it with an empty hand to add all of your items of that type from your inventory. To retrieve a single item just left click the block. If you wish to"; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 18: + text = "get a whole stack, Crouch + Left Click on it. In creative mode you can simply hold Right Click on a displayer containing an object and it will add 64 of it with every right click, without it being in your inventory."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 19: + text = "This mysterious shaped block is used in the ritual. The acient ones claimed it had the power to travel through worlds. They would use these to offer"; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.handPedestal), new ItemStack(Blocks.cobblestone_wall), new ItemStack(Blocks.cobblestone_wall), new ItemStack(Blocks.cobblestone_wall), null, new ItemStack(Blocks.stonebrick), null, new ItemStack(Blocks.stone_slab, 1, 5), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stone_slab, 1, 5)); + break; + case 20: + text = "sacrifices to 'The Dark One' in exchange for unimaginable powers."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 21: + text = "The Cursed Eye is an ancient artifact also known as 'The Dark One's Eye'. It is part of the sacrifice ritual the ancient ones talk about. Be careful"; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.shadowEye), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Items.ender_eye), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick)); + break; + case 22: + text = "though, for He sees everything. To see how to create the ritual look in the Ritual tab."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + default: + ; + } + } + + /** + * @return + */ + @Override + public int getMaxPages() + { + return 21; + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + @Override + public void drawForeground(GuiGuide gui, int x, int y, int page) + {} +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java new file mode 100644 index 0000000..b66f192 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabGemsAndIngots.java @@ -0,0 +1,77 @@ +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.util.JewelrycraftUtil; + +public class GuiTabGemsAndIngots extends GuiTab +{ + + /** + * @param id + */ + public GuiTabGemsAndIngots(int id) + { + super("Gems and ingots", id); + } + + /** + * @return + */ + @Override + public ItemStack getIcon() + { + return new ItemStack(Items.emerald); + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + @Override + public void drawBackground(GuiGuide gui, int x, int y, int page) + { + int xPos = page % 2 == 0 ? 107 : -35; + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + for(int i = (page - 1) * 9; i < page * 9; i++) + if (i < JewelrycraftUtil.gem.size()){ + gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Gems", gui.getLeft() + xPos + 40, gui.getTop(), 0); + gui.renderItem(JewelrycraftUtil.gem.get(i), gui.getLeft() + xPos + 10, gui.getTop() + 22 + 16 * (i - 9 * (page - 1)), 30f, true, 0, 0, 0); + gui.getFont().drawString(String.format("%-1.18s", JewelrycraftUtil.gem.get(i).getDisplayName()), gui.getLeft() + xPos + 20, gui.getTop() + 12 + 16 * (i - 9 * (page - 1)), 0); + GL11.glDisable(GL11.GL_LIGHTING); + } + page -= JewelrycraftUtil.gem.size() / 9 + 1; + for(int i = (page - 1) * 9; i < page * 9; i++) + if (i < JewelrycraftUtil.metal.size() && page > 0){ + gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Ingots", gui.getLeft() + xPos + 40, gui.getTop(), 0); + gui.renderItem(JewelrycraftUtil.metal.get(i).copy(), gui.getLeft() + xPos + 10, gui.getTop() + 22 + 16 * (i - 9 * (page - 1)), 30f, true, 0, 0, 0); + gui.getFont().drawString(String.format("%-1.18s", JewelrycraftUtil.metal.get(i).copy().getDisplayName()), gui.getLeft() + xPos + 20, gui.getTop() + 12 + 16 * (i - 9 * (page - 1)), 0); + GL11.glDisable(GL11.GL_LIGHTING); + } + GL11.glDisable(GL11.GL_BLEND); + } + + /** + * @return + */ + @Override + public int getMaxPages() + { + return JewelrycraftUtil.gem.size() / 9 + JewelrycraftUtil.metal.size() / 9 + 2; + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + @Override + public void drawForeground(GuiGuide gui, int x, int y, int page) + {} +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java new file mode 100644 index 0000000..b6f4ca6 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java @@ -0,0 +1,52 @@ +package darkknight.jewelrycraft.client.gui; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.client.Page; +import darkknight.jewelrycraft.item.ItemList; + +public class GuiTabIntroduction extends GuiTab +{ + public GuiTabIntroduction(int id) + { + super("Introduction", id); + } + + @Override + public ItemStack getIcon() + { + return new ItemStack(ItemList.ring); + } + + @Override + public void drawBackground(GuiGuide gui, int x, int y, int page) + { + String text = ""; + int xPos = page % 2 == 0 ? 107 : -35; + switch(page) + { + case 1: + text = "Welcome to Jewelrycraft 2! This mod is about making jewelry that you can modify to your own will. To find out how to create a jewelry, please consult the book and look at the Smelter block. To add modifiers to it you need to perform a ritual. To see how to do that, look at the Cursed Eye"; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 2: + text = "block in this giude. Please be aware that even if you can add anything as a modifier and can have multiple modifiers on one jewelry, this mod is still in alpha and does not have that many modifiers implemtnted and currently don't have any different effects depending on"; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 3: + text = "the gem used. To see what modifiers are currently implemented, just look in the Modifiers tab located in this guide (it is the one with the blaze powder as an icon)."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + } + } + + @Override + public int getMaxPages() + { + return 4; + } + + @Override + public void drawForeground(GuiGuide gui, int x, int y, int page) + {} +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java new file mode 100644 index 0000000..37012d9 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java @@ -0,0 +1,166 @@ +package darkknight.jewelrycraft.client.gui; + +import java.awt.Desktop; +import java.net.URL; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import darkknight.jewelrycraft.block.BlockList; +import darkknight.jewelrycraft.client.Page; +import darkknight.jewelrycraft.item.ItemList; +import darkknight.jewelrycraft.util.JewelryNBT; +import darkknight.jewelrycraft.util.JewelrycraftUtil; + +public class GuiTabItems extends GuiTab +{ + + /** + * @param id + */ + public GuiTabItems(int id) + { + super("Items", id); + } + + /** + * @return + */ + @Override + public ItemStack getIcon() + { + return new ItemStack(ItemList.thiefGloves); + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + @Override + public void drawBackground(GuiGuide gui, int x, int y, int page) + { + String text = ""; + int xPos = page % 2 == 0 ? 107 : -35; + switch(page) + { + case 1: + text = "Shadow ingots are obtained by smelting shadow ore. They are used in a few recipes and an important key for making some jewelry work."; + Page.addSmeltingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text, x, y, true, new ItemStack(BlockList.shadowOre), new ItemStack(ItemList.shadowIngot)); + break; + case 2: + text = "These gloves give you the chance to steal the trades those pesky Testificates have to offer. To use these simply open their gui at least once, then Crouch and"; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.thiefGloves), new ItemStack(ItemList.shadowIngot), null, new ItemStack(ItemList.shadowIngot), new ItemStack(Blocks.wool, 1, 15), new ItemStack(ItemList.shadowIngot), new ItemStack(Blocks.wool, 1, 15), new ItemStack(Blocks.wool, 1, 15), new ItemStack(ItemList.shadowIngot), new ItemStack(Blocks.wool, 1, 15)); + break; + case 3: + text = "right click on the them to hopefully steal the trades. If you traded with him before, then you have a chance of getting the traded emeralds back as well. This has a maximum of 10 uses before it breaks."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 4: + text = "In order to get the ingot back from the smelter you need a mold for it. However, this mold can't be used. It is too soft. It needs to be hardened in order for it to be used."; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), true, text, x, y, true, new ItemStack(ItemList.clayMolds, 1, 0), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball)); + break; + case 5: + text = "To create a ring you need a mold for it. However, this one is too soft to be used. It needs to be hardened in order for it to be used."; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.clayMolds, 1, 1), null, new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null); + break; + case 6: + text = "To create a necklace you need a mold for it. However, this one can't be used. It is too soft. It needs to be hardened in order for it to be used."; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.clayMolds, 1, 2), new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null); + break; + case 7: + text = "To create a bracelet you need a mold for it. However, this one can't be used. It is too soft. It needs to be hardened in order for it to be used."; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.clayMolds, 1, 3), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball)); + break; + case 8: + text = "To create a necklace you need a mold for it. However, this one can't be used. It is too soft. It needs to be hardened in order for it to be used."; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.clayMolds, 1, 4), null, null, null, new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null, null, null); + break; + case 9: + if (del == 0) values++; + del++; + if (del >= 300) del = 0; + if (values > 4) values = 0; + text = "By smelting a clay mold you get a harder version which can be used to create jewelry. Simply right click with this on a molder to attach it and you're ready to go."; + Page.addSmeltingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text, x, y, true, new ItemStack(ItemList.clayMolds, 1, values), new ItemStack(ItemList.molds, 1, values)); + break; + case 10: + text = "Crystals don't do much as of yet. They can be dyed in any color and used as gems to create a nice jewelry."; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.crystal, 1, 15), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null); + break; + case 11: + if (del == 0) values++; + del++; + if (del >= 300) del = 0; + if (values >= 15) values = 0; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), true, text, x, y, true, new ItemStack(ItemList.crystal, 1, values), new ItemStack(Items.dye, 1, values), new ItemStack(ItemList.crystal, 1, 15)); + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop() + 60, true, text, x, y, true, new ItemStack(ItemList.crystal, 1, 15), new ItemStack(Items.dye, 1, 15), new ItemStack(ItemList.crystal, 1, values)); + break; + case 12: + if (del == 0) values++; + del++; + if (del >= 300) del = 0; + if (values > 4) values = 0; + text = "It's this exact guide. I don't even know why you're reading this. I added this recipe in case you lose the original. Even if this is more helpful than NEI, I do suggest"; + Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), true, text, x, y, true, new ItemStack(ItemList.guide), new ItemStack(ItemList.molds, 1, values), new ItemStack(Items.book)); + break; + case 13: + String link = "HERE"; + if (x >= gui.getLeft() && x <= gui.getLeft() + 30 && y >= gui.getTop() + 104 && y <= gui.getTop() + 124) link = EnumChatFormatting.DARK_BLUE + "HERE" + EnumChatFormatting.BLACK; + text = "installing it so you can see all the recipes. Since you are reading this, how about making a youtube video spotlighting this mod. I'd really appreciate it. After that you can share it in the main thread " + link + "." + " This mod was made by DarkKnight (or sor1n, depends"; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 14: + text = "where you got this mod from) and the help of domi1819 and bspkrs."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 15: + ItemStack item = new ItemStack(ItemList.bucket); + if (del == 0) values++; + del++; + if (del >= 300) del = 0; + if (values > JewelrycraftUtil.metal.size() - 1) values = 0; + JewelryNBT.addMetal(item, JewelrycraftUtil.metal.get(values).copy()); + text = "These buckets contain molten metal. To obtain one simply Right Click a full Smelter to get a bucket. You can pour the metal, other than that it has no use. You can place the molten metal back in a Smelter by Right Clicking one with it."; + Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop() - 5, item, text, 40f, 0, 0, true, 45, 10, true); + break; + default: + ; + } + } + + /** + * @return + */ + @Override + public int getMaxPages() + { + return 15; + } + + /** + * @param gui + * @param x + * @param y + * @param button + */ + @Override + public void mouseClick(GuiGuide gui, int x, int y, int button) + { + if (gui.page == 13 && x >= gui.getLeft() && x <= gui.getLeft() + 30 && y >= gui.getTop() + 104 && y <= gui.getTop() + 124) try{ + Desktop.getDesktop().browse(new URL("http://www.minecraftforum.net/topic/2210959-164smp-ssp-jewelrycraft-version-12/").toURI()); + } + catch(Exception e){} + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + @Override + public void drawForeground(GuiGuide gui, int x, int y, int page) + {} +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabModifiers.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabModifiers.java new file mode 100644 index 0000000..614c152 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabModifiers.java @@ -0,0 +1,74 @@ +package darkknight.jewelrycraft.client.gui; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.client.Page; + +public class GuiTabModifiers extends GuiTab +{ + int maxPages; + public GuiTabModifiers(int id) + { + super("Modifiers", id); + } + + /** + * @return + */ + @Override + public ItemStack getIcon() + { + return new ItemStack(Items.blaze_powder); + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + @Override + public void drawBackground(GuiGuide gui, int x, int y, int page) + { + String text = ""; + int xPos = page % 2 == 0 ? 107 : -35; + switch(page) + { + case 1: + text = "Although you can add anything as a modifier, only some objects have an effect. In this tab you can find all of modifiers that have a use and what they do, in the form of a story/riddle/poem. However different jewellery have different effects for the same modifier."; + Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); + break; + case 2: + text = "The ancient ones talked about a rising fire in your heart. Fret do not, for flames do not burn, but water might sting a turn. Watch your step, do not be cocky, for its protection is a bit sloppy."; + Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop() - 7, new ItemStack(Items.blaze_powder), text, 40f, true); + break; + case 3: + text = "Light and swift as a feather can be good all together. Enemies miss and get confused, this power can be abused. Against an arrow you can't compare, so move around, don't just stare. Fire is your enemy and weakness is the penalty."; + Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop() - 7, new ItemStack(Items.feather), text, 40f, true); + break; + case 4: + text = "Endermen may tolerate you, end portals are near too, you may find ore that is true. But be careful, for the power may make you dizzy, blind you if you're a sissy, worsen your vision if you're unaware and shift positions everywhere."; + Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop() - 7, new ItemStack(Items.ender_eye), text, 40f, true); + break; + } + } + + /** + * @return + */ + @Override + public int getMaxPages() + { + return 4; + } + + /** + * @param gui + * @param x + * @param y + * @param page + */ + @Override + public void drawForeground(GuiGuide gui, int x, int y, int page) + {} +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabRitual.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabRitual.java new file mode 100644 index 0000000..ffb58d9 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabRitual.java @@ -0,0 +1,125 @@ +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.Page; + +public class GuiTabRitual extends GuiTab +{ + public GuiTabRitual(int id) + { + super("Ritual", id); + } + + @Override + public ItemStack getIcon() + { + return new ItemStack(BlockList.handPedestal); + } + + @Override + public void drawBackground(GuiGuide gui, int x, int y, int page) + { + int xPos = page % 2 == 0 ? 107 : -35; + switch(page) + { + case 1: + Page.drawText(gui, EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Layer 1", gui.getLeft() + xPos + 35, gui.getTop() - 30); + for(int i = -1; i < 10; i++) + for(int j = 0; j < 11; j++) + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*i, gui.getTop() + 11*j, x, y, new ItemStack(Blocks.air), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*1, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*1, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*9, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*9, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + + //Top + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*1, x, y, new ItemStack(BlockList.handPedestal), 0, 45, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*4, gui.getTop() + 11*0, x, y, new ItemStack(BlockList.handPedestal), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*1, x, y, new ItemStack(BlockList.handPedestal), 0, -45, 0); + + //Left + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*3, x, y, new ItemStack(BlockList.handPedestal), 0, 45, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*-1, gui.getTop() + 11*5, x, y, new ItemStack(BlockList.handPedestal), 0, 90, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*7, x, y, new ItemStack(BlockList.handPedestal), 0, 135, 0); + + //Bottom + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*9, x, y, new ItemStack(BlockList.handPedestal), 0, 135, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*4, gui.getTop() + 11*10, x, y, new ItemStack(BlockList.handPedestal), 0, 180, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*9, x, y, new ItemStack(BlockList.handPedestal), 0, 225, 0); + + //Right + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*3, x, y, new ItemStack(BlockList.handPedestal), 0, -35, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*9, gui.getTop() + 11*5, x, y, new ItemStack(BlockList.handPedestal), 0, 270, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*7, x, y, new ItemStack(BlockList.handPedestal), 0, 225, 0); + + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*4, gui.getTop() + 11*5, x, y, new ItemStack(BlockList.handPedestal), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + break; + + case 2: + Page.drawText(gui, EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Layer 2", gui.getLeft() + xPos + 35, gui.getTop() - 30); + for(int i = -1; i < 10; i++) + for(int j = 0; j < 11; j++) + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*i, gui.getTop() + 11*j, x, y, new ItemStack(Blocks.air), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*1, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*1, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*9, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*9, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + break; + + case 3: + Page.drawText(gui, EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Layer 3", gui.getLeft() + xPos + 35, gui.getTop() - 30); + for(int i = -1; i < 10; i++) + for(int j = 0; j < 11; j++) + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*i, gui.getTop() + 11*j, x, y, new ItemStack(Blocks.air), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*1, x, y, new ItemStack(BlockList.shadowBlock), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*1, x, y, new ItemStack(BlockList.shadowBlock), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*9, x, y, new ItemStack(BlockList.shadowBlock), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*9, x, y, new ItemStack(BlockList.shadowBlock), 0, 0, 0); + + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); + break; + + case 4: + Page.drawText(gui, EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Layer 4", gui.getLeft() + xPos + 35, gui.getTop() - 30); + for(int i = -1; i < 10; i++) + for(int j = 0; j < 11; j++) + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*i, gui.getTop() + 11*j, x, y, new ItemStack(Blocks.air), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_brick_stairs), 0, 90, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*3, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_brick_stairs), 0, -90, 180); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*4, gui.getTop() + 11*5, x, y, new ItemStack(BlockList.shadowEye), 0, 90, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*5, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_brick_stairs), 0, 90, 180); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_brick_stairs), 0, -90, 0); + break; + + case 5: + Page.drawText(gui, EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Layer 5", gui.getLeft() + xPos + 35, gui.getTop() - 30); + for(int i = -1; i < 10; i++) + for(int j = 0; j < 11; j++) + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*i, gui.getTop() + 11*j, x, y, new ItemStack(Blocks.air), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*3, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_slab, 1, 5), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*4, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_slab, 1, 5), 0, 0, 0); + Page.addSlotItem(gui, gui.getLeft() + xPos + 11*5, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_slab, 1, 5), 0, 0, 0); + break; + } + } + + @Override + public int getMaxPages() + { + return 5; + } + + @Override + public void drawForeground(GuiGuide gui, int x, int y, int page) + {} +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerGuide.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerGuide.java new file mode 100644 index 0000000..ccb9ca9 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerGuide.java @@ -0,0 +1,27 @@ +package darkknight.jewelrycraft.client.gui.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; + +/** + * User: joel / Date: 16.12.13 / Time: 22:36 + */ +public class ContainerGuide extends Container +{ + + /** + * + */ + public ContainerGuide() + {} + + /** + * @param entityplayer + * @return + */ + @Override + public boolean canInteractWith(EntityPlayer entityplayer) + { + return true; + } +} \ No newline at end of file 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/client/gui/container/ContainerJewelryTab.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryTab.java new file mode 100644 index 0000000..1b2ab60 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryTab.java @@ -0,0 +1,91 @@ +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; +import darkknight.jewelrycraft.item.ItemRing; + +public class ContainerJewelryTab extends Container +{ + + /** + * @param player + * @param inv + * @param extra + */ + public ContainerJewelryTab(EntityPlayer player, IInventory inv, IInventory extra) + { + int x, y; + // Rings + for(x = 0; x <= 9; x++) + addSlotToContainer(new SlotRing(extra, x, 8 + x * 18, 7)); + // Bracelets + for(x = 10; x <= 13; x++) + addSlotToContainer(new SlotBracelet(extra, x, 8 + (x - 10) * 18, 26)); + // Necklaces + for(x = 14; x <= 16; x++) + addSlotToContainer(new SlotNecklace(extra, x, 8 + (x - 14) * 18, 45)); + // Earrings + addSlotToContainer(new SlotEarrings(extra, 17, 8, 64)); + // Hotbar + for(x = 0; x < 9; ++x) + addSlotToContainer(new Slot(inv, x, 17 + x * 18, 142)); + // Inventory + for(x = 0; x < 3; ++x) + for(y = 0; y < 9; ++y) + addSlotToContainer(new Slot(inv, 9 + y + x * 9, 17 + y * 18, 84 + x * 18)); + } + + /** + * @param player + * @return + */ + @Override + public boolean canInteractWith(EntityPlayer player) + { + return true; + } + + /** + * @param player + * @param slotID + * @return + */ + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int slotID) + { + ItemStack itemstack = null; + Slot slot = (Slot)inventorySlots.get(slotID); + if (slot != null && slot.getHasStack()){ + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (slotID < 18){ + if (!mergeItemStack(itemstack1, 18, 18 + 36, true)) return null; + slot.onSlotChange(itemstack1, itemstack); + }else if (itemstack1.getItem() instanceof ItemRing){ + if (!mergeItemStack(itemstack1, 0, 10, false)) return null; + }else if (itemstack1.getItem() instanceof ItemBracelet){ + if (!mergeItemStack(itemstack1, 10, 14, false)) return null; + }else if (itemstack1.getItem() instanceof ItemNecklace){ + if (!mergeItemStack(itemstack1, 14, 17, false)) return null; + }else if (itemstack1.getItem() instanceof ItemEarrings){ + if (!mergeItemStack(itemstack1, 17, 18, false)) return null; + }else{ + if (!mergeItemStack(itemstack1, 18, 54, true)) return null; + slot.onSlotChange(itemstack1, itemstack); + } + if (itemstack1.stackSize == 0) slot.putStack((ItemStack)null); + else slot.onSlotChanged(); + } + return itemstack; + } +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerRingChest.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerRingChest.java new file mode 100644 index 0000000..3d7beb6 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerRingChest.java @@ -0,0 +1,64 @@ +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; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntityChest; + +public class ContainerRingChest extends Container +{ + public TileEntityChest theChest; + + /** + * @param inv + * @param chest + */ + public ContainerRingChest(InventoryPlayer inv, TileEntityChest chest) + { + theChest = chest; + int x, y; + for(x = 0; x < 9; x++) + addSlotToContainer(new SlotRingChest(inv, x, 8 + 18 * x, 142, x == inv.currentItem)); + for(y = 0; y < 3; y++) + for(x = 0; x < 9; x++) + addSlotToContainer(new Slot(inv, x + 9 + y * 9, 8 + 18 * x, 84 + y * 18)); + for(y = 0; y < 3; y++) + for(x = 0; x < 9; x++) + addSlotToContainer(new SlotRingChest(chest, 26 - (x + y * 9), 8 + 18 * (8 - x), 17 + (2 - y) * 18, false)); + } + + /** + * @param player + * @return + */ + @Override + public boolean canInteractWith(EntityPlayer player) + { + return true; + } + + /** + * @param par1EntityPlayer + * @param par2 + * @return + */ + @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/client/gui/container/slots/SlotBracelet.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotBracelet.java new file mode 100644 index 0000000..3bdbb64 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotBracelet.java @@ -0,0 +1,52 @@ +package darkknight.jewelrycraft.client.gui.container.slots; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.item.ItemBracelet; + +public class SlotBracelet extends Slot +{ + + /** + * @param tile + * @param slotID + * @param x + * @param y + */ + public SlotBracelet(IInventory tile, int slotID, int x, int y) + { + super(tile, slotID, x, y); + } + + /** + * @param stack + * @return + */ + @Override + public boolean isItemValid(ItemStack stack) + { + return stack.getItem() instanceof ItemBracelet; + } + + /** + * @param amount + * @return + */ + @Override + public ItemStack decrStackSize(int amount) + { + return super.decrStackSize(amount); + } + + /** + * @param player + * @return + */ + @Override + public boolean canTakeStack(EntityPlayer player) + { + return true; + } +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java new file mode 100644 index 0000000..de062bc --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java @@ -0,0 +1,52 @@ +package darkknight.jewelrycraft.client.gui.container.slots; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.item.ItemEarrings; + +public class SlotEarrings extends Slot +{ + + /** + * @param tile + * @param slotID + * @param x + * @param y + */ + public SlotEarrings(IInventory tile, int slotID, int x, int y) + { + super(tile, slotID, x, y); + } + + /** + * @param stack + * @return + */ + @Override + public boolean isItemValid(ItemStack stack) + { + return stack.getItem() instanceof ItemEarrings; + } + + /** + * @param amount + * @return + */ + @Override + public ItemStack decrStackSize(int amount) + { + return super.decrStackSize(amount); + } + + /** + * @param player + * @return + */ + @Override + public boolean canTakeStack(EntityPlayer player) + { + return true; + } +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java new file mode 100644 index 0000000..9a64079 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java @@ -0,0 +1,52 @@ +package darkknight.jewelrycraft.client.gui.container.slots; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.item.ItemNecklace; + +public class SlotNecklace extends Slot +{ + + /** + * @param tile + * @param slotID + * @param x + * @param y + */ + public SlotNecklace(IInventory tile, int slotID, int x, int y) + { + super(tile, slotID, x, y); + } + + /** + * @param stack + * @return + */ + @Override + public boolean isItemValid(ItemStack stack) + { + return stack.getItem() instanceof ItemNecklace; + } + + /** + * @param amount + * @return + */ + @Override + public ItemStack decrStackSize(int amount) + { + return super.decrStackSize(amount); + } + + /** + * @param player + * @return + */ + @Override + public boolean canTakeStack(EntityPlayer player) + { + return true; + } +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java new file mode 100644 index 0000000..a52cf6b --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java @@ -0,0 +1,52 @@ +package darkknight.jewelrycraft.client.gui.container.slots; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.item.ItemRing; + +public class SlotRing extends Slot +{ + + /** + * @param tile + * @param slotID + * @param x + * @param y + */ + public SlotRing(IInventory tile, int slotID, int x, int y) + { + super(tile, slotID, x, y); + } + + /** + * @param stack + * @return + */ + @Override + public boolean isItemValid(ItemStack stack) + { + return stack.getItem() instanceof ItemRing; + } + + /** + * @param amount + * @return + */ + @Override + public ItemStack decrStackSize(int amount) + { + return super.decrStackSize(amount); + } + + /** + * @param player + * @return + */ + @Override + public boolean canTakeStack(EntityPlayer player) + { + return true; + } +} diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRingChest.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRingChest.java new file mode 100644 index 0000000..8cc5431 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRingChest.java @@ -0,0 +1,55 @@ +package darkknight.jewelrycraft.client.gui.container.slots; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class SlotRingChest extends Slot +{ + public boolean locked = false; + + /** + * @param tile + * @param slotID + * @param x + * @param y + * @param locked + */ + public SlotRingChest(IInventory tile, int slotID, int x, int y, boolean locked) + { + super(tile, slotID, x, y); + this.locked = locked; + } + + /** + * @param stack + * @return + */ + @Override + public boolean isItemValid(ItemStack stack) + { + return !locked; + } + + /** + * @param amount + * @return + */ + @Override + public ItemStack decrStackSize(int amount) + { + if (!locked) return super.decrStackSize(amount); + return null; + } + + /** + * @param player + * @return + */ + @Override + public boolean canTakeStack(EntityPlayer player) + { + return !locked; + } +} 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 [points] | "; - use += "/jewelrycraft |"; - use += "/jewelrycraft "; - return use; + return "/jewelrycraft [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 modifier = new ArrayList(); - 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/container/ContainerGuide.java b/src/main/java/darkknight/jewelrycraft/container/ContainerGuide.java deleted file mode 100644 index b6513a3..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/ContainerGuide.java +++ /dev/null @@ -1,27 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; - -/** - * User: joel / Date: 16.12.13 / Time: 22:36 - */ -public class ContainerGuide extends Container -{ - - /** - * - */ - public ContainerGuide() - {} - - /** - * @param entityplayer - * @return - */ - @Override - public boolean canInteractWith(EntityPlayer entityplayer) - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/container/ContainerJewelryTab.java b/src/main/java/darkknight/jewelrycraft/container/ContainerJewelryTab.java deleted file mode 100644 index 701b338..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/ContainerJewelryTab.java +++ /dev/null @@ -1,87 +0,0 @@ -package darkknight.jewelrycraft.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.item.ItemBracelet; -import darkknight.jewelrycraft.item.ItemEarrings; -import darkknight.jewelrycraft.item.ItemNecklace; -import darkknight.jewelrycraft.item.ItemRing; - -public class ContainerJewelryTab extends Container -{ - - /** - * @param player - * @param inv - * @param extra - */ - public ContainerJewelryTab(EntityPlayer player, IInventory inv, IInventory extra) - { - int x, y; - // Rings - for(x = 0; x <= 9; x++) - addSlotToContainer(new SlotRing(extra, x, 8 + x * 18, 7)); - // Bracelets - for(x = 10; x <= 13; x++) - addSlotToContainer(new SlotBracelet(extra, x, 8 + (x - 10) * 18, 26)); - // Necklaces - for(x = 14; x <= 16; x++) - addSlotToContainer(new SlotNecklace(extra, x, 8 + (x - 14) * 18, 45)); - // Earrings - addSlotToContainer(new SlotEarrings(extra, 17, 8, 64)); - // Hotbar - for(x = 0; x < 9; ++x) - addSlotToContainer(new Slot(inv, x, 17 + x * 18, 142)); - // Inventory - for(x = 0; x < 3; ++x) - for(y = 0; y < 9; ++y) - addSlotToContainer(new Slot(inv, 9 + y + x * 9, 17 + y * 18, 84 + x * 18)); - } - - /** - * @param player - * @return - */ - @Override - public boolean canInteractWith(EntityPlayer player) - { - return true; - } - - /** - * @param player - * @param slotID - * @return - */ - @Override - public ItemStack transferStackInSlot(EntityPlayer player, int slotID) - { - ItemStack itemstack = null; - Slot slot = (Slot)inventorySlots.get(slotID); - if (slot != null && slot.getHasStack()){ - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - if (slotID < 18){ - if (!mergeItemStack(itemstack1, 18, 18 + 36, true)) return null; - slot.onSlotChange(itemstack1, itemstack); - }else if (itemstack1.getItem() instanceof ItemRing){ - if (!mergeItemStack(itemstack1, 0, 10, false)) return null; - }else if (itemstack1.getItem() instanceof ItemBracelet){ - if (!mergeItemStack(itemstack1, 10, 14, false)) return null; - }else if (itemstack1.getItem() instanceof ItemNecklace){ - if (!mergeItemStack(itemstack1, 14, 17, false)) return null; - }else if (itemstack1.getItem() instanceof ItemEarrings){ - if (!mergeItemStack(itemstack1, 17, 18, false)) return null; - }else{ - if (!mergeItemStack(itemstack1, 18, 54, true)) return null; - slot.onSlotChange(itemstack1, itemstack); - } - if (itemstack1.stackSize == 0) slot.putStack((ItemStack)null); - else slot.onSlotChanged(); - } - return itemstack; - } -} diff --git a/src/main/java/darkknight/jewelrycraft/container/ContainerRingChest.java b/src/main/java/darkknight/jewelrycraft/container/ContainerRingChest.java deleted file mode 100644 index 925ded7..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/ContainerRingChest.java +++ /dev/null @@ -1,63 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntityChest; - -public class ContainerRingChest extends Container -{ - public TileEntityChest theChest; - - /** - * @param inv - * @param chest - */ - public ContainerRingChest(InventoryPlayer inv, TileEntityChest chest) - { - theChest = chest; - int x, y; - for(x = 0; x < 9; x++) - addSlotToContainer(new SlotRingChest(inv, x, 8 + 18 * x, 142, x == inv.currentItem)); - for(y = 0; y < 3; y++) - for(x = 0; x < 9; x++) - addSlotToContainer(new Slot(inv, x + 9 + y * 9, 8 + 18 * x, 84 + y * 18)); - for(y = 0; y < 3; y++) - for(x = 0; x < 9; x++) - addSlotToContainer(new SlotRingChest(chest, 26 - (x + y * 9), 8 + 18 * (8 - x), 17 + (2 - y) * 18, false)); - } - - /** - * @param player - * @return - */ - @Override - public boolean canInteractWith(EntityPlayer player) - { - return true; - } - - /** - * @param par1EntityPlayer - * @param par2 - * @return - */ - @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/GuiHandler.java b/src/main/java/darkknight/jewelrycraft/container/GuiHandler.java deleted file mode 100644 index 6ebd3e9..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/GuiHandler.java +++ /dev/null @@ -1,78 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.entity.player.EntityPlayer; -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; - -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"); - - /** - * - */ - public GuiHandler() - { - NetworkRegistry.INSTANCE.registerGuiHandler(JewelrycraftMod.instance, this); - } - - /** - * @param ID - * @param player - * @param world - * @param x - * @param y - * @param z - * @return - */ - @Override - public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) - { - switch(ID) - { - case 0: - return new ContainerRingChest(player.inventory, (TileEntityChest)world.getTileEntity(x, y, z)); - case 1: - return new ContainerGuide(); - case 2: - return new ContainerJewelryTab(player, player.inventory, new JewelryInventory(player)); - default: - return null; - } - } - - /** - * @param ID - * @param player - * @param world - * @param x - * @param y - * @param z - * @return - */ - @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) - { - switch(ID) - { - case 0: - return new GuiRingChest((ContainerRingChest)getServerGuiElement(ID, player, world, x, y, z), chestTexture); - case 1: - 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); - default: - return null; - } - } -} diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiRectangle.java b/src/main/java/darkknight/jewelrycraft/container/GuiRectangle.java deleted file mode 100644 index 50b7cd5..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/GuiRectangle.java +++ /dev/null @@ -1,97 +0,0 @@ -package darkknight.jewelrycraft.container; - -import java.util.Arrays; -import net.minecraft.item.ItemStack; -import darkknight.jewelrycraft.client.GuiGuide; - -public class GuiRectangle -{ - private int x; - private int y; - private int w; - private int h; - - /** - * @param x - * @param y - * @param w - * @param h - */ - public GuiRectangle(int x, int y, int w, int h) - { - this.x = x; - this.y = y; - this.w = w; - this.h = h; - } - - /** - * @param gui - * @param mouseX - * @param mouseY - * @return - */ - public boolean inRect(GuiGuide gui, int mouseX, int mouseY) - { - mouseX -= gui.getLeft(); - mouseY -= gui.getTop(); - return x <= mouseX && mouseX <= x + w && y <= mouseY && mouseY <= y + h; - } - - /** - * @param x - */ - public void setX(int x) - { - this.x = x; - } - - /** - * @param y - */ - public void setY(int y) - { - this.y = y; - } - - /** - * @param gui - * @param srcX - * @param srcY - */ - public void draw(GuiGuide gui, int srcX, int srcY) - { - gui.drawTexturedModalRect(gui.getLeft() + x, gui.getTop() + y, srcX, srcY, w, h); - } - - /** - * @param gui - * @param srcX - * @param srcY - * @param width - * @param height - */ - public void draw(GuiGuide gui, int srcX, int srcY, int width, int height) - { - gui.drawTexturedModalRect(gui.getLeft() + x, gui.getTop() + y, srcX, srcY, width, height); - } - - /** - * @param gui - * @param mouseX - * @param mouseY - * @param str - */ - public void drawString(GuiGuide gui, int mouseX, int mouseY, String str) - { - if (inRect(gui, mouseX, mouseY)) gui.drawHoverString(Arrays.asList(str.split("\n")), mouseX - gui.getLeft(), mouseY - gui.getTop()); - } - - /** - * @return - */ - public ItemStack getIcon() - { - return null; - } -} diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTab.java b/src/main/java/darkknight/jewelrycraft/container/GuiTab.java deleted file mode 100644 index e315d3a..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/GuiTab.java +++ /dev/null @@ -1,84 +0,0 @@ -package darkknight.jewelrycraft.container; - -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 -{ - int values, del; - private String name; - - /** - * @param name - * @param id - */ - public GuiTab(String name, int id) - { - super(-62, 10 + 19 * id, 19, 18); - this.name = name; - values = 0; - del = 0; - } - - /** - * @return - */ - public String getName() - { - return name; - } - - /** - * @param gui - * @param x - * @param y - * @param page - */ - public abstract void drawBackground(GuiGuide gui, int x, int y, int page); - - /** - * @param gui - * @param x - * @param y - * @param page - */ - public abstract void drawForeground(GuiGuide gui, int x, int y, int page); - - /** - * @param gui - * @param x - * @param y - * @param button - */ - public void mouseClick(GuiGuide gui, int x, int y, int button) - {} - - /** - * @param gui - * @param x - * @param y - * @param button - * @param timeSinceClicked - */ - public void mouseMoveClick(GuiGuide gui, int x, int y, int button, long timeSinceClicked) - {} - - /** - * @param gui - * @param x - * @param y - * @param button - */ - public void mouseReleased(GuiGuide gui, int x, int y, int button) - {} - - /** - * @return - */ - public int getMaxPages() - { - return 1; - } -} diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabBlocks.java b/src/main/java/darkknight/jewelrycraft/container/GuiTabBlocks.java deleted file mode 100644 index de50533..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/GuiTabBlocks.java +++ /dev/null @@ -1,176 +0,0 @@ -package darkknight.jewelrycraft.container; - -import java.awt.Desktop; -import java.net.URL; -import net.minecraft.init.Blocks; -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.item.ItemList; - -public class GuiTabBlocks extends GuiTab -{ - - /** - * @param id - */ - public GuiTabBlocks(int id) - { - super("Blocks", id); - } - - /** - * @return - */ - @Override - public ItemStack getIcon() - { - return new ItemStack(BlockList.jewelAltar); - } - - /** - * @param gui - * @param x - * @param y - * @param page - */ - @Override - public void drawBackground(GuiGuide gui, int x, int y, int page) - { - String text = ""; - int xPos = page % 2 == 0 ? 107 : -35; - switch(page) - { - case 1: - text = "This ore is extremely rare and can be found only between Y-level 5 and 8. It can only be mined using a diamond pickaxe."; - Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop(), new ItemStack(BlockList.shadowOre), text, 90f, true); - break; - case 2: - text = "The Shadow Block is crafted using 9 shadow ingots. Magicians believed it held the ability to merge with the shadows. It becomes more transparent as it"; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.shadowBlock), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot)); - break; - case 3: - text = "gets darker. If a comparator is attached to it, the output strength will be equal to the value of darkness it is in."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 4: - text = "The smelter is one of the first blocks needed to get started with Jewelrycraft. Requiring just some cobble and a couple buckets. It is required in order to"; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.smelter), new ItemStack(Blocks.cobblestone), new ItemStack(Items.bucket), new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.cobblestone)); - break; - case 5: - text = "melt ingots or even ores which can be made into rings, necklaces, bracelets or earrings. To use the block all you need to do is right click on it with any ore or ingot. It can melt multimple ingots/ores at a time. Crouch (default: Shift) + Right Click will remove all items"; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 6: - text = "added. If right clicked when done smelting, it will say what the block contains."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 7: - text = "The molder is a key piece in creating jewellery. You need to pour the molten metal out of the smelter somewhere. That somewhere is the"; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.molder), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone)); - break; - case 8: - text = "molder. But before pouring the molten metal in it, you must first add a mold. You can do that by simply right clicking the block with the mold of your choice. If you want to get the mold out, simply crouch and Right Click it with an empty hand. Once you"; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 9: - text = "have a mold inside, left click on the smelter and wait for the metal to cool down. When it's done, left click on the molder to get the jewellery. Be aware that this block must be placed directly in front of the smelter, otherwise it won't work!"; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 10: - text = "This table allows you to add a gem to a piece of jewellery. Right click the block while holding a jewellery to add it in. Then do the same with a gem (you"; - if (del == 0) values++; - del++; - if (del >= 300) del = 0; - if (values >= 4) values = 0; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.jewelCraftingTable), new ItemStack(Blocks.planks, 1, values), new ItemStack(Blocks.planks, 1, values), new ItemStack(Blocks.planks, 1, values), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone)); - break; - case 11: - text = "can find a list with all possible gems in this guide). Crouch + Right Click to retreive placed items. Left Click the block to see the progress the crafting has made. Once the crafting is done, Left Click the block to get the item. You are able to recraft a"; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 12: - text = "jewellery by readding the modified version to this block and adding a different gem to it. Once the crafting is done, the current gem will be replaced by the new one. There is also a 50% chance that you will get back the old gem."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 13: - text = "This block can store any jewellery in it and activate their effects as it were a player. To do that simply right click the block with a jewellery. Crouch +"; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.jewelAltar), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.wool, 1, 5), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.wool, 1, 5), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick)); - break; - case 14: - text = "Right Click to retreive the jewellery."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 15: - text = "The Storage Displayer, as the name suggests, can store a large amount (Up to: " + Integer.MAX_VALUE + ") of a single item/block placed in it. It will"; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.displayer), null, new ItemStack(Items.iron_ingot), null, new ItemStack(Items.iron_ingot), new ItemStack(Items.iron_ingot), new ItemStack(Items.iron_ingot), new ItemStack(Blocks.emerald_block), new ItemStack(Blocks.emerald_block), new ItemStack(Blocks.emerald_block)); - break; - case 16: - text = "display all possible infromation about the object in it, such as the name, durability, enchantments etc. To store something in it simply right click with that object on it and the whole amount of items or blocks you are holding will be immediately stored inside."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 17: - text = "If a displayer already contains an item and you have that in your inventory, you can simply hold right click on it with an empty hand to add all of your items of that type from your inventory. To retrieve a single item just left click the block. If you wish to"; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 18: - text = "get a whole stack, Crouch + Left Click on it. In creative mode you can simply hold Right Click on a displayer containing an object and it will add 64 of it with every right click, without it being in your inventory."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 19: - text = "This mysterious shaped block is used in the ritual. The acient ones claimed it had the power to travel through worlds. They would use these to offer"; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.handPedestal), new ItemStack(Blocks.cobblestone_wall), new ItemStack(Blocks.cobblestone_wall), new ItemStack(Blocks.cobblestone_wall), null, new ItemStack(Blocks.stonebrick), null, new ItemStack(Blocks.stone_slab, 1, 5), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stone_slab, 1, 5)); - break; - case 20: - text = "sacrifices to 'The Dark One' in exchange for unimaginable powers."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 21: - text = "The Cursed Eye is an ancient artifact also known as 'The Dark One's Eye'. It is part of the sacrifice ritual the ancient ones talk about. Be careful"; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.shadowEye), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Items.ender_eye), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick)); - break; - case 22: - text = "though, for He sees everything. To see how to create the ritual look in the Ritual tab."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - default: - ; - } - } - - /** - * @return - */ - @Override - public int getMaxPages() - { - return 21; - } - - /** - * @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 - public void drawForeground(GuiGuide gui, int x, int y, int page) - {} -} diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabGemsAndIngots.java b/src/main/java/darkknight/jewelrycraft/container/GuiTabGemsAndIngots.java deleted file mode 100644 index 5f2bde0..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/GuiTabGemsAndIngots.java +++ /dev/null @@ -1,78 +0,0 @@ -package darkknight.jewelrycraft.container; - -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 -{ - - /** - * @param id - */ - public GuiTabGemsAndIngots(int id) - { - super("Gems and ingots", id); - } - - /** - * @return - */ - @Override - public ItemStack getIcon() - { - return new ItemStack(Items.emerald); - } - - /** - * @param gui - * @param x - * @param y - * @param page - */ - @Override - public void drawBackground(GuiGuide gui, int x, int y, int page) - { - int xPos = page % 2 == 0 ? 107 : -35; - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - for(int i = (page - 1) * 9; i < page * 9; i++) - if (i < JewelrycraftUtil.gem.size()){ - gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Gems", gui.getLeft() + xPos + 40, gui.getTop(), 0); - gui.renderItem(JewelrycraftUtil.gem.get(i), gui.getLeft() + xPos + 10, gui.getTop() + 22 + 16 * (i - 9 * (page - 1)), 30f, true, 0, 0, 0); - gui.getFont().drawString(String.format("%-1.18s", JewelrycraftUtil.gem.get(i).getDisplayName()), gui.getLeft() + xPos + 20, gui.getTop() + 12 + 16 * (i - 9 * (page - 1)), 0); - GL11.glDisable(GL11.GL_LIGHTING); - } - page -= JewelrycraftUtil.gem.size() / 9 + 1; - for(int i = (page - 1) * 9; i < page * 9; i++) - if (i < JewelrycraftUtil.metal.size() && page > 0){ - gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Ingots", gui.getLeft() + xPos + 40, gui.getTop(), 0); - gui.renderItem(JewelrycraftUtil.metal.get(i).copy(), gui.getLeft() + xPos + 10, gui.getTop() + 22 + 16 * (i - 9 * (page - 1)), 30f, true, 0, 0, 0); - gui.getFont().drawString(String.format("%-1.18s", JewelrycraftUtil.metal.get(i).copy().getDisplayName()), gui.getLeft() + xPos + 20, gui.getTop() + 12 + 16 * (i - 9 * (page - 1)), 0); - GL11.glDisable(GL11.GL_LIGHTING); - } - GL11.glDisable(GL11.GL_BLEND); - } - - /** - * @return - */ - @Override - public int getMaxPages() - { - return JewelrycraftUtil.gem.size() / 9 + JewelrycraftUtil.metal.size() / 9 + 2; - } - - /** - * @param gui - * @param x - * @param y - * @param page - */ - @Override - public void drawForeground(GuiGuide gui, int x, int y, int page) - {} -} diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabIntroduction.java b/src/main/java/darkknight/jewelrycraft/container/GuiTabIntroduction.java deleted file mode 100644 index f14c81e..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/GuiTabIntroduction.java +++ /dev/null @@ -1,52 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import darkknight.jewelrycraft.client.GuiGuide; -import darkknight.jewelrycraft.item.ItemList; - -public class GuiTabIntroduction extends GuiTab -{ - public GuiTabIntroduction(int id) - { - super("Introduction", id); - } - - @Override - public ItemStack getIcon() - { - return new ItemStack(ItemList.ring); - } - - @Override - public void drawBackground(GuiGuide gui, int x, int y, int page) - { - String text = ""; - int xPos = page % 2 == 0 ? 107 : -35; - switch(page) - { - case 1: - text = "Welcome to Jewelrycraft 2! This mod is about making jewelry that you can modify to your own will. To find out how to create a jewelry, please consult the book and look at the Smelter block. To add modifiers to it you need to perform a ritual. To see how to do that, look at the Cursed Eye"; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 2: - text = "block in this giude. Please be aware that even if you can add anything as a modifier and can have multiple modifiers on one jewelry, this mod is still in alpha and does not have that many modifiers implemtnted and currently don't have any different effects depending on"; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 3: - text = "the gem used. To see what modifiers are currently implemented, just look in the Modifiers tab located in this guide (it is the one with the blaze powder as an icon)."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - } - } - - @Override - public int getMaxPages() - { - return 4; - } - - @Override - public void drawForeground(GuiGuide gui, int x, int y, int page) - {} -} diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabItems.java b/src/main/java/darkknight/jewelrycraft/container/GuiTabItems.java deleted file mode 100644 index 85c7211..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/GuiTabItems.java +++ /dev/null @@ -1,166 +0,0 @@ -package darkknight.jewelrycraft.container; - -import java.awt.Desktop; -import java.net.URL; -import net.minecraft.init.Blocks; -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.item.ItemList; -import darkknight.jewelrycraft.util.JewelryNBT; -import darkknight.jewelrycraft.util.JewelrycraftUtil; - -public class GuiTabItems extends GuiTab -{ - - /** - * @param id - */ - public GuiTabItems(int id) - { - super("Items", id); - } - - /** - * @return - */ - @Override - public ItemStack getIcon() - { - return new ItemStack(ItemList.thiefGloves); - } - - /** - * @param gui - * @param x - * @param y - * @param page - */ - @Override - public void drawBackground(GuiGuide gui, int x, int y, int page) - { - String text = ""; - int xPos = page % 2 == 0 ? 107 : -35; - switch(page) - { - case 1: - text = "Shadow ingots are obtained by smelting shadow ore. They are used in a few recipes and an important key for making some jewelry work."; - Page.addSmeltingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text, x, y, true, new ItemStack(BlockList.shadowOre), new ItemStack(ItemList.shadowIngot)); - break; - case 2: - text = "These gloves give you the chance to steal the trades those pesky Testificates have to offer. To use these simply open their gui at least once, then Crouch and"; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.thiefGloves), new ItemStack(ItemList.shadowIngot), null, new ItemStack(ItemList.shadowIngot), new ItemStack(Blocks.wool, 1, 15), new ItemStack(ItemList.shadowIngot), new ItemStack(Blocks.wool, 1, 15), new ItemStack(Blocks.wool, 1, 15), new ItemStack(ItemList.shadowIngot), new ItemStack(Blocks.wool, 1, 15)); - break; - case 3: - text = "right click on the them to hopefully steal the trades. If you traded with him before, then you have a chance of getting the traded emeralds back as well. This has a maximum of 10 uses before it breaks."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 4: - text = "In order to get the ingot back from the smelter you need a mold for it. However, this mold can't be used. It is too soft. It needs to be hardened in order for it to be used."; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), true, text, x, y, true, new ItemStack(ItemList.clayMolds, 1, 0), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball)); - break; - case 5: - text = "To create a ring you need a mold for it. However, this one is too soft to be used. It needs to be hardened in order for it to be used."; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.clayMolds, 1, 1), null, new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null); - break; - case 6: - text = "To create a necklace you need a mold for it. However, this one can't be used. It is too soft. It needs to be hardened in order for it to be used."; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.clayMolds, 1, 2), new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null); - break; - case 7: - text = "To create a bracelet you need a mold for it. However, this one can't be used. It is too soft. It needs to be hardened in order for it to be used."; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.clayMolds, 1, 3), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball), new ItemStack(Items.clay_ball)); - break; - case 8: - text = "To create a necklace you need a mold for it. However, this one can't be used. It is too soft. It needs to be hardened in order for it to be used."; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.clayMolds, 1, 4), null, null, null, new ItemStack(Items.clay_ball), null, new ItemStack(Items.clay_ball), null, null, null); - break; - case 9: - if (del == 0) values++; - del++; - if (del >= 300) del = 0; - if (values > 4) values = 0; - text = "By smelting a clay mold you get a harder version which can be used to create jewelry. Simply right click with this on a molder to attach it and you're ready to go."; - Page.addSmeltingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text, x, y, true, new ItemStack(ItemList.clayMolds, 1, values), new ItemStack(ItemList.molds, 1, values)); - break; - case 10: - text = "Crystals don't do much as of yet. They can be dyed in any color and used as gems to create a nice jewelry."; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(ItemList.crystal, 1, 15), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null); - break; - case 11: - if (del == 0) values++; - del++; - if (del >= 300) del = 0; - if (values >= 15) values = 0; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), true, text, x, y, true, new ItemStack(ItemList.crystal, 1, values), new ItemStack(Items.dye, 1, values), new ItemStack(ItemList.crystal, 1, 15)); - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop() + 60, true, text, x, y, true, new ItemStack(ItemList.crystal, 1, 15), new ItemStack(Items.dye, 1, 15), new ItemStack(ItemList.crystal, 1, values)); - break; - case 12: - if (del == 0) values++; - del++; - if (del >= 300) del = 0; - if (values > 4) values = 0; - text = "It's this exact guide. I don't even know why you're reading this. I added this recipe in case you lose the original. Even if this is more helpful than NEI, I do suggest"; - Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), true, text, x, y, true, new ItemStack(ItemList.guide), new ItemStack(ItemList.molds, 1, values), new ItemStack(Items.book)); - break; - case 13: - String link = "HERE"; - if (x >= gui.getLeft() && x <= gui.getLeft() + 30 && y >= gui.getTop() + 104 && y <= gui.getTop() + 124) link = EnumChatFormatting.DARK_BLUE + "HERE" + EnumChatFormatting.BLACK; - text = "installing it so you can see all the recipes. Since you are reading this, how about making a youtube video spotlighting this mod. I'd really appreciate it. After that you can share it in the main thread " + link + "." + " This mod was made by DarkKnight (or sor1n, depends"; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 14: - text = "where you got this mod from) and the help of domi1819 and bspkrs."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 15: - ItemStack item = new ItemStack(ItemList.bucket); - if (del == 0) values++; - del++; - if (del >= 300) del = 0; - if (values > JewelrycraftUtil.metal.size() - 1) values = 0; - JewelryNBT.addMetal(item, JewelrycraftUtil.metal.get(values).copy()); - text = "These buckets contain molten metal. To obtain one simply Right Click a full Smelter to get a bucket. You can pour the metal, other than that it has no use. You can place the molten metal back in a Smelter by Right Clicking one with it."; - Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop() - 5, item, text, 40f, 0, 0, true, 45, 10, true); - break; - default: - ; - } - } - - /** - * @return - */ - @Override - public int getMaxPages() - { - return 15; - } - - /** - * @param gui - * @param x - * @param y - * @param button - */ - @Override - public void mouseClick(GuiGuide gui, int x, int y, int button) - { - if (gui.page == 13 && x >= gui.getLeft() && x <= gui.getLeft() + 30 && y >= gui.getTop() + 104 && y <= gui.getTop() + 124) try{ - Desktop.getDesktop().browse(new URL("http://www.minecraftforum.net/topic/2210959-164smp-ssp-jewelrycraft-version-12/").toURI()); - } - catch(Exception e){} - } - - /** - * @param gui - * @param x - * @param y - * @param page - */ - @Override - public void drawForeground(GuiGuide gui, int x, int y, int page) - {} -} diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabModifiers.java b/src/main/java/darkknight/jewelrycraft/container/GuiTabModifiers.java deleted file mode 100644 index 89db85b..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/GuiTabModifiers.java +++ /dev/null @@ -1,74 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import darkknight.jewelrycraft.client.GuiGuide; - -public class GuiTabModifiers extends GuiTab -{ - int maxPages; - public GuiTabModifiers(int id) - { - super("Modifiers", id); - } - - /** - * @return - */ - @Override - public ItemStack getIcon() - { - return new ItemStack(Items.blaze_powder); - } - - /** - * @param gui - * @param x - * @param y - * @param page - */ - @Override - public void drawBackground(GuiGuide gui, int x, int y, int page) - { - String text = ""; - int xPos = page % 2 == 0 ? 107 : -35; - switch(page) - { - case 1: - text = "Although you can add anything as a modifier, only some objects have an effect. In this tab you can find all of modifiers that have a use and what they do, in the form of a story/riddle/poem. However different jewellery have different effects for the same modifier."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 2: - text = "The ancient ones talked about a rising fire in your heart. Fret do not, for flames do not burn, but water might sting a turn. Watch your step, do not be cocky, for its protection is a bit sloppy."; - Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop() - 7, new ItemStack(Items.blaze_powder), text, 40f, true); - break; - case 3: - text = "Light and swift as a feather can be good all together. Enemies miss and get confused, this power can be abused. Against an arrow you can't compare, so move around, don't just stare. Fire is your enemy and weakness is the penalty."; - Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop() - 7, new ItemStack(Items.feather), text, 40f, true); - break; - case 4: - text = "Endermen may tolerate you, end portals are near too, you may find ore that is true. But be careful, for the power may make you dizzy, blind you if you're a sissy, worsen your vision if you're unaware and shift positions everywhere."; - Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop() - 7, new ItemStack(Items.ender_eye), text, 40f, true); - break; - } - } - - /** - * @return - */ - @Override - public int getMaxPages() - { - return 4; - } - - /** - * @param gui - * @param x - * @param y - * @param page - */ - @Override - public void drawForeground(GuiGuide gui, int x, int y, int page) - {} -} diff --git a/src/main/java/darkknight/jewelrycraft/container/GuiTabRitual.java b/src/main/java/darkknight/jewelrycraft/container/GuiTabRitual.java deleted file mode 100644 index eed8072..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/GuiTabRitual.java +++ /dev/null @@ -1,125 +0,0 @@ -package darkknight.jewelrycraft.container; - -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; - -public class GuiTabRitual extends GuiTab -{ - public GuiTabRitual(int id) - { - super("Ritual", id); - } - - @Override - public ItemStack getIcon() - { - return new ItemStack(BlockList.handPedestal); - } - - @Override - public void drawBackground(GuiGuide gui, int x, int y, int page) - { - int xPos = page % 2 == 0 ? 107 : -35; - switch(page) - { - case 1: - Page.drawText(gui, EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Layer 1", gui.getLeft() + xPos + 35, gui.getTop() - 30); - for(int i = -1; i < 10; i++) - for(int j = 0; j < 11; j++) - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*i, gui.getTop() + 11*j, x, y, new ItemStack(Blocks.air), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*1, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*1, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*9, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*9, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - - //Top - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*1, x, y, new ItemStack(BlockList.handPedestal), 0, 45, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*4, gui.getTop() + 11*0, x, y, new ItemStack(BlockList.handPedestal), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*1, x, y, new ItemStack(BlockList.handPedestal), 0, -45, 0); - - //Left - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*3, x, y, new ItemStack(BlockList.handPedestal), 0, 45, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*-1, gui.getTop() + 11*5, x, y, new ItemStack(BlockList.handPedestal), 0, 90, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*7, x, y, new ItemStack(BlockList.handPedestal), 0, 135, 0); - - //Bottom - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*9, x, y, new ItemStack(BlockList.handPedestal), 0, 135, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*4, gui.getTop() + 11*10, x, y, new ItemStack(BlockList.handPedestal), 0, 180, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*9, x, y, new ItemStack(BlockList.handPedestal), 0, 225, 0); - - //Right - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*3, x, y, new ItemStack(BlockList.handPedestal), 0, -35, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*9, gui.getTop() + 11*5, x, y, new ItemStack(BlockList.handPedestal), 0, 270, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*7, x, y, new ItemStack(BlockList.handPedestal), 0, 225, 0); - - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*4, gui.getTop() + 11*5, x, y, new ItemStack(BlockList.handPedestal), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - break; - - case 2: - Page.drawText(gui, EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Layer 2", gui.getLeft() + xPos + 35, gui.getTop() - 30); - for(int i = -1; i < 10; i++) - for(int j = 0; j < 11; j++) - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*i, gui.getTop() + 11*j, x, y, new ItemStack(Blocks.air), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*1, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*1, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*9, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*9, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - break; - - case 3: - Page.drawText(gui, EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Layer 3", gui.getLeft() + xPos + 35, gui.getTop() - 30); - for(int i = -1; i < 10; i++) - for(int j = 0; j < 11; j++) - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*i, gui.getTop() + 11*j, x, y, new ItemStack(Blocks.air), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*1, x, y, new ItemStack(BlockList.shadowBlock), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*1, x, y, new ItemStack(BlockList.shadowBlock), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*8, gui.getTop() + 11*9, x, y, new ItemStack(BlockList.shadowBlock), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*0, gui.getTop() + 11*9, x, y, new ItemStack(BlockList.shadowBlock), 0, 0, 0); - - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stonebrick), 0, 0, 0); - break; - - case 4: - Page.drawText(gui, EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Layer 4", gui.getLeft() + xPos + 35, gui.getTop() - 30); - for(int i = -1; i < 10; i++) - for(int j = 0; j < 11; j++) - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*i, gui.getTop() + 11*j, x, y, new ItemStack(Blocks.air), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*2, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_brick_stairs), 0, 90, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*3, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_brick_stairs), 0, -90, 180); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*4, gui.getTop() + 11*5, x, y, new ItemStack(BlockList.shadowEye), 0, 90, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*5, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_brick_stairs), 0, 90, 180); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*6, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_brick_stairs), 0, -90, 0); - break; - - case 5: - Page.drawText(gui, EnumChatFormatting.DARK_BLUE + "\u00a7n" + "Layer 5", gui.getLeft() + xPos + 35, gui.getTop() - 30); - for(int i = -1; i < 10; i++) - for(int j = 0; j < 11; j++) - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*i, gui.getTop() + 11*j, x, y, new ItemStack(Blocks.air), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*3, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_slab, 1, 5), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*4, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_slab, 1, 5), 0, 0, 0); - Page.addSlotItem(gui, gui.getLeft() + xPos + 11*5, gui.getTop() + 11*5, x, y, new ItemStack(Blocks.stone_slab, 1, 5), 0, 0, 0); - break; - } - } - - @Override - public int getMaxPages() - { - return 5; - } - - @Override - public void drawForeground(GuiGuide gui, int x, int y, int page) - {} -} diff --git a/src/main/java/darkknight/jewelrycraft/container/JewelryInventory.java b/src/main/java/darkknight/jewelrycraft/container/JewelryInventory.java deleted file mode 100644 index ce6f0b5..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/JewelryInventory.java +++ /dev/null @@ -1,165 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import darkknight.jewelrycraft.item.ItemBracelet; -import darkknight.jewelrycraft.item.ItemEarrings; -import darkknight.jewelrycraft.item.ItemNecklace; -import darkknight.jewelrycraft.item.ItemRing; -import darkknight.jewelrycraft.util.PlayerUtils; - -public class JewelryInventory implements IInventory -{ - public EntityPlayer player; - public ItemStack[] inventory = new ItemStack[18]; - - /** - * @param player - */ - public JewelryInventory(EntityPlayer player) - { - this.player = player; - NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft"); - for(int i = 0; i < 18; i++) - inventory[i] = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("ext" + i)); - } - - /** - * @return - */ - @Override - public int getSizeInventory() - { - return inventory.length; - } - - /** - * @param slot - * @return - */ - @Override - public ItemStack getStackInSlot(int slot) - { - return inventory[slot]; - } - - /** - * @param slot - * @param amount - * @return - */ - @Override - public ItemStack decrStackSize(int slot, int amount) - { - ItemStack stack = getStackInSlot(slot); - if (stack != null) if (stack.stackSize > amount){ - stack = stack.splitStack(amount); - markDirty(); - }else setInventorySlotContents(slot, null); - return stack; - } - - /** - * @param slot - * @return - */ - @Override - public ItemStack getStackInSlotOnClosing(int slot) - { - ItemStack stack = getStackInSlot(slot); - setInventorySlotContents(slot, null); - return stack; - } - - /** - * @param slot - * @param stack - */ - @Override - public void setInventorySlotContents(int slot, ItemStack stack) - { - inventory[slot] = stack; - if (stack != null && stack.stackSize > getInventoryStackLimit()) stack.stackSize = getInventoryStackLimit(); - markDirty(); - } - - /** - * @return - */ - @Override - public String getInventoryName() - { - return "Jewelry"; - } - - /** - * @return - */ - @Override - public boolean hasCustomInventoryName() - { - return false; - } - - /** - * @return - */ - @Override - public int getInventoryStackLimit() - { - return 1; - } - - /** - * - */ - @Override - public void markDirty() - { - NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft"); - 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); - } - - /** - * @param player - * @return - */ - @Override - public boolean isUseableByPlayer(EntityPlayer player) - { - return true; - } - - /** - * - */ - @Override - public void openInventory() - {} - - /** - * - */ - @Override - public void closeInventory() - {} - - /** - * @param slot - * @param stack - * @return - */ - @Override - public boolean isItemValidForSlot(int slot, ItemStack stack) - { - if (slot >= 0 && slot <= 9 && stack.getItem() instanceof ItemRing) return true; - else if (slot >= 10 && slot <= 13 && stack.getItem() instanceof ItemBracelet) return true; - else if (slot >= 14 && slot <= 16 && stack.getItem() instanceof ItemNecklace) return true; - else if (slot == 17 && stack.getItem() instanceof ItemEarrings) return true; - return false; - } -} \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/container/Page.java b/src/main/java/darkknight/jewelrycraft/container/Page.java deleted file mode 100644 index beaa0bc..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/Page.java +++ /dev/null @@ -1,197 +0,0 @@ -package darkknight.jewelrycraft.container; - -import java.util.ArrayList; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.item.ItemStack; -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; - -public class Page -{ - static ResourceLocation pageFlipped = new ResourceLocation("jewelrycraft", "textures/gui/guidePageFlip.png"); - - /** - * @param gui - * @param x - * @param y - * @param isSmall - * @param text - * @param mouseX - * @param mouseY - * @param items - */ - public static void addCraftingRecipeTextPage(GuiGuide gui, int x, int y, boolean isSmall, String text, int mouseX, int mouseY, boolean rotate, ItemStack ... items) - { - y += 5; - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + items[0].getDisplayName(), x + Math.abs(70 - gui.getFont().getStringWidth(items[0].getDisplayName()) / 2) - 10, y - 2, 0); - GL11.glColor4f(1, 1, 1, 1); - Minecraft.getMinecraft().getTextureManager().bindTexture(pageFlipped); - ArrayList name = new ArrayList(); - if (isSmall){ - gui.drawTexturedModalRect(x, y + 10, 145, 54, 111, 46); - gui.renderItem(items[0], x + 89, y + 22 + 10, 30f, rotate, 0, 0, 0); - for(int i = 1; i <= 4; i++) - if (items.length > i && items[i] != null){ - int posX = x + 8 + (i - 1) % 2 * 22; - int posY = y + 26 + (i - 1) / 2 * 22; - gui.renderItem(items[i], posX, posY, 30f, rotate, 0, 0, 0); - name.add(items[i].getDisplayName()); - if (mouseX >= posX - 8 && mouseX <= posX + 8 && mouseY >= posY - 16 && mouseY <= posY) gui.drawHoverString(name, posX - 20, posY - 14); - name.removeAll(name); - GL11.glDisable(GL11.GL_LIGHTING); - } - drawText(gui, text, x, y + 25); - }else{ - gui.drawTexturedModalRect(x, y + 12, 145, 0, 111, 54); - gui.renderItem(items[0], x + 91, y + 28 + 10, 30f, rotate, 0, 0, 0); - for(int i = 1; i <= 9; i++) - if (items.length > i && items[i] != null){ - int posX = x + 8 + (i - 1) % 3 * 19; - int posY = y + 22 + (i - 1) / 3 * 17; - gui.renderItem(items[i], posX, posY, 30f, rotate, 0, 0, 0); - name.add(items[i].getDisplayName()); - if (mouseX >= posX - 8 && mouseX <= posX + 8 && mouseY >= posY - 10 && mouseY <= posY) gui.drawHoverString(name, posX - 20, posY - 12); - name.removeAll(name); - GL11.glDisable(GL11.GL_LIGHTING); - } - drawText(gui, text, x, y + 32); - GL11.glColor4f(1, 1, 1, 1); - } - GL11.glDisable(GL11.GL_BLEND); - } - - /** - * @param gui - * @param x - * @param y - * @param text - * @param mouseX - * @param mouseY - * @param items - */ - public static void addSmeltingRecipeTextPage(GuiGuide gui, int x, int y, String text, int mouseX, int mouseY, boolean rotate, ItemStack ... items) - { - ArrayList name = new ArrayList(); - gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + items[1].getDisplayName(), x + 30 - items[0].getDisplayName().length() / 2, y + 2, 0); - GL11.glColor4f(1, 1, 1, 1); - Minecraft.getMinecraft().getTextureManager().bindTexture(pageFlipped); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - gui.drawTexturedModalRect(x, y + 10, 145, 100, 111, 52); - gui.renderItem(items[0], x + 13, y + 20 + 10, 35f, rotate, 0, 0, 0); - name.add(items[0].getDisplayName()); - if (mouseX >= x && mouseX <= x + 20 && mouseY >= y + 20 && mouseY <= y + 20 + 16) gui.drawHoverString(name, x, y + 20); - name.removeAll(name); - GL11.glDisable(GL11.GL_LIGHTING); - gui.renderItem(items[1], x + 77, y + 28 + 10, 35f, rotate, 0, 0, 0); - drawText(gui, text, x, y + 30); - GL11.glColor4f(1, 1, 1, 1); - GL11.glDisable(GL11.GL_BLEND); - } - - /** - * @param gui - * @param x - * @param y - * @param item - * @param text - * @param size - */ - public static void addImageTextPage(GuiGuide gui, int x, int y, ItemStack item, String text, float size, boolean rotate) - { - y += 5; - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + item.getDisplayName(), x + Math.abs(70 - gui.getFont().getStringWidth(item.getDisplayName()) / 2) - 10, y + (int)size/5, 0); - GL11.glColor4f(1, 1, 1, 1); - gui.renderItem(item, x + 13, y + 18, size, rotate, 0, 0, 0); - drawText(gui, text, x - 2, y - (int)(250 / size)); - GL11.glDisable(GL11.GL_BLEND); - } - - public static void addSlotItem(GuiGuide gui, int x, int y, int mouseX, int mouseY, ItemStack item, float xRot, float yRot, float zRot) - { - ArrayList name = new ArrayList(); - GL11.glColor4f(1, 1, 1, 1); - Minecraft.getMinecraft().getTextureManager().bindTexture(pageFlipped); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - gui.drawTexturedModalRect(x + 9, y + 19, 148, 153, 12, 12); - if(item.getItem() != null){ - name.add(item.getDisplayName()); - if (mouseX >= x + 10 && mouseX <= x + 20 && mouseY >= y + 20 && mouseY <= y + 30) gui.drawHoverString(name, x, y + 10); - name.removeAll(name); - } - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glColor4f(1, 1, 1, 1); - if(item.getItem() != null) gui.renderItem(item, x + 15, y + 25, 40f, false, xRot, yRot, zRot); - GL11.glDisable(GL11.GL_BLEND); - } - - /** - * @param gui - * @param x - * @param y - * @param item - * @param text - * @param size - * @param txtX - * @param txtY - * @param showName - * @param imgX - * @param imgY - */ - public static void addImageTextPage(GuiGuide gui, int x, int y, ItemStack item, String text, float size, int txtX, int txtY, boolean showName, int imgX, int imgY, boolean rotate) - { - y += 5; - GL11.glEnable(GL11.GL_BLEND); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - if (showName) gui.getFont().drawString(EnumChatFormatting.DARK_BLUE + "\u00a7n" + item.getDisplayName(), x + Math.abs(70 - gui.getFont().getStringWidth(item.getDisplayName()) / 2) - 10, y + 2, 0); - GL11.glColor4f(1, 1, 1, 1); - gui.renderItem(item, x + 13 + imgX, y + 18 + imgY, size, rotate, 0, 0, 0); - drawText(gui, text, x + txtX, y + txtY); - GL11.glDisable(GL11.GL_BLEND); - } - - /** - * @param gui - * @param x - * @param y - * @param text - */ - public static void addTextPage(GuiGuide gui, int x, int y, String text) - { - y -= 25; - drawText(gui, text, x, y); - GL11.glColor4f(1, 1, 1, 1); - } - - /** - * @param gui - * @param text - * @param x - * @param y - */ - public static void drawText(GuiGuide gui, String text, int x, int y) - { - String[] s = text.split(" "); - String displayText = ""; - ArrayList textLines = new ArrayList(); - for(String element: s) - if ((displayText + element + " ").length() <= 24) displayText += element + " "; - else{ - textLines.add(displayText.trim()); - displayText = element + " "; - } - textLines.add(displayText.trim()); - for(int i = 0; i < textLines.size(); i++) - gui.getFont().drawString(textLines.get(i), x, y + 30 + i * 12, 0); - } -} diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotBracelet.java b/src/main/java/darkknight/jewelrycraft/container/SlotBracelet.java deleted file mode 100644 index c82421d..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/SlotBracelet.java +++ /dev/null @@ -1,52 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import darkknight.jewelrycraft.item.ItemBracelet; - -public class SlotBracelet extends Slot -{ - - /** - * @param tile - * @param slotID - * @param x - * @param y - */ - public SlotBracelet(IInventory tile, int slotID, int x, int y) - { - super(tile, slotID, x, y); - } - - /** - * @param stack - * @return - */ - @Override - public boolean isItemValid(ItemStack stack) - { - return stack.getItem() instanceof ItemBracelet; - } - - /** - * @param amount - * @return - */ - @Override - public ItemStack decrStackSize(int amount) - { - return super.decrStackSize(amount); - } - - /** - * @param player - * @return - */ - @Override - public boolean canTakeStack(EntityPlayer player) - { - return true; - } -} diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotEarrings.java b/src/main/java/darkknight/jewelrycraft/container/SlotEarrings.java deleted file mode 100644 index 550f4f9..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/SlotEarrings.java +++ /dev/null @@ -1,52 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import darkknight.jewelrycraft.item.ItemEarrings; - -public class SlotEarrings extends Slot -{ - - /** - * @param tile - * @param slotID - * @param x - * @param y - */ - public SlotEarrings(IInventory tile, int slotID, int x, int y) - { - super(tile, slotID, x, y); - } - - /** - * @param stack - * @return - */ - @Override - public boolean isItemValid(ItemStack stack) - { - return stack.getItem() instanceof ItemEarrings; - } - - /** - * @param amount - * @return - */ - @Override - public ItemStack decrStackSize(int amount) - { - return super.decrStackSize(amount); - } - - /** - * @param player - * @return - */ - @Override - public boolean canTakeStack(EntityPlayer player) - { - return true; - } -} diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotNecklace.java b/src/main/java/darkknight/jewelrycraft/container/SlotNecklace.java deleted file mode 100644 index 42543b0..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/SlotNecklace.java +++ /dev/null @@ -1,52 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import darkknight.jewelrycraft.item.ItemNecklace; - -public class SlotNecklace extends Slot -{ - - /** - * @param tile - * @param slotID - * @param x - * @param y - */ - public SlotNecklace(IInventory tile, int slotID, int x, int y) - { - super(tile, slotID, x, y); - } - - /** - * @param stack - * @return - */ - @Override - public boolean isItemValid(ItemStack stack) - { - return stack.getItem() instanceof ItemNecklace; - } - - /** - * @param amount - * @return - */ - @Override - public ItemStack decrStackSize(int amount) - { - return super.decrStackSize(amount); - } - - /** - * @param player - * @return - */ - @Override - public boolean canTakeStack(EntityPlayer player) - { - return true; - } -} diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotRing.java b/src/main/java/darkknight/jewelrycraft/container/SlotRing.java deleted file mode 100644 index 52aa4fb..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/SlotRing.java +++ /dev/null @@ -1,52 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import darkknight.jewelrycraft.item.ItemRing; - -public class SlotRing extends Slot -{ - - /** - * @param tile - * @param slotID - * @param x - * @param y - */ - public SlotRing(IInventory tile, int slotID, int x, int y) - { - super(tile, slotID, x, y); - } - - /** - * @param stack - * @return - */ - @Override - public boolean isItemValid(ItemStack stack) - { - return stack.getItem() instanceof ItemRing; - } - - /** - * @param amount - * @return - */ - @Override - public ItemStack decrStackSize(int amount) - { - return super.decrStackSize(amount); - } - - /** - * @param player - * @return - */ - @Override - public boolean canTakeStack(EntityPlayer player) - { - return true; - } -} diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotRingChest.java b/src/main/java/darkknight/jewelrycraft/container/SlotRingChest.java deleted file mode 100644 index b1f553c..0000000 --- a/src/main/java/darkknight/jewelrycraft/container/SlotRingChest.java +++ /dev/null @@ -1,55 +0,0 @@ -package darkknight.jewelrycraft.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class SlotRingChest extends Slot -{ - public boolean locked = false; - - /** - * @param tile - * @param slotID - * @param x - * @param y - * @param locked - */ - public SlotRingChest(IInventory tile, int slotID, int x, int y, boolean locked) - { - super(tile, slotID, x, y); - this.locked = locked; - } - - /** - * @param stack - * @return - */ - @Override - public boolean isItemValid(ItemStack stack) - { - return !locked; - } - - /** - * @param amount - * @return - */ - @Override - public ItemStack decrStackSize(int amount) - { - if (!locked) return super.decrStackSize(amount); - return null; - } - - /** - * @param player - * @return - */ - @Override - public boolean canTakeStack(EntityPlayer player) - { - return !locked; - } -} 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 players = event.entityPlayer.worldObj.playerEntities.iterator(); - - while(players.hasNext()) - { + { + ModelBiped main = event.renderer.modelBipedMain; + Iterator 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/item/render/ItemRender.java b/src/main/java/darkknight/jewelrycraft/item/render/ItemRender.java new file mode 100644 index 0000000..144b2af --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/item/render/ItemRender.java @@ -0,0 +1,65 @@ +package darkknight.jewelrycraft.item.render; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.client.IItemRenderer; +import org.lwjgl.opengl.GL11; + +public class ItemRender implements IItemRenderer +{ + TileEntitySpecialRenderer render; + public TileEntity entity; + ModelBase model; + + /** + * @param render + * @param entity + * @param model + */ + public ItemRender(TileEntitySpecialRenderer render, TileEntity entity, ModelBase model) + { + this.entity = entity; + this.render = render; + this.model = model; + } + + /** + * @param item + * @param type + * @return + */ + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) + { + return true; + } + + /** + * @param type + * @param item + * @param helper + * @return + */ + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) + { + return true; + } + + /** + * @param type + * @param item + * @param data + */ + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object ... data) + { + if (type == IItemRenderer.ItemRenderType.ENTITY){ + GL11.glRotatef(180f, 0f, 1f, 0f); + GL11.glTranslatef(-0.5f, -0.5f, -0.4f); + } + render.renderTileEntityAt(entity, 0.0D, 0.0D, 0.0D, 0.0F); + } +} diff --git a/src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java b/src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java new file mode 100644 index 0000000..5c54002 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/item/render/MaskRender.java @@ -0,0 +1,31 @@ +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.entity.EntityLivingBase; +import net.minecraft.tileentity.TileEntity; +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(Variables.MODID, "textures/entities/Mask.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); + mask.render(entity, 0F, 0F, 0F, 0F, 0F, 0.02F); + GL11.glPopMatrix(); + } +} \ No newline at end of file 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 { @@ -23,7 +24,7 @@ public class PacketRequestPlayerInfo implements IMessage, IMessageHandler +{ + 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 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/proxy/ClientProxy.java b/src/main/java/darkknight/jewelrycraft/proxy/ClientProxy.java new file mode 100644 index 0000000..08b9b0d --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/proxy/ClientProxy.java @@ -0,0 +1,90 @@ +package darkknight.jewelrycraft.proxy; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.Item; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.MinecraftForgeClient; +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.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; +import darkknight.jewelrycraft.model.ModelHeart; +import darkknight.jewelrycraft.model.ModelJewlersCraftingBench; +import darkknight.jewelrycraft.model.ModelMolder; +import darkknight.jewelrycraft.model.ModelShadowEye; +import darkknight.jewelrycraft.model.ModelShadowHand; +import darkknight.jewelrycraft.model.ModelSmelter; +import darkknight.jewelrycraft.tileentity.TileEntityDisplayer; +import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal; +import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable; +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.TileEntityDisplayerRender; +import darkknight.jewelrycraft.tileentity.renders.TileEntityHandPedestalRender; +import darkknight.jewelrycraft.tileentity.renders.TileEntityJewelrsCraftingTableRender; +import darkknight.jewelrycraft.tileentity.renders.TileEntityMolderRender; +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(Variables.MODID, "textures/tileentities/BricksPedestal.png"); + TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(pedestalResourceLocation), pedestalResourceLocation); + ResourceLocation shadowResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png"); + TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(shadowResourceLocation), shadowResourceLocation); + + ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmelter.class, new TileEntitySmelterRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMolder.class, new TileEntityMolderRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJewelrsCraftingTable.class, new TileEntityJewelrsCraftingTableRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDisplayer.class, new TileEntityDisplayerRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShadowEye.class, new TileEntityShadowEyeRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHandPedestal.class, pedestalRender); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShadowHand.class, shadowHandRender); + + MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.displayer), new ItemRender(new TileEntityDisplayerRender(), new TileEntityDisplayer(), new ModelDisplayer())); + MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.jewelCraftingTable), new ItemRender(new TileEntityJewelrsCraftingTableRender(), new TileEntityJewelrsCraftingTable(), new ModelJewlersCraftingBench())); + MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.smelter), new ItemRender(new TileEntitySmelterRender(), new TileEntitySmelter(), new ModelSmelter())); + MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.molder), new ItemRender(new TileEntityMolderRender(), new TileEntityMolder(), new ModelMolder())); + 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(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)); + + TabRegistry.registerTab(new InventoryTabVanilla()); + TabRegistry.registerTab(new TabJewelry()); + MinecraftForge.EVENT_BUS.register(new TabRegistry()); + MinecraftForge.EVENT_BUS.register(new PlayerRenderHandler()); + ResourceLocation jeweleryTexture = new ResourceLocation(Variables.MODID, "textures/gui/curses.png"); + MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), jeweleryTexture)); + } + + @Override + public void postInit() + { + JewelrycraftUtil.addStuff(); + } +} diff --git a/src/main/java/darkknight/jewelrycraft/proxy/CommonProxy.java b/src/main/java/darkknight/jewelrycraft/proxy/CommonProxy.java new file mode 100644 index 0000000..03ffdf6 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/proxy/CommonProxy.java @@ -0,0 +1,13 @@ +package darkknight.jewelrycraft.proxy; + +/** + * The Class CommonProxy. + */ +public class CommonProxy +{ + public void preInit() + {} + + public void postInit() + {} +} \ No newline at end of file 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 pedestalItems = new ArrayList(); - 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/ItemRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/ItemRender.java deleted file mode 100644 index 31e5676..0000000 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/ItemRender.java +++ /dev/null @@ -1,65 +0,0 @@ -package darkknight.jewelrycraft.tileentity.renders; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.client.IItemRenderer; -import org.lwjgl.opengl.GL11; - -public class ItemRender implements IItemRenderer -{ - TileEntitySpecialRenderer render; - public TileEntity entity; - ModelBase model; - - /** - * @param render - * @param entity - * @param model - */ - public ItemRender(TileEntitySpecialRenderer render, TileEntity entity, ModelBase model) - { - this.entity = entity; - this.render = render; - this.model = model; - } - - /** - * @param item - * @param type - * @return - */ - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - return true; - } - - /** - * @param type - * @param item - * @param helper - * @return - */ - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - /** - * @param type - * @param item - * @param data - */ - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object ... data) - { - if (type == IItemRenderer.ItemRenderType.ENTITY){ - GL11.glRotatef(180f, 0f, 1f, 0f); - GL11.glTranslatef(-0.5f, -0.5f, -0.4f); - } - render.renderTileEntityAt(entity, 0.0D, 0.0D, 0.0D, 0.0F); - } -} diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/MaskRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/MaskRender.java deleted file mode 100644 index 1e26107..0000000 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/MaskRender.java +++ /dev/null @@ -1,30 +0,0 @@ -package darkknight.jewelrycraft.tileentity.renders; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import darkknight.jewelrycraft.model.ModelMask; -import darkknight.jewelrycraft.tileentity.TileEntityDisplayer; - -public class MaskRender extends TileEntitySpecialRenderer -{ - ModelMask mask = new ModelMask(); - ResourceLocation texture = new ResourceLocation("jewelrycraft", "textures/entities/Mask.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); - mask.render(entity, 0F, 0F, 0F, 0F, 0F, 0.02F); - GL11.glPopMatrix(); - } -} \ No newline at end of file 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 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 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/Changelog.txt b/src/main/resources/assets/jewelrycraft/Changelog.txt deleted file mode 100644 index eef8146..0000000 --- a/src/main/resources/assets/jewelrycraft/Changelog.txt +++ /dev/null @@ -1,81 +0,0 @@ -Both 1.6.4 and 1.7.10 -- Fixed bug with Natura causing the game to crash -Only 1.7.10 -- Updated the mod to Minecraft 1.7.10 -- Added more config options regarding Jeweler house generation -- Reduced the number of possible jewelers to spawn in a village to 1 -- Added Molten Metal and Molten Metal Buckets -- Buckets of the molten metal can be obtained either by filling a smelter with the metal of your choice and then right clicking the smelter with an empty bucket, -or by destroying the filled smelter, causing the metal to pour out and then use a bucket to pick it up. -- Smelters now spawn molten metal, if they have any, when broken -- Added the possibility to smelt ores -- Smelted ores give double the amount of ingots -- Jewelers houses now have a chance to also generate ores -- Jewelers can sell ores now -- Fixed a bug where the first time you would pour metal in a molder it would generate 2 items instead of one - -TODO -- Make a way so that the ingot affects the jewels somehow -- Add a ring of Resistance -- Think of a way to balance the rings -- (MAYBE) Shadow Ring -> Shadow ingot ring, nether star, obsidian - makes you appear as hostile so mobs actually leave you alone -- Elemental jewellery -> punch a creature with it in your hand to do different things, lightning, fling into the air, set on fire, - encase in ice/fences/iron bars, turn into a sheep (like that spell from Warcraft 2, if anyone remembers that), blindness, extreme - knockback, charm (turns on your enemies), tame - tames any tamable mob -!- Add Necklaces, bracelets and earrings; Necklaces could have an AOE effect; -- Shadow armor and tools -- Add an item that can store rings (maybe a keychain?) -- Monks Ring -> ups your unarmed damage / block breaking speed / ability to break harder blocks with bare hands, made with a block of iron and a jewel. -- Ring of Strength -> self explanatory -- (MAYBE) Add a Shadow Merchant (a villager that trades only shadow related stuff and appears randomly at night) -- Add a blast protection jewelry -- Add a jewelery of the Arrow Catcher - each tier of protection gives you a certain % chance of catching arrows instead of being hit by them. -- (MAYBE) Render the rings on the character -- In the case of passive benefits, might it be possible to make it so, with fire resistance for example, it refreshes the buff as long as you're not in fire, - but as soon as you are it gains a limited duration (better jewels for longer durations) that, when it expires there goes the buff and you can burn to death. - Then you'd need to avoid being on fire for a cooldown period of a few seconds before it could refresh back to the passive state (this part reduced by better jewels)? - Invisibility could turn off for a period when you punch a mob, that kind of thing. -- Glowstone Block (Modifier): Places a torch-like blob of light in exchange for 1/2 a heart, higher-tier jewels increase the light emitted. -- Ghast Tear (Modifier): Allows for a limited-duration flight buff, say starting at 3 seconds all the way to 60 when combined with a nether star. When the timer expires - you have to land again to reset the usage. -- Any Color Dye (Modifier): Right-click a sheep to dye it the chosen color. Posted Image -- Beacon (Modifier): Portable beacon, with the tier based on the jewel added. Shift + Right-click to open the beacon GUI, which would work just like the vanilla one. -- Water Bucket (Modifier): Right-click the air to start a storm. -- Lava Bucket (Modifier): Passively adds fire aspect to your weapons and tools. -- Sand (Modifier): Shift + right-click to advance the day 1 hour. Only usable once per day by default, better jewels increase this. -- Glass (Jewel): Right-click while holding the ring to zoom in! -- Lapis Piece (Modifier): Passively adds a slowing effect to your weapons. Better jewels improve this. -- Lapis Block (Jewel): A jewel that looks pretty but doesn't do much else. -- Bone (Jewel): Right-click to trade 1/2 a hunger for a bonemeal effect. Otherwise a white jewel with no benefit. -- Carrot (Modifier): Right-click to trade 1/2 a heart for 1/2 a hunger. Better jewels increase these values. 4 hearts for a steaks-worth of food? XD -- Diamond Block (Jewel): When on a gold ring it turns it into "Ostentatious Wedding Ring". Otherwise the same (or a little better than) diamond. -- Golden Apple (Jewel): Ring becomes named "Discord". Right-clicking gives an entirely random buff, a debuff, launches you high into the air, teleports you to a - random location, sets you on fire, spawns a pig or makes lightning strike. Pretty much anything can happen, and the more biased to negative results the better. :P -- Enchanted Golden Apple (Jewel): As above, but more biased towards positive effects. Hail Discordia! -- Name Tag (Jewel): Right-clicking a mob gives it a random name (bonus points if it's from a user-editable list!) -- Add randomly generated "named" loot to dungeon chests! Ring of Displacement (lets you tele randomly like an enderman), Necklace of Second Chances - (heals you for 50 when you drop to 3 or fewer hearts with a cooldown of ~1 minute), Trinket of the Gale (arrow/fireball immunity!), Goggles of the Merfolk - (water breathing!). Endless possibilities! :D -- Also! Trinkets and Belts! - -Trinkets would probably require a new mold, and should bring out the more passive side of items (like, say, instead of opening an enderchest, it automatically -sucks items into your ender chest, or instead of teleporting you it prevents endermen from teleporting away from you [which could be done pretty easily with a -fake screen overlay that's treated like the pumpkin one]). - -Belts... I'd personally see belts as a ring crafted with a piece of Leather as the "jewel" and could provide conditional buffs proportionate to some factor, like -say increasing strength buff the lower your HP is. The idea being that the belt should assist you in a useful way, but only when its needed. I'd probably limit it -to HP and Hunger as determining factors. Things like resistance, regeneration and strength could be applied at low HP, while things like jump boost, haste and speed -could be applied at high hunger meter values. I wouldn't tie anything to having high/max HP or no hunger since those would be things that players normally try to -avoid or always have. - -And as for goggles... A new mold for the base goggle template, and have it only accept "jewel"-typed items (as "lenses"). If you can't think of where to put a neat -effect it should probably end up on goggles. Off the top of my head I can think of a few neat uses: Ore Radar (2x diamonds), Clear Vision (2x glass), Mob Spawnable -Area Highlighting (2x ender pearl), Compass and Clock overlays (doy), Coordinate HUD (map and glass), Speedometer (glass and enderpearl), Altimiter (glass and emerald), -Thermometer (diamond and glass)... Required Pickaxe Level HUD (no idea). XD - -Oooh! And last but not least: Cursed items! I'd probably start with an upgraded jewelry table requiring a regular one, a brewing stand, a piece of glass and a stick. -You could initially use this upgraded stand to add additional effects, or merge two items into one. Should operate kind of like a furnace, but only accepts blaze powder -and rods as fuel (about 1 rod or 2 powder = 1 process, the idea being using the blaze stuff like welding materials). But the other use would be cursing jewelry! Why? -Because nothing says "I hate you so much." like a non-dequipable piece of jewelry that gives you blindness and slowness! Slimeballs could add a cursed sticky effect -that prevents you dropping it without dying. Fermented spider eye, like with brewing potions, could corrupt the effects on the item. Flint and steel could randomly set -you on fire. Eye of Ender could randomly tell the world your coordinates. \ No newline at end of file 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/pack.mcmeta b/src/main/resources/assets/jewelrycraft/pack.mcmeta deleted file mode 100644 index 0b04ef8..0000000 --- a/src/main/resources/assets/jewelrycraft/pack.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "pack": { - "pack_format": 1, - "description": "Jewelrycraft" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_bottom.png b/src/main/resources/assets/jewelrycraft/textures/blocks/altar_bottom.png deleted file mode 100644 index 7ca4c6a..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_bottom.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_side.png b/src/main/resources/assets/jewelrycraft/textures/blocks/altar_side.png deleted file mode 100644 index 3a69977..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_side.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_top.png b/src/main/resources/assets/jewelrycraft/textures/blocks/altar_top.png deleted file mode 100644 index 39210c3..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/altar_top.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow0.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow0.png deleted file mode 100644 index 0b5323d..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow0.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow1.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow1.png deleted file mode 100644 index 16f9908..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow1.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow10.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow10.png deleted file mode 100644 index be70eb5..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow10.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow11.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow11.png deleted file mode 100644 index 1684d9a..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow11.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow12.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow12.png deleted file mode 100644 index ed4ea49..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow12.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow13.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow13.png deleted file mode 100644 index 9b2100a..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow13.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow14.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow14.png deleted file mode 100644 index ea00725..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow14.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow15.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow15.png deleted file mode 100644 index 2140624..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow15.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow2.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow2.png deleted file mode 100644 index f95b111..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow2.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow3.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow3.png deleted file mode 100644 index 0dd5633..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow3.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow4.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow4.png deleted file mode 100644 index a4e926c..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow4.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow5.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow5.png deleted file mode 100644 index 8461ac4..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow5.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow6.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow6.png deleted file mode 100644 index 352d3e4..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow6.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow7.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow7.png deleted file mode 100644 index 9aa0e03..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow7.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow8.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow8.png deleted file mode 100644 index ad21447..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow8.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow9.png b/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow9.png deleted file mode 100644 index 01c0fa4..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/blockShadow9.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/displayer.png b/src/main/resources/assets/jewelrycraft/textures/blocks/displayer.png deleted file mode 100644 index 155fa53..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/displayer.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/jewelrsCraftingTable.png b/src/main/resources/assets/jewelrycraft/textures/blocks/jewelrsCraftingTable.png deleted file mode 100644 index e826bbe..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/jewelrsCraftingTable.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/molder.png b/src/main/resources/assets/jewelrycraft/textures/blocks/molder.png deleted file mode 100644 index 5a08164..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/molder.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png b/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png deleted file mode 100644 index 8e9a452..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png.mcmeta b/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png.mcmeta deleted file mode 100644 index 8e55e43..0000000 --- a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalFlow.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 3 - } -} diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png b/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png deleted file mode 100644 index 1eff844..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png.mcmeta b/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png.mcmeta deleted file mode 100644 index 7ceb363..0000000 --- a/src/main/resources/assets/jewelrycraft/textures/blocks/moltenMetalStill.png.mcmeta +++ /dev/null @@ -1,45 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/oreShadow.png b/src/main/resources/assets/jewelrycraft/textures/blocks/oreShadow.png deleted file mode 100644 index ffc48dc..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/oreShadow.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/blocks/smelter.png b/src/main/resources/assets/jewelrycraft/textures/blocks/smelter.png deleted file mode 100644 index 4da0c0a..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/blocks/smelter.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/BlackHeart.png b/src/main/resources/assets/jewelrycraft/textures/entities/BlackHeart.png deleted file mode 100644 index 3fd03f2..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/entities/BlackHeart.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/BlueHeart.png b/src/main/resources/assets/jewelrycraft/textures/entities/BlueHeart.png deleted file mode 100644 index f664372..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/entities/BlueHeart.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/Mask.png b/src/main/resources/assets/jewelrycraft/textures/entities/Mask.png deleted file mode 100644 index 0daa053..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/entities/Mask.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/RedHeart.png b/src/main/resources/assets/jewelrycraft/textures/entities/RedHeart.png deleted file mode 100644 index 8f8623c..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/entities/RedHeart.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/WhiteHeart.png b/src/main/resources/assets/jewelrycraft/textures/entities/WhiteHeart.png deleted file mode 100644 index 1f8d528..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/entities/WhiteHeart.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/entities/jeweler.png b/src/main/resources/assets/jewelrycraft/textures/entities/jeweler.png deleted file mode 100644 index fbd01cb..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/entities/jeweler.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/gui/chest_ring.png b/src/main/resources/assets/jewelrycraft/textures/gui/chest_ring.png deleted file mode 100644 index 66f00cc..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/gui/chest_ring.png and /dev/null differ 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 Binary files a/src/main/resources/assets/jewelrycraft/textures/gui/curses.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/gui/guidePage.png b/src/main/resources/assets/jewelrycraft/textures/gui/guidePage.png deleted file mode 100644 index 7387be5..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/gui/guidePage.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/gui/guidePageFlip.png b/src/main/resources/assets/jewelrycraft/textures/gui/guidePageFlip.png deleted file mode 100644 index 92f2705..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/gui/guidePageFlip.png and /dev/null 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 Binary files a/src/main/resources/assets/jewelrycraft/textures/gui/hearts.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/gui/jewelry_tab.png b/src/main/resources/assets/jewelrycraft/textures/gui/jewelry_tab.png deleted file mode 100644 index 376249b..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/gui/jewelry_tab.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/blockMold.png b/src/main/resources/assets/jewelrycraft/textures/items/blockMold.png deleted file mode 100644 index e1c2d7b..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/blockMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/bracelet.png b/src/main/resources/assets/jewelrycraft/textures/items/bracelet.png deleted file mode 100644 index 8dde1d3..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/bracelet.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/braceletMold.png b/src/main/resources/assets/jewelrycraft/textures/items/braceletMold.png deleted file mode 100644 index 03f56ac..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/braceletMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/bucketOverlay.png b/src/main/resources/assets/jewelrycraft/textures/items/bucketOverlay.png deleted file mode 100644 index fc2e2a9..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/bucketOverlay.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayBlockMold.png b/src/main/resources/assets/jewelrycraft/textures/items/clayBlockMold.png deleted file mode 100644 index 0dd9029..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/clayBlockMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayBraceletMold.png b/src/main/resources/assets/jewelrycraft/textures/items/clayBraceletMold.png deleted file mode 100644 index e3d929a..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/clayBraceletMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayEarringsMold.png b/src/main/resources/assets/jewelrycraft/textures/items/clayEarringsMold.png deleted file mode 100644 index f6e60a9..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/clayEarringsMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayIngotMold.png b/src/main/resources/assets/jewelrycraft/textures/items/clayIngotMold.png deleted file mode 100644 index 0fecb22..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/clayIngotMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayNecklaceMold.png b/src/main/resources/assets/jewelrycraft/textures/items/clayNecklaceMold.png deleted file mode 100644 index 455f094..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/clayNecklaceMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/clayRingMold.png b/src/main/resources/assets/jewelrycraft/textures/items/clayRingMold.png deleted file mode 100644 index 49d2ab1..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/clayRingMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/crystal.png b/src/main/resources/assets/jewelrycraft/textures/items/crystal.png deleted file mode 100644 index 563a41f..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/crystal.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/crystalOverlay.png b/src/main/resources/assets/jewelrycraft/textures/items/crystalOverlay.png deleted file mode 100644 index d17e909..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/crystalOverlay.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/earrings.png b/src/main/resources/assets/jewelrycraft/textures/items/earrings.png deleted file mode 100644 index 7bf3a63..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/earrings.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/earringsMold.png b/src/main/resources/assets/jewelrycraft/textures/items/earringsMold.png deleted file mode 100644 index e59ca7d..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/earringsMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/guide.png b/src/main/resources/assets/jewelrycraft/textures/items/guide.png deleted file mode 100644 index c015875..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/guide.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingot3.png b/src/main/resources/assets/jewelrycraft/textures/items/ingot3.png deleted file mode 100644 index 47c9cb8..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/ingot3.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingot4.png b/src/main/resources/assets/jewelrycraft/textures/items/ingot4.png deleted file mode 100644 index 78894d0..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/ingot4.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingot6.png b/src/main/resources/assets/jewelrycraft/textures/items/ingot6.png deleted file mode 100644 index e025782..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/ingot6.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingot7.png b/src/main/resources/assets/jewelrycraft/textures/items/ingot7.png deleted file mode 100644 index b378e29..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/ingot7.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingotMold.png b/src/main/resources/assets/jewelrycraft/textures/items/ingotMold.png deleted file mode 100644 index 0575de5..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/ingotMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ingotShadow.png b/src/main/resources/assets/jewelrycraft/textures/items/ingotShadow.png deleted file mode 100644 index e3b3aed..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/ingotShadow.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/jewelBracelet.png b/src/main/resources/assets/jewelrycraft/textures/items/jewelBracelet.png deleted file mode 100644 index f6fc3c8..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/jewelBracelet.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/jewelEarrings.png b/src/main/resources/assets/jewelrycraft/textures/items/jewelEarrings.png deleted file mode 100644 index 713e5c7..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/jewelEarrings.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/jewelNecklace.png b/src/main/resources/assets/jewelrycraft/textures/items/jewelNecklace.png deleted file mode 100644 index 41244d4..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/jewelNecklace.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/jewelRing.png b/src/main/resources/assets/jewelrycraft/textures/items/jewelRing.png deleted file mode 100644 index 4875772..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/jewelRing.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png b/src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png deleted file mode 100644 index 1eff844..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png.mcmeta b/src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png.mcmeta deleted file mode 100644 index 7ceb363..0000000 --- a/src/main/resources/assets/jewelrycraft/textures/items/moltenMetalStill.png.mcmeta +++ /dev/null @@ -1,45 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/jewelrycraft/textures/items/necklace.png b/src/main/resources/assets/jewelrycraft/textures/items/necklace.png deleted file mode 100644 index 054744d..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/necklace.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/necklaceMold.png b/src/main/resources/assets/jewelrycraft/textures/items/necklaceMold.png deleted file mode 100644 index 0df4b65..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/necklaceMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ring.png b/src/main/resources/assets/jewelrycraft/textures/items/ring.png deleted file mode 100644 index ae59f5a..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/ring.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/ringMold.png b/src/main/resources/assets/jewelrycraft/textures/items/ringMold.png deleted file mode 100644 index 7bab639..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/ringMold.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/test/ingot2.png b/src/main/resources/assets/jewelrycraft/textures/items/test/ingot2.png deleted file mode 100644 index 8bd47da..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/test/ingot2.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/test/ingot5.png b/src/main/resources/assets/jewelrycraft/textures/items/test/ingot5.png deleted file mode 100644 index 968b53d..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/test/ingot5.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/items/thiefGloves.png b/src/main/resources/assets/jewelrycraft/textures/items/thiefGloves.png deleted file mode 100644 index b56e925..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/items/thiefGloves.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/particle/shadows.png b/src/main/resources/assets/jewelrycraft/textures/particle/shadows.png deleted file mode 100644 index 51b1160..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/particle/shadows.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/BricksPedestal.png b/src/main/resources/assets/jewelrycraft/textures/tileentities/BricksPedestal.png deleted file mode 100644 index 08ca87b..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/tileentities/BricksPedestal.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/Displayer.png b/src/main/resources/assets/jewelrycraft/textures/tileentities/Displayer.png deleted file mode 100644 index 200637b..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/tileentities/Displayer.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/JewelrsCraftingBench.png b/src/main/resources/assets/jewelrycraft/textures/tileentities/JewelrsCraftingBench.png deleted file mode 100644 index 1ee75d0..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/tileentities/JewelrsCraftingBench.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/Molder.png b/src/main/resources/assets/jewelrycraft/textures/tileentities/Molder.png deleted file mode 100644 index c5acc88..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/tileentities/Molder.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye1.png b/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye1.png deleted file mode 100644 index 8916dc4..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye1.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye2.png b/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye2.png deleted file mode 100644 index 3c53104..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye2.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye3.png b/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye3.png deleted file mode 100644 index a6340fb..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye3.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye4.png b/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye4.png deleted file mode 100644 index 0ba066e..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowEye4.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowHand.png b/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowHand.png deleted file mode 100644 index e2b82c7..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/tileentities/ShadowHand.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft/textures/tileentities/Smelter.png b/src/main/resources/assets/jewelrycraft/textures/tileentities/Smelter.png deleted file mode 100644 index 6ec3595..0000000 Binary files a/src/main/resources/assets/jewelrycraft/textures/tileentities/Smelter.png and /dev/null differ diff --git a/src/main/resources/assets/jewelrycraft2/Changelog.txt b/src/main/resources/assets/jewelrycraft2/Changelog.txt new file mode 100644 index 0000000..eef8146 --- /dev/null +++ b/src/main/resources/assets/jewelrycraft2/Changelog.txt @@ -0,0 +1,81 @@ +Both 1.6.4 and 1.7.10 +- Fixed bug with Natura causing the game to crash +Only 1.7.10 +- Updated the mod to Minecraft 1.7.10 +- Added more config options regarding Jeweler house generation +- Reduced the number of possible jewelers to spawn in a village to 1 +- Added Molten Metal and Molten Metal Buckets +- Buckets of the molten metal can be obtained either by filling a smelter with the metal of your choice and then right clicking the smelter with an empty bucket, +or by destroying the filled smelter, causing the metal to pour out and then use a bucket to pick it up. +- Smelters now spawn molten metal, if they have any, when broken +- Added the possibility to smelt ores +- Smelted ores give double the amount of ingots +- Jewelers houses now have a chance to also generate ores +- Jewelers can sell ores now +- Fixed a bug where the first time you would pour metal in a molder it would generate 2 items instead of one + +TODO +- Make a way so that the ingot affects the jewels somehow +- Add a ring of Resistance +- Think of a way to balance the rings +- (MAYBE) Shadow Ring -> Shadow ingot ring, nether star, obsidian - makes you appear as hostile so mobs actually leave you alone +- Elemental jewellery -> punch a creature with it in your hand to do different things, lightning, fling into the air, set on fire, + encase in ice/fences/iron bars, turn into a sheep (like that spell from Warcraft 2, if anyone remembers that), blindness, extreme + knockback, charm (turns on your enemies), tame - tames any tamable mob +!- Add Necklaces, bracelets and earrings; Necklaces could have an AOE effect; +- Shadow armor and tools +- Add an item that can store rings (maybe a keychain?) +- Monks Ring -> ups your unarmed damage / block breaking speed / ability to break harder blocks with bare hands, made with a block of iron and a jewel. +- Ring of Strength -> self explanatory +- (MAYBE) Add a Shadow Merchant (a villager that trades only shadow related stuff and appears randomly at night) +- Add a blast protection jewelry +- Add a jewelery of the Arrow Catcher - each tier of protection gives you a certain % chance of catching arrows instead of being hit by them. +- (MAYBE) Render the rings on the character +- In the case of passive benefits, might it be possible to make it so, with fire resistance for example, it refreshes the buff as long as you're not in fire, + but as soon as you are it gains a limited duration (better jewels for longer durations) that, when it expires there goes the buff and you can burn to death. + Then you'd need to avoid being on fire for a cooldown period of a few seconds before it could refresh back to the passive state (this part reduced by better jewels)? + Invisibility could turn off for a period when you punch a mob, that kind of thing. +- Glowstone Block (Modifier): Places a torch-like blob of light in exchange for 1/2 a heart, higher-tier jewels increase the light emitted. +- Ghast Tear (Modifier): Allows for a limited-duration flight buff, say starting at 3 seconds all the way to 60 when combined with a nether star. When the timer expires + you have to land again to reset the usage. +- Any Color Dye (Modifier): Right-click a sheep to dye it the chosen color. Posted Image +- Beacon (Modifier): Portable beacon, with the tier based on the jewel added. Shift + Right-click to open the beacon GUI, which would work just like the vanilla one. +- Water Bucket (Modifier): Right-click the air to start a storm. +- Lava Bucket (Modifier): Passively adds fire aspect to your weapons and tools. +- Sand (Modifier): Shift + right-click to advance the day 1 hour. Only usable once per day by default, better jewels increase this. +- Glass (Jewel): Right-click while holding the ring to zoom in! +- Lapis Piece (Modifier): Passively adds a slowing effect to your weapons. Better jewels improve this. +- Lapis Block (Jewel): A jewel that looks pretty but doesn't do much else. +- Bone (Jewel): Right-click to trade 1/2 a hunger for a bonemeal effect. Otherwise a white jewel with no benefit. +- Carrot (Modifier): Right-click to trade 1/2 a heart for 1/2 a hunger. Better jewels increase these values. 4 hearts for a steaks-worth of food? XD +- Diamond Block (Jewel): When on a gold ring it turns it into "Ostentatious Wedding Ring". Otherwise the same (or a little better than) diamond. +- Golden Apple (Jewel): Ring becomes named "Discord". Right-clicking gives an entirely random buff, a debuff, launches you high into the air, teleports you to a + random location, sets you on fire, spawns a pig or makes lightning strike. Pretty much anything can happen, and the more biased to negative results the better. :P +- Enchanted Golden Apple (Jewel): As above, but more biased towards positive effects. Hail Discordia! +- Name Tag (Jewel): Right-clicking a mob gives it a random name (bonus points if it's from a user-editable list!) +- Add randomly generated "named" loot to dungeon chests! Ring of Displacement (lets you tele randomly like an enderman), Necklace of Second Chances + (heals you for 50 when you drop to 3 or fewer hearts with a cooldown of ~1 minute), Trinket of the Gale (arrow/fireball immunity!), Goggles of the Merfolk + (water breathing!). Endless possibilities! :D +- Also! Trinkets and Belts! + +Trinkets would probably require a new mold, and should bring out the more passive side of items (like, say, instead of opening an enderchest, it automatically +sucks items into your ender chest, or instead of teleporting you it prevents endermen from teleporting away from you [which could be done pretty easily with a +fake screen overlay that's treated like the pumpkin one]). + +Belts... I'd personally see belts as a ring crafted with a piece of Leather as the "jewel" and could provide conditional buffs proportionate to some factor, like +say increasing strength buff the lower your HP is. The idea being that the belt should assist you in a useful way, but only when its needed. I'd probably limit it +to HP and Hunger as determining factors. Things like resistance, regeneration and strength could be applied at low HP, while things like jump boost, haste and speed +could be applied at high hunger meter values. I wouldn't tie anything to having high/max HP or no hunger since those would be things that players normally try to +avoid or always have. + +And as for goggles... A new mold for the base goggle template, and have it only accept "jewel"-typed items (as "lenses"). If you can't think of where to put a neat +effect it should probably end up on goggles. Off the top of my head I can think of a few neat uses: Ore Radar (2x diamonds), Clear Vision (2x glass), Mob Spawnable +Area Highlighting (2x ender pearl), Compass and Clock overlays (doy), Coordinate HUD (map and glass), Speedometer (glass and enderpearl), Altimiter (glass and emerald), +Thermometer (diamond and glass)... Required Pickaxe Level HUD (no idea). XD + +Oooh! And last but not least: Cursed items! I'd probably start with an upgraded jewelry table requiring a regular one, a brewing stand, a piece of glass and a stick. +You could initially use this upgraded stand to add additional effects, or merge two items into one. Should operate kind of like a furnace, but only accepts blaze powder +and rods as fuel (about 1 rod or 2 powder = 1 process, the idea being using the blaze stuff like welding materials). But the other use would be cursing jewelry! Why? +Because nothing says "I hate you so much." like a non-dequipable piece of jewelry that gives you blindness and slowness! Slimeballs could add a cursed sticky effect +that prevents you dropping it without dying. Fermented spider eye, like with brewing potions, could corrupt the effects on the item. Flint and steel could randomly set +you on fire. Eye of Ender could randomly tell the world your coordinates. \ No newline at end of file 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/jewelrycraft2/pack.mcmeta b/src/main/resources/assets/jewelrycraft2/pack.mcmeta new file mode 100644 index 0000000..0b04ef8 --- /dev/null +++ b/src/main/resources/assets/jewelrycraft2/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 1, + "description": "Jewelrycraft" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.png new file mode 100644 index 0000000..7ca4c6a Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.png new file mode 100644 index 0000000..3a69977 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.png new file mode 100644 index 0000000..39210c3 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow0.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow0.png new file mode 100644 index 0000000..0b5323d Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow0.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow1.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow1.png new file mode 100644 index 0000000..16f9908 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow1.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow10.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow10.png new file mode 100644 index 0000000..be70eb5 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow10.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow11.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow11.png new file mode 100644 index 0000000..1684d9a Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow11.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow12.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow12.png new file mode 100644 index 0000000..ed4ea49 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow12.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow13.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow13.png new file mode 100644 index 0000000..9b2100a Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow13.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow14.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow14.png new file mode 100644 index 0000000..ea00725 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow14.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow15.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow15.png new file mode 100644 index 0000000..2140624 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow15.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow2.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow2.png new file mode 100644 index 0000000..f95b111 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow2.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow3.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow3.png new file mode 100644 index 0000000..0dd5633 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow3.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow4.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow4.png new file mode 100644 index 0000000..a4e926c Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow4.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow5.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow5.png new file mode 100644 index 0000000..8461ac4 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow5.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow6.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow6.png new file mode 100644 index 0000000..352d3e4 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow6.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow7.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow7.png new file mode 100644 index 0000000..9aa0e03 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow7.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow8.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow8.png new file mode 100644 index 0000000..ad21447 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow8.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow9.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow9.png new file mode 100644 index 0000000..01c0fa4 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/blockShadow9.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/displayer.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/displayer.png new file mode 100644 index 0000000..155fa53 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/displayer.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/jewelrsCraftingTable.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/jewelrsCraftingTable.png new file mode 100644 index 0000000..e826bbe Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/jewelrsCraftingTable.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/molder.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/molder.png new file mode 100644 index 0000000..5a08164 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/molder.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png new file mode 100644 index 0000000..8e9a452 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png.mcmeta b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png.mcmeta new file mode 100644 index 0000000..8e55e43 --- /dev/null +++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalFlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 3 + } +} diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png new file mode 100644 index 0000000..1eff844 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png.mcmeta b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png.mcmeta new file mode 100644 index 0000000..7ceb363 --- /dev/null +++ b/src/main/resources/assets/jewelrycraft2/textures/blocks/moltenMetalStill.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/oreShadow.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/oreShadow.png new file mode 100644 index 0000000..ffc48dc Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/oreShadow.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/smelter.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/smelter.png new file mode 100644 index 0000000..4da0c0a Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/blocks/smelter.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/BlackHeart.png b/src/main/resources/assets/jewelrycraft2/textures/entities/BlackHeart.png new file mode 100644 index 0000000..3fd03f2 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/entities/BlackHeart.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/BlueHeart.png b/src/main/resources/assets/jewelrycraft2/textures/entities/BlueHeart.png new file mode 100644 index 0000000..f664372 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/entities/BlueHeart.png 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 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/entities/Bracelet.png 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 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/entities/Earrings.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png b/src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png new file mode 100644 index 0000000..0daa053 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/entities/Mask.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/RedHeart.png b/src/main/resources/assets/jewelrycraft2/textures/entities/RedHeart.png new file mode 100644 index 0000000..8f8623c Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/entities/RedHeart.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/WhiteHeart.png b/src/main/resources/assets/jewelrycraft2/textures/entities/WhiteHeart.png new file mode 100644 index 0000000..1f8d528 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/entities/WhiteHeart.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/entities/jeweler.png b/src/main/resources/assets/jewelrycraft2/textures/entities/jeweler.png new file mode 100644 index 0000000..fbd01cb Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/entities/jeweler.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/gui/chest_ring.png b/src/main/resources/assets/jewelrycraft2/textures/gui/chest_ring.png new file mode 100644 index 0000000..66f00cc Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/gui/chest_ring.png 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 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/gui/curses.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/gui/guidePage.png b/src/main/resources/assets/jewelrycraft2/textures/gui/guidePage.png new file mode 100644 index 0000000..7387be5 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/gui/guidePage.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/gui/guidePageFlip.png b/src/main/resources/assets/jewelrycraft2/textures/gui/guidePageFlip.png new file mode 100644 index 0000000..92f2705 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/gui/guidePageFlip.png 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 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/gui/hearts.png 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 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_modifier.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_tab.png b/src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_tab.png new file mode 100644 index 0000000..376249b Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/gui/jewelry_tab.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/blockMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/blockMold.png new file mode 100644 index 0000000..e1c2d7b Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/blockMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/bracelet.png b/src/main/resources/assets/jewelrycraft2/textures/items/bracelet.png new file mode 100644 index 0000000..8dde1d3 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/bracelet.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/braceletMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/braceletMold.png new file mode 100644 index 0000000..03f56ac Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/braceletMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/bucketOverlay.png b/src/main/resources/assets/jewelrycraft2/textures/items/bucketOverlay.png new file mode 100644 index 0000000..fc2e2a9 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/bucketOverlay.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/clayBlockMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayBlockMold.png new file mode 100644 index 0000000..0dd9029 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/clayBlockMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/clayBraceletMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayBraceletMold.png new file mode 100644 index 0000000..e3d929a Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/clayBraceletMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/clayEarringsMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayEarringsMold.png new file mode 100644 index 0000000..f6e60a9 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/clayEarringsMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/clayIngotMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayIngotMold.png new file mode 100644 index 0000000..0fecb22 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/clayIngotMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/clayNecklaceMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayNecklaceMold.png new file mode 100644 index 0000000..455f094 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/clayNecklaceMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/clayRingMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/clayRingMold.png new file mode 100644 index 0000000..49d2ab1 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/clayRingMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/crystal.png b/src/main/resources/assets/jewelrycraft2/textures/items/crystal.png new file mode 100644 index 0000000..563a41f Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/crystal.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/crystalOverlay.png b/src/main/resources/assets/jewelrycraft2/textures/items/crystalOverlay.png new file mode 100644 index 0000000..d17e909 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/crystalOverlay.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/earrings.png b/src/main/resources/assets/jewelrycraft2/textures/items/earrings.png new file mode 100644 index 0000000..7bf3a63 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/earrings.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/earringsMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/earringsMold.png new file mode 100644 index 0000000..e59ca7d Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/earringsMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/guide.png b/src/main/resources/assets/jewelrycraft2/textures/items/guide.png new file mode 100644 index 0000000..c015875 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/guide.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/ingot3.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingot3.png new file mode 100644 index 0000000..47c9cb8 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/ingot3.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/ingot4.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingot4.png new file mode 100644 index 0000000..78894d0 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/ingot4.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/ingot6.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingot6.png new file mode 100644 index 0000000..e025782 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/ingot6.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/ingot7.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingot7.png new file mode 100644 index 0000000..b378e29 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/ingot7.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/ingotMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingotMold.png new file mode 100644 index 0000000..0575de5 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/ingotMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/ingotShadow.png b/src/main/resources/assets/jewelrycraft2/textures/items/ingotShadow.png new file mode 100644 index 0000000..e3b3aed Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/ingotShadow.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/jewelBracelet.png b/src/main/resources/assets/jewelrycraft2/textures/items/jewelBracelet.png new file mode 100644 index 0000000..f6fc3c8 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/jewelBracelet.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/jewelEarrings.png b/src/main/resources/assets/jewelrycraft2/textures/items/jewelEarrings.png new file mode 100644 index 0000000..713e5c7 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/jewelEarrings.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/jewelNecklace.png b/src/main/resources/assets/jewelrycraft2/textures/items/jewelNecklace.png new file mode 100644 index 0000000..41244d4 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/jewelNecklace.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/jewelRing.png b/src/main/resources/assets/jewelrycraft2/textures/items/jewelRing.png new file mode 100644 index 0000000..4875772 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/jewelRing.png 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 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/jewelryModifier.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png b/src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png new file mode 100644 index 0000000..1eff844 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png.mcmeta b/src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png.mcmeta new file mode 100644 index 0000000..7ceb363 --- /dev/null +++ b/src/main/resources/assets/jewelrycraft2/textures/items/moltenMetalStill.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/necklace.png b/src/main/resources/assets/jewelrycraft2/textures/items/necklace.png new file mode 100644 index 0000000..054744d Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/necklace.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/necklaceMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/necklaceMold.png new file mode 100644 index 0000000..0df4b65 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/necklaceMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/ring.png b/src/main/resources/assets/jewelrycraft2/textures/items/ring.png new file mode 100644 index 0000000..ae59f5a Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/ring.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/ringMold.png b/src/main/resources/assets/jewelrycraft2/textures/items/ringMold.png new file mode 100644 index 0000000..7bab639 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/ringMold.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/test/ingot2.png b/src/main/resources/assets/jewelrycraft2/textures/items/test/ingot2.png new file mode 100644 index 0000000..8bd47da Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/test/ingot2.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/test/ingot5.png b/src/main/resources/assets/jewelrycraft2/textures/items/test/ingot5.png new file mode 100644 index 0000000..968b53d Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/test/ingot5.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/items/thiefGloves.png b/src/main/resources/assets/jewelrycraft2/textures/items/thiefGloves.png new file mode 100644 index 0000000..b56e925 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/items/thiefGloves.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/particle/shadows.png b/src/main/resources/assets/jewelrycraft2/textures/particle/shadows.png new file mode 100644 index 0000000..51b1160 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/particle/shadows.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/tileentities/BricksPedestal.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/BricksPedestal.png new file mode 100644 index 0000000..08ca87b Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/tileentities/BricksPedestal.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/tileentities/Displayer.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Displayer.png new file mode 100644 index 0000000..200637b Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Displayer.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/tileentities/JewelrsCraftingBench.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/JewelrsCraftingBench.png new file mode 100644 index 0000000..1ee75d0 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/tileentities/JewelrsCraftingBench.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/tileentities/Molder.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Molder.png new file mode 100644 index 0000000..c5acc88 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Molder.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye1.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye1.png new file mode 100644 index 0000000..8916dc4 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye1.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye2.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye2.png new file mode 100644 index 0000000..3c53104 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye2.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye3.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye3.png new file mode 100644 index 0000000..a6340fb Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye3.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye4.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye4.png new file mode 100644 index 0000000..0ba066e Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowEye4.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowHand.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowHand.png new file mode 100644 index 0000000..e2b82c7 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/tileentities/ShadowHand.png differ diff --git a/src/main/resources/assets/jewelrycraft2/textures/tileentities/Smelter.png b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Smelter.png new file mode 100644 index 0000000..6ec3595 Binary files /dev/null and b/src/main/resources/assets/jewelrycraft2/textures/tileentities/Smelter.png differ -- cgit v1.2.3