public CraftBlockState(final Block block) { this.world = (CraftWorld) block.getWorld(); this.x = block.getX(); this.y = block.getY(); this.z = block.getZ(); this.type = block.getTypeId(); this.light = block.getLightLevel(); this.chunk = (CraftChunk) block.getChunk(); this.flag = 3; // Cauldron start - save TE data TileEntity te = world.getHandle().getTileEntity(x, y, z); if (te != null) { nbt = new NBTTagCompound(); te.writeToNBT(nbt); } else nbt = null; // Cauldron end createData(block.getData()); }
public CraftBlockState(BlockSnapshot blocksnapshot) { this.world = blocksnapshot.world.getWorld(); this.x = blocksnapshot.x; this.y = blocksnapshot.y; this.z = blocksnapshot.z; this.type = net.minecraft.block.Block.getIdFromBlock(blocksnapshot.replacedBlock); this.light = (byte) blocksnapshot.replacedBlock.getLightValue(); this.chunk = (CraftChunk) this.world.getBlockAt(this.x, this.y, this.z).getChunk(); this.flag = 3; TileEntity te = this.world.getHandle().getTileEntity(this.x, this.y, this.z); if (te != null) { this.nbt = new NBTTagCompound(); te.writeToNBT(this.nbt); } else { this.nbt = null; } this.createData((byte) blocksnapshot.meta); }
public CraftBlockState(final Block block) { this.world = (CraftWorld) block.getWorld(); this.x = block.getX(); this.y = block.getY(); this.z = block.getZ(); this.type = block.getTypeId(); this.light = block.getLightLevel(); this.chunk = (CraftChunk) block.getChunk(); this.flag = 3; createData(block.getData()); }
public CraftBlockState(final Block block) { this.world = (CraftWorld) block.getWorld(); this.x = block.getX(); this.y = block.getY(); this.z = block.getZ(); this.type = block.getTypeId(); this.light = block.getLightLevel(); this.chunk = (CraftChunk) block.getChunk(); createData(block.getData()); }
public CraftBlockState(final Block block) { this.world = (CraftWorld) block.getWorld(); this.x = block.getX(); this.y = block.getY(); this.z = block.getZ(); this.type = block.getTypeId(); this.chunk = (CraftChunk) block.getChunk(); this.flag = 3; createData(block.getData()); }
public CraftBlock(CraftChunk chunk, int x, int y, int z) { this.x = x; this.y = y; this.z = z; this.chunk = chunk; }