Fix setting blocks that used multiple TileEntities on one block id.

Since forge added support for this feature, we need to double-pass
on setting block data values to preserve both TileEntity type and
block orientations.
Users using MCPC may need to remove their old MCPC nmsblock class
before the new one is used correctly. (Although it was only added
in a dev build)
This commit is contained in:
wizjany
2013-03-30 15:48:06 -04:00
parent 2846119f08
commit e7ae3b4ddf
3 changed files with 10 additions and 10 deletions

View File

@ -253,7 +253,7 @@ public class DefaultNmsBlock extends NmsBlock {
// TileEntity te = craftWorld.getHandle().getTileEntity(x, y, z);
// craftWorld.getHandle().tileEntityList.remove(te);
boolean changed = craftWorld.getHandle().setTypeIdAndData(x, y, z, block.getId(), 0, 0);
boolean changed = craftWorld.getHandle().setTypeIdAndData(x, y, z, block.getId(), block.getData(), 0);
if (block instanceof BaseBlock) {
world.copyToWorld(position, (BaseBlock) block);