use of org.bukkit.craftbukkit.v1_17_R1.block.CraftBlockState in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelper_v1_8_R3 method getNbtData.
@Override
public CompoundTag getNbtData(Block block) {
TileEntity tileEntity = ((CraftBlockState) block.getState()).getTileEntity();
if (tileEntity == null) {
return null;
}
NBTTagCompound nbtTagCompound = new NBTTagCompound();
tileEntity.b(new NBTTagCompound());
return CompoundTag_v1_8_R3.fromNMSTag(nbtTagCompound);
}
use of org.bukkit.craftbukkit.v1_17_R1.block.CraftBlockState 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 org.bukkit.craftbukkit.v1_17_R1.block.CraftBlockState 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();
}
use of org.bukkit.craftbukkit.v1_17_R1.block.CraftBlockState in project Denizen by DenizenScript.
the class BlockHelperImpl method generateBlockState.
@Override
public org.bukkit.block.BlockState generateBlockState(Block block, Material mat) {
CraftBlockState state = new CraftBlockState(block);
state.setData(CraftMagicNumbers.getBlock(mat).getBlockData());
return state;
}
use of org.bukkit.craftbukkit.v1_17_R1.block.CraftBlockState in project Magma-1.16.x by magmafoundation.
the class BlockStateListPopulator method setBlock.
@Override
public boolean setBlock(BlockPos pos, BlockState newState, int flags) {
CraftBlockState state = CraftBlockState.getBlockState(world, pos, flags);
state.setData(newState);
list.put(pos, state);
return true;
}
Aggregations