Fixed Mana Spreaders, again.

This commit is contained in:
Vasco Lavos committed 2014-04-14 21:01:13 +01:00
1 parent 7582889149
commit fed22ef73a
2 files changed
+9 -2

No files matched your search

@@ -64,6 +64,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
public float rotationX, rotationY;
boolean added = false;
boolean requestsClientUpdate = false;
boolean hasReceivedInitialPacket = false;
IManaReceiver receiver = null;
@@ -157,6 +158,9 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
if(cmp.hasKey(TAG_KNOWN_MANA))
knownMana = cmp.getInteger(TAG_KNOWN_MANA);
if(worldObj != null && worldObj.isRemote)
hasReceivedInitialPacket = true;
}
@Override
@@ -207,6 +211,9 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
}
private boolean needsNewBurstSimulation() {
if(worldObj.isRemote && !hasReceivedInitialPacket)
return false;
if(lastTentativeBurst == null)
return true;
@@ -492,7 +492,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
if(movingobjectposition.entityHit == null) {
TileEntity tile = worldObj.getTileEntity(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ);
if(tile instanceof IManaCollisionGhost && ((IManaCollisionGhost) tile).isGhost())
return;
@@ -720,7 +720,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
public final int meta;
public PositionProperties(Entity entity) {
int x = (int) entity.posX - 1;
int x = (int) entity.posX;
int y = (int) entity.posY;
int z = (int) entity.posZ;
coords = new ChunkCoordinates(x, y, z);