Cuberite Forum

Full Version: BlockType constants?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Suppose the following function:
function OnPlayerPlacingBlock(Player, BlockX, BlockY, BlockZ, BlockType, BlockMeta)

Is there any way to do something like this?
if BlockType == BLOCKTYPE_CHEST then
    -- Do something
end

It's because I don't like the ideia of determining the BlockType by experimental ways, are there any constants like these? I couldn't find any.
And if you really had to, you could also use the block ID from a list in a pinch.