1
0
Fork 0

te cleanup

This commit is contained in:
Sen 2025-08-12 20:02:43 +02:00
parent bed1537d9a
commit 96674df391
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
25 changed files with 246 additions and 384 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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)

View file

@ -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);

View file

@ -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);
}