#793: Don't unnecessarily toString block in CraftBlockEntityState constructor

This commit is contained in:
blablubbabc 2021-02-06 10:35:00 +11:00 committed by md_5
parent c631fe5579
commit e5cb519d6a
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -24,7 +24,7 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
// get tile entity from block: // get tile entity from block:
CraftWorld world = (CraftWorld) this.getWorld(); CraftWorld world = (CraftWorld) this.getWorld();
this.tileEntity = tileEntityClass.cast(world.getHandle().getTileEntity(this.getPosition())); this.tileEntity = tileEntityClass.cast(world.getHandle().getTileEntity(this.getPosition()));
Preconditions.checkState(this.tileEntity != null, "Tile is null, asynchronous access? " + block); Preconditions.checkState(this.tileEntity != null, "Tile is null, asynchronous access? %s", block);
// copy tile entity data: // copy tile entity data:
this.snapshot = this.createSnapshot(tileEntity); this.snapshot = this.createSnapshot(tileEntity);