use of net.minecraft.server.v1_7_R4.TileEntity in project Denizen-For-Bukkit by DenizenScript.
the class BlockData_v1_10_R1 method setBlock.
public void setBlock(Block block) {
block.setTypeIdAndData(material.getId(), (byte) data, false);
if (ctag != null) {
CompoundTagBuilder builder = ctag.createBuilder();
builder.putInt("x", block.getX());
builder.putInt("y", block.getY());
builder.putInt("z", block.getZ());
ctag = (CompoundTag_v1_10_R1) builder.build();
// TODO: make this work!
BlockPosition blockPos = new BlockPosition(block.getX(), block.getY(), block.getZ());
TileEntity te = ((CraftWorld) block.getWorld()).getHandle().getTileEntity(blockPos);
te.a(ctag.toNMSTag());
}
}
use of net.minecraft.server.v1_7_R4.TileEntity in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelper_v1_11_R1 method setNbtData.
@Override
public void setNbtData(Block block, CompoundTag compoundTag) {
TileEntity tileEntity = ((CraftBlockState) block.getState()).getTileEntity();
if (tileEntity == null) {
return;
}
tileEntity.a(((CompoundTag_v1_11_R1) compoundTag).toNMSTag());
tileEntity.update();
}
use of net.minecraft.server.v1_7_R4.TileEntity in project Denizen-For-Bukkit by DenizenScript.
the class BlockData_v1_9_R2 method setBlock.
public void setBlock(Block block) {
block.setTypeIdAndData(material.getId(), (byte) data, false);
if (ctag != null) {
CompoundTagBuilder builder = ctag.createBuilder();
builder.putInt("x", block.getX());
builder.putInt("y", block.getY());
builder.putInt("z", block.getZ());
ctag = (CompoundTag_v1_9_R2) builder.build();
// TODO: make this work!
BlockPosition blockPos = new BlockPosition(block.getX(), block.getY(), block.getZ());
TileEntity te = ((CraftWorld) block.getWorld()).getHandle().getTileEntity(blockPos);
te.a(ctag.toNMSTag());
}
}
use of net.minecraft.server.v1_7_R4.TileEntity in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelper_v1_10_R1 method setNbtData.
@Override
public void setNbtData(Block block, CompoundTag compoundTag) {
TileEntity tileEntity = ((CraftBlockState) block.getState()).getTileEntity();
if (tileEntity == null) {
return;
}
tileEntity.a(((CompoundTag_v1_10_R1) compoundTag).toNMSTag());
tileEntity.update();
}
Aggregations