summaryrefslogtreecommitdiff
path: root/common
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
parent8e3546bfaf49e0e7805cb43e69cd2d3996ea484b (diff)
Trying to fix bugs
Diffstat (limited to 'common')
-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
-rw-r--r--common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java16
4 files changed, 19 insertions, 18 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) + "%)");
diff --git a/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java b/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java
index 210b260..51cfe03 100644
--- a/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java
+++ b/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java
@@ -49,10 +49,10 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer
String texture = me.jewelBase.getIconIndex().getIconName().substring(me.jewelBase.getIconIndex().getIconName().lastIndexOf(":") + 1) + ".png";
ResourceLocation lava = new ResourceLocation(domain, "textures/items/" + texture);
Minecraft.getMinecraft().renderEngine.bindTexture(lava);
- double minu = me.jewelBase.getIconIndex().getMinU();
- double minv = me.jewelBase.getIconIndex().getMinV();
- double maxu = me.jewelBase.getIconIndex().getMaxU();
- double maxv = me.jewelBase.getIconIndex().getMaxV();
+ double minu = me.jewelBase.getIconIndex().getInterpolatedU(16D);
+ double minv = me.jewelBase.getIconIndex().getInterpolatedV(-96D);
+ double maxu = me.jewelBase.getIconIndex().getInterpolatedU(16.0D * 256D);
+ double maxv = me.jewelBase.getIconIndex().getInterpolatedV(-96.0D * 256D);
GL11.glPushMatrix();
GL11.glScalef(1f / 16f, 1f / 16f, 1f / 16f);
GL11.glRotatef(180F, 0F, 1F, 0F);
@@ -83,10 +83,10 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer
String texture = "textures/items/" + name + ".png";
ResourceLocation lava = new ResourceLocation("jewelrycraft", texture);
Minecraft.getMinecraft().renderEngine.bindTexture(lava);
- double minu = me.mold.getIconIndex().getMinU();
- double minv = me.mold.getIconIndex().getMinV();
- double maxu = me.mold.getIconIndex().getMaxU();
- double maxv = me.mold.getIconIndex().getMaxV();
+ double minu = me.mold.getIconIndex().getInterpolatedU(16D);
+ double minv = me.mold.getIconIndex().getInterpolatedV(-96D);
+ double maxu = me.mold.getIconIndex().getInterpolatedU(16.0D * 256D);
+ double maxv = me.mold.getIconIndex().getInterpolatedV(-96.0D * 256D);
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glScalef(1f / 16f, 1f / 16f, 1f / 16f);