01-21-2016, 10:38 PM
(01-21-2016, 10:32 PM)NiLSPACE Wrote: Yeah, something like this:
-- The list g_MaxMetas = { [E_BLOCK_STAINED_GLASS] = 15, [E_BLOCK_WOOL] = 15, [E_BLOCK_BIG_FLOWER] = 5, ... } -- How to get the max meta: local maxMeta = g_MaxMetas[BlockType] or 0
This way you only have to write down the blocks that can have multiple blockmetas.
Now what if I have a texture pack that has additional metas? I would have to create a list for all known texturepacks individually. Isn't there a way to just ignore max value, set whatever number to the block and continue executing other functions (mcBlockRespawn - return true) in Cuberite? If Cuberite didn't stop executing the function when an invalid meta is set to the block, all of this would be easy.