From 3f4c717de5ebc9b942d65ae45ac87c43bdf8a31b Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Tue, 3 Feb 2015 21:09:09 +0000 Subject: Made a few modifications to some classes, added earrings and bracelets. Improved coloring algorithm and balanced the Thieving Glove --- .../tileentity/TileEntityJewelrsCraftingTable.java | 10 ++++++++-- .../jewelrycraft/tileentity/TileEntityMolder.java | 8 ++++++-- .../jewelrycraft/tileentity/TileEntityShadowEye.java | 15 +++------------ 3 files changed, 17 insertions(+), 16 deletions(-) (limited to 'java/darkknight/jewelrycraft/tileentity') diff --git a/java/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java b/java/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java index 5e91624..8fcf62f 100644 --- a/java/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java +++ b/java/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java @@ -17,6 +17,7 @@ import net.minecraft.util.MathHelper; import darkknight.jewelrycraft.config.ConfigHandler; import darkknight.jewelrycraft.particles.EntityShadowsFX; import darkknight.jewelrycraft.util.JewelryNBT; +import darkknight.jewelrycraft.util.JewelrycraftUtil; public class TileEntityJewelrsCraftingTable extends TileEntity { @@ -96,7 +97,6 @@ public class TileEntityJewelrsCraftingTable extends TileEntity if (angle < 360F) angle += 3F; else angle = 0F; - if (carving > 0) System.out.println(carving); if (this.hasJewelry && this.hasGem && !this.hasEndItem && crafting) { if (carving > 0) carving--; @@ -104,6 +104,7 @@ public class TileEntityJewelrsCraftingTable extends TileEntity { for (int l = 0; l < ConfigHandler.jewelryCraftingTime / (carving + 2); ++l) { + if (worldObj.rand.nextInt(10) == 0) this.worldObj.playSoundEffect(xCoord, yCoord + 0.5F, zCoord, "random.orb", 0.05F, 1F); if (this.getBlockMetadata() == 0) this.worldObj.spawnParticle("instantSpell", xCoord + 0.5F, (double) yCoord + 0.8F, zCoord + 0.2F, 0.0D, 0.0D, 0.0D); if (this.getBlockMetadata() == 1) this.worldObj.spawnParticle("instantSpell", xCoord + 0.8F, (double) yCoord + 0.8F, zCoord + 0.5F, 0.0D, 0.0D, 0.0D); if (this.getBlockMetadata() == 2) this.worldObj.spawnParticle("instantSpell", xCoord + 0.5F, (double) yCoord + 0.8F, zCoord + 0.8F, 0.0D, 0.0D, 0.0D); @@ -127,7 +128,12 @@ public class TileEntityJewelrsCraftingTable extends TileEntity { ItemStack aux = JewelryNBT.gem(jewelry); JewelryNBT.addGem(endItem, gem); - gem = aux.copy(); + if(JewelrycraftUtil.rand.nextBoolean()) gem = aux.copy(); + else + { + this.hasGem = false; + this.gem = new ItemStack(Item.getItemById(0), 0, 0); + } } } this.hasJewelry = false; diff --git a/java/darkknight/jewelrycraft/tileentity/TileEntityMolder.java b/java/darkknight/jewelrycraft/tileentity/TileEntityMolder.java index 6006dea..62ec130 100644 --- a/java/darkknight/jewelrycraft/tileentity/TileEntityMolder.java +++ b/java/darkknight/jewelrycraft/tileentity/TileEntityMolder.java @@ -1,5 +1,7 @@ package darkknight.jewelrycraft.tileentity; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -90,13 +92,15 @@ public class TileEntityMolder extends TileEntity } if (this.hasMoltenMetal && !this.hasJewelBase && quantity >= 0.1f) { - ringMetal = moltenMetal; + ringMetal = moltenMetal.copy(); if (cooling > 0) this.cooling--; if (cooling <= 0f) { if (mold.getItemDamage() == 0) this.jewelBase = moltenMetal; else if (mold.getItemDamage() == 1) this.jewelBase = new ItemStack(ItemList.ring); - else this.jewelBase = new ItemStack(ItemList.necklace); + else if (mold.getItemDamage() == 2) this.jewelBase = new ItemStack(ItemList.necklace); + else if (mold.getItemDamage() == 3) this.jewelBase = new ItemStack(ItemList.bracelet); + else if (mold.getItemDamage() == 4) this.jewelBase = new ItemStack(ItemList.earrings); ringMetal.stackSize = 1; jewelBase.stackSize = 1; if (mold.getItemDamage() != 0 && jewelBase != new ItemStack(Item.getItemById(0), 0, 0)) JewelryNBT.addMetal(jewelBase, ringMetal); diff --git a/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java b/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java index 0aff8df..7a7a7c3 100644 --- a/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java +++ b/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java @@ -1,11 +1,12 @@ package darkknight.jewelrycraft.tileentity; import java.util.ArrayList; -import java.util.Iterator; +import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.NetworkManager; @@ -13,6 +14,7 @@ import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import cpw.mods.fml.common.registry.GameData; import darkknight.jewelrycraft.block.BlockHandPedestal; import darkknight.jewelrycraft.block.BlockList; import darkknight.jewelrycraft.particles.EntityShadowsFX; @@ -118,14 +120,6 @@ public class TileEntityShadowEye extends TileEntity persistTag.setBoolean("nearStartedRitual", true); } } - try - { - // System.out.println(pedestalItems); - } - catch (Exception e) - { - // System.out.println(e); - } } public boolean isValidStructure(World world, int x, int y, int z, int metadata) @@ -213,8 +207,6 @@ public class TileEntityShadowEye extends TileEntity public void addData(World world, int x, int y, int z) { pedestalItems.clear(); - // addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x, y - - // 3, z)); addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x + 2, y - 3, z - 4)); addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x - 4, y - 3, z + 2)); addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x, y - 3, z - 5)); @@ -231,7 +223,6 @@ public class TileEntityShadowEye extends TileEntity public void addPedestalInfo(TileEntityHandPedestal pedestal) { - System.out.println(pedestalItems); if (pedestal != null && pedestal.object != null && pedestal.object.getItem() != null) { if (pedestalItems.isEmpty()) pedestalItems.add(pedestal.object.copy()); -- cgit v1.2.3