Minecraft Pi - normalise block name

mc_block_name  id (number_or_symbol)

Given a block id or a block name will return a symbol representing the block name or throw an exception if the id or name isn’t valid.

Introduced in v2.5

Examples

# Example 1

puts mc_block_name :air



#=> :air



# Example 2

puts mc_block_name 0  



#=> :air



# Example 3

puts mc_block_name 19



#=> Throws an invalid block id exception



# Example 4

puts mc_block_name :foo



#=> Throws an invalid block name exception