summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/block
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-21 20:03:05 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-21 20:03:05 +0200
commitcaff6f5dc8c11632b88c54995cbd44eeb8eb856f (patch)
treeb2889cc1235f0c0e171b8cd139e347c9decb0169 /common/darkknight/jewelrycraft/block
parent8e3546bfaf49e0e7805cb43e69cd2d3996ea484b (diff)
Trying to fix bugs
Diffstat (limited to 'common/darkknight/jewelrycraft/block')
-rw-r--r--common/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java10
-rw-r--r--common/darkknight/jewelrycraft/block/BlockMolder.java6
-rw-r--r--common/darkknight/jewelrycraft/block/BlockSmelter.java5
3 files changed, 11 insertions, 10 deletions
diff --git a/common/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java b/common/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java
index 30daab2..4d40d5c 100644
--- a/common/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java
+++ b/common/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java
@@ -72,13 +72,13 @@ public class BlockJewelrsCraftingTable extends BlockContainer
if (te.hasModifier && entityPlayer.isSneaking())
{
- dropItem( world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.modifier);
+ dropItem( world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.modifier.copy());
te.modifier = new ItemStack(0, 0, 0);
te.hasModifier = false;
}
if (te.hasJewel && entityPlayer.isSneaking())
{
- dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.jewel);
+ dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.jewel.copy());
te.jewel = new ItemStack(0, 0, 0);
te.hasJewel = false;
}
@@ -102,8 +102,8 @@ public class BlockJewelrsCraftingTable extends BlockContainer
TileEntityJewelrsCraftingTable te = (TileEntityJewelrsCraftingTable) world.getBlockTileEntity(i, j, k);
if (te != null)
{
- if(te.hasModifier) dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.modifier);
- if(te.hasJewel) dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.jewel);
+ if(te.hasModifier) dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.modifier.copy());
+ if(te.hasJewel) dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.jewel.copy());
if(te.hasEndItem) giveJewelToPlayer(te, te.endItem, te.modifier);
}
super.breakBlock(world, i, j, k, par5, par6);
@@ -114,7 +114,7 @@ public class BlockJewelrsCraftingTable extends BlockContainer
if (item != null)
{
ItemRing.addEffect(item, Potion.fireResistance.id);
- dropItem(cf.worldObj, (double)cf.xCoord, (double)cf.yCoord, (double)cf.zCoord, item);
+ dropItem(cf.worldObj, (double)cf.xCoord, (double)cf.yCoord, (double)cf.zCoord, item.copy());
}
}
diff --git a/common/darkknight/jewelrycraft/block/BlockMolder.java b/common/darkknight/jewelrycraft/block/BlockMolder.java
index 5b6465a..cd4b83b 100644
--- a/common/darkknight/jewelrycraft/block/BlockMolder.java
+++ b/common/darkknight/jewelrycraft/block/BlockMolder.java
@@ -56,7 +56,7 @@ public class BlockMolder extends BlockContainer
}
if (te.hasMold && entityPlayer.isSneaking())
{
- dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.mold);
+ dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.mold.copy());
te.mold = new ItemStack(0, 0, 0);
te.hasMold = false;
te.isDirty = true;
@@ -81,7 +81,7 @@ public class BlockMolder extends BlockContainer
if (te != null)
{
if(te.hasJewelBase) giveJewelToPlayer(te, te.jewelBase, te.ringMetal);
- if(te.hasMold) dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.mold);
+ if(te.hasMold) dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.mold.copy());
}
super.breakBlock(world, i, j, k, par5, par6);
@@ -95,7 +95,7 @@ public class BlockMolder extends BlockContainer
{
ItemRing.addMetal(item, metal);
}
- dropItem(md.worldObj, (double)md.xCoord, (double)md.yCoord, (double)md.zCoord, item);
+ dropItem(md.worldObj, (double)md.xCoord, (double)md.yCoord, (double)md.zCoord, item.copy());
md.isDirty = true;
}
}
diff --git a/common/darkknight/jewelrycraft/block/BlockSmelter.java b/common/darkknight/jewelrycraft/block/BlockSmelter.java
index e83afb2..23b9275 100644
--- a/common/darkknight/jewelrycraft/block/BlockSmelter.java
+++ b/common/darkknight/jewelrycraft/block/BlockSmelter.java
@@ -51,7 +51,7 @@ public class BlockSmelter extends BlockContainer
public void breakBlock(World world, int i, int j, int k, int par5, int par6)
{
TileEntitySmelter te = (TileEntitySmelter) world.getBlockTileEntity(i, j, k);
- if (te != null && te.hasMetal) dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.metal);
+ if (te != null && te.hasMetal) dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.metal.copy());
super.breakBlock(world, i, j, k, par5, par6);
}
@@ -82,7 +82,7 @@ public class BlockSmelter extends BlockContainer
if (te.hasMetal && entityPlayer.isSneaking())
{
- dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.metal);
+ dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.metal.copy());
te.hasMetal = false;
}
world.setBlockTileEntity(i, j, k, te);
@@ -115,6 +115,7 @@ public class BlockSmelter extends BlockContainer
te.moltenMetal = new ItemStack(0, 0, 0);
te.hasMoltenMetal = false;
me.isDirty = true;
+ te.isDirty = true;
}
else if (te.hasMetal && te.melting > 0)
player.addChatMessage(StatCollector.translateToLocalFormatted("chatmessage.jewelrycraft.smelter.metalismelting", te.metal.getDisplayName()) + " (" + ((ConfigHandler.ingotMeltingTime - te.melting)*100/ConfigHandler.ingotMeltingTime) + "%)");