Topic category: Help with Minecraft modding (Java Edition)
Is there any official way to allow a procedure to check if a block is unbreakable, and return true if so? For example Bedrock or a command block?
I am making block copy system of sorts, but I don't want the player to be able to "copy/paste" bedrock like blocks. I know I can just have the procedure refuse to run if the block is bedrock, command block, structure block, etc... But this eliminates other mod block compatibility.. If there is no official support for this, a custom code snippet would be awesome and super appreciated! Im not quite to the level of understanding mc code yet so I cant really do that myself..
What I specifically am looking for is something like this- "Is (get block at, x, y, z) unbreakable?"
Ok, I thought (get hardness of block) was added by a plugin that was outdated, but I guess it is actually part of mcreator. So it seems "IF (NOT) "get hardness of block at z, y, z" = "-1""is what I was looking for hah...