(01-21-2016, 09:11 PM)NiLSPACE Wrote: Add the check for the right click hook.
Also, I believe you should check if the meta is 15 instead of 16. The meta starts from 0 until 15. For the same reason you should also set the left click to 15 instead of 16 when the meta is 0.
Now it works, thank you.
Although the block is still not prevented from being destroyed if the new meta it sets is not in the texture pack. eg.: if coming from 12 to 11 by left clicking, the meta changes, but the block is destroyed. If coming from 2 to 1, the block stays.
It feels like the SetBlockMeta(BlockX, BlockY, BlockZ, meta) somehow fails (but no log is returned in the terminal) and it prevents the mcBlockRespawn() function from returning true and preventing the block from being deleted.