te cleanup
This commit is contained in:
parent
bed1537d9a
commit
96674df391
25 changed files with 246 additions and 384 deletions
|
@ -50,7 +50,7 @@ public class CommandBlock extends Command {
|
|||
TagObject te = new TagObject();
|
||||
tile.writeTags(te);
|
||||
te.merge(tag);
|
||||
TileEntity newTile = TileEntity.createAndLoadEntity(world, world.getChunk(position), position, te);
|
||||
TileEntity newTile = TileEntity.createTile(world, world.getChunk(position), position, te);
|
||||
if(newTile != null) {
|
||||
world.removeTileEntity(position);
|
||||
world.setTileEntity(position, newTile);
|
||||
|
|
|
@ -67,7 +67,7 @@ public class CommandSet extends Command {
|
|||
TagObject te = new TagObject();
|
||||
tile.writeTags(te);
|
||||
te.merge(tag);
|
||||
TileEntity newTile = TileEntity.createAndLoadEntity(world, world.getChunk(pos), pos, te);
|
||||
TileEntity newTile = TileEntity.createTile(world, world.getChunk(pos), pos, te);
|
||||
if(newTile != null) {
|
||||
world.removeTileEntity(pos);
|
||||
world.setTileEntity(pos, newTile);
|
||||
|
|
|
@ -734,7 +734,7 @@ public class Player extends User implements Executor, IPlayer
|
|||
}
|
||||
else if (object instanceof TileEntityChest chest)
|
||||
{
|
||||
this.sendPacket(new SPacketOpenWindow(this.getNextWindowId(), chest.getBlockType(), chest.getSizeInventory()));
|
||||
this.sendPacket(new SPacketOpenWindow(this.getNextWindowId(), chest.getBlock(), chest.getSizeInventory()));
|
||||
this.entity.openContainer = new ContainerChest(this.entity, chest);
|
||||
}
|
||||
else if (object instanceof InteractionObject obj)
|
||||
|
|
|
@ -553,7 +553,7 @@ public class Region {
|
|||
continue;
|
||||
}
|
||||
pos = new BlockPos(chunk.xPos << 4 | pos.getX(), pos.getY(), chunk.zPos << 4 | pos.getZ());
|
||||
TileEntity tileentity = TileEntity.createAndLoadEntity(world, chunk, pos, tile);
|
||||
TileEntity tileentity = TileEntity.createTile(world, chunk, pos, tile);
|
||||
|
||||
if(tileentity != null) {
|
||||
chunk.addTileEntity(tileentity);
|
||||
|
|
|
@ -1900,7 +1900,7 @@ public final class WorldServer extends AWorldServer {
|
|||
if(block.getData() != null) {
|
||||
this.removeTileEntity(pos);
|
||||
TagObject tag = block.getData();
|
||||
TileEntity tileEntity = TileEntity.createAndLoadEntity(this, chunk, pos, tag);
|
||||
TileEntity tileEntity = TileEntity.createTile(this, chunk, pos, tag);
|
||||
if(tileEntity != null) {
|
||||
this.setTileEntity(pos, tileEntity);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue