use of net.minecraft.server.v1_16_R2.IBlockData in project PaperDev by Kamillaova.
the class CraftMinecart method setDisplayBlock.
public void setDisplayBlock(MaterialData material) {
if (material != null) {
IBlockData block = CraftMagicNumbers.getBlock(material.getItemTypeId()).fromLegacyData(material.getData());
this.getHandle().setDisplayBlock(block);
} else {
// Set block to air (default) and set the flag to not have a display block.
this.getHandle().setDisplayBlock(Blocks.AIR.getBlockData());
this.getHandle().a(false);
}
}
Aggregations