use of com.denizenscript.denizen.nms.util.jnbt.CompoundTagBuilder in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelperImpl method setNbtData.
@Override
public void setNbtData(Block block, CompoundTag ctag) {
CompoundTagBuilder builder = ctag.createBuilder();
builder.putInt("x", block.getX());
builder.putInt("y", block.getY());
builder.putInt("z", block.getZ());
ctag = builder.build();
BlockPos blockPos = new BlockPos(block.getX(), block.getY(), block.getZ());
BlockEntity te = ((CraftWorld) block.getWorld()).getHandle().getBlockEntity(blockPos, true);
te.load(((CompoundTagImpl) ctag).toNMSTag());
}
use of com.denizenscript.denizen.nms.util.jnbt.CompoundTagBuilder in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelperImpl method setNbtData.
@Override
public void setNbtData(Block block, CompoundTag ctag) {
CompoundTagBuilder builder = ctag.createBuilder();
builder.putInt("x", block.getX());
builder.putInt("y", block.getY());
builder.putInt("z", block.getZ());
ctag = builder.build();
BlockPos blockPos = new BlockPos(block.getX(), block.getY(), block.getZ());
BlockEntity te = ((CraftWorld) block.getWorld()).getHandle().getTileEntity(blockPos, true);
te.load(((CompoundTagImpl) ctag).toNMSTag());
}
use of com.denizenscript.denizen.nms.util.jnbt.CompoundTagBuilder in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelperImpl method setNbtData.
@Override
public void setNbtData(Block block, CompoundTag ctag) {
CompoundTagBuilder builder = ctag.createBuilder();
builder.putInt("x", block.getX());
builder.putInt("y", block.getY());
builder.putInt("z", block.getZ());
ctag = builder.build();
BlockPosition blockPos = new BlockPosition(block.getX(), block.getY(), block.getZ());
TileEntity te = ((CraftWorld) block.getWorld()).getHandle().getTileEntity(blockPos);
te.load(((CraftBlockData) block.getBlockData()).getState(), ((CompoundTagImpl) ctag).toNMSTag());
}
Aggregations