Fix issues with presents and chunk boundaries / orphan chunks

This commit is contained in:
tterrag1098 committed 2015-04-06 21:39:20 -04:00
1 parent 97fdd64f93
commit a71ec55104
3 files changed
+106 -56

No files matched your search

@@ -79,12 +79,14 @@ public class BlockPresent extends Block implements ICarvable {
TileEntityPresent te = (TileEntityPresent) world.getTileEntity(x, y, z);
world.setBlockMetadataWithNotify(x, y, z, stack.getItemDamage(), 3);
te.setRotation(heading);
te.findConnections();
if (te.isConnected()) {
TileEntityPresent other = te.getConnection();
other.setRotation(heading);
if (!world.isRemote) {
te.findConnections();
if (te.isConnected()) {
TileEntityPresent other = te.getConnection();
other.setRotation(heading);
}
world.markBlockForUpdate(x, y, z);
}
world.markBlockForUpdate(x, y, z);
}
@Override