summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/tileentity
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-17 23:52:19 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-17 23:52:19 +0200
commit38ac6454b2c88432f1da9474fcceafb9d8ab5e3b (patch)
treec3aabab0d8d375b7b497df171445e6eef611db7d /common/darkknight/jewelrycraft/tileentity
parent84dd93f4aac7d3abf1abcec335cd7c3761dd186c (diff)
Sync stuff :)
Diffstat (limited to 'common/darkknight/jewelrycraft/tileentity')
-rw-r--r--common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java7
-rw-r--r--common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java9
-rw-r--r--common/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java11
3 files changed, 21 insertions, 6 deletions
diff --git a/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java b/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
index 633c4fd..74e681b 100644
--- a/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
+++ b/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
@@ -9,7 +9,7 @@ import net.minecraft.tileentity.TileEntity;
public class TileEntityJewelrsCraftingTable extends TileEntity
{
- public boolean hasJewel, hasModifier, hasEndItem;
+ public boolean hasJewel, hasModifier, hasEndItem, isDirty;
public ItemStack jewel, modifier, endItem;
public int timer;
@@ -22,6 +22,7 @@ public class TileEntityJewelrsCraftingTable extends TileEntity
this.hasModifier = false;
this.hasEndItem = false;
this.timer = 0;
+ this.isDirty = false;
}
@Override
@@ -63,6 +64,10 @@ public class TileEntityJewelrsCraftingTable extends TileEntity
public void updateEntity()
{
super.updateEntity();
+ if(isDirty){
+ worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
+ isDirty = true;
+ }
if (this.hasJewel && this.hasModifier && !this.hasEndItem)
{
if (timer > 0)
diff --git a/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java b/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
index 1e36225..8bf1724 100644
--- a/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
+++ b/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
@@ -11,7 +11,7 @@ import darkknight.jewelrycraft.item.ItemList;
public class TileEntityMolder extends TileEntity
{
public int cooling;
- public boolean hasMoltenMetal, hasJewelBase, hasMold;
+ public boolean hasMoltenMetal, hasJewelBase, hasMold, isDirty;
public ItemStack mold, jewelBase, moltenMetal, ringMetal;
public TileEntityMolder()
@@ -24,6 +24,7 @@ public class TileEntityMolder extends TileEntity
this.hasJewelBase = false;
this.hasMoltenMetal = false;
this.hasMold = false;
+ this.isDirty = false;
}
@Override
@@ -70,9 +71,13 @@ public class TileEntityMolder extends TileEntity
public void updateEntity()
{
super.updateEntity();
+ if(isDirty){
+ worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
+ isDirty = true;
+ }
if (moltenMetal.itemID != 0)
{
- this.worldObj.playSoundEffect(xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, "random.fizz", 0.5F, 2.6F + 0.2F * 0.8F);
+ this.worldObj.playSoundEffect(xCoord, yCoord + 0.5F, zCoord, "random.fizz", 0.5F, 1F);
for (int l = 0; l < 2; ++l)
{
//EntityFX entityfx = new EntityReddustFX(this.worldObj, (double)xCoord + Math.random(), (double)yCoord + 0.2D, (double)zCoord + Math.random(), 0.0F, 0.0F, 0.0F);
diff --git a/common/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java b/common/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java
index 06e97ac..e656bed 100644
--- a/common/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java
+++ b/common/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java
@@ -11,7 +11,7 @@ import net.minecraft.tileentity.TileEntity;
public class TileEntitySmelter extends TileEntity
{
public int melting, flow, n = 0, p = 0;
- public boolean hasMetal, hasMoltenMetal;
+ public boolean hasMetal, hasMoltenMetal, isDirty;
public ItemStack metal, moltenMetal;
public TileEntitySmelter()
@@ -22,6 +22,7 @@ public class TileEntitySmelter extends TileEntity
this.hasMoltenMetal = false;
this.metal = new ItemStack(0, 0, 0);
this.moltenMetal = new ItemStack(0, 0, 0);
+ this.isDirty = false;
}
@Override
@@ -57,6 +58,10 @@ public class TileEntitySmelter extends TileEntity
{
super.updateEntity();
Random rand = new Random();
+ if(isDirty){
+ worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
+ isDirty = true;
+ }
if (p > 0)
--p;
else
@@ -73,12 +78,12 @@ public class TileEntitySmelter extends TileEntity
if (flow <= 0)
n = 0;
}
- if (this.melting > 0)
+ if (metal.itemID != 0)
{
for (int l = 0; l < 5; ++l)
{
//EntityFX entityfx = new EntityReddustFX(this.worldObj, (double)xCoord + Math.random(), (double)yCoord + 0.2D, (double)zCoord + Math.random(), 0.0F, 0.0F, 0.0F);
- this.worldObj.spawnParticle("flame", xCoord, yCoord + 1.1D, zCoord, 0.0D, 0.5D, 0.0D);
+ this.worldObj.spawnParticle("flame", xCoord, (double) yCoord + 0.6F, zCoord, 0.0D, 0.0D, 0.0D);
}
}
if (rand.nextInt(65) == 0)