Topic category: Troubleshooting, bugs, and solutions
The "Get enum property" procedure block seems to always return false, even when I have the correct property for a block and its value defined.
I am trying to get a pole block (that has a face property that can be either floor, ceiling, or wall, as well as being able to face north/south/east/west) to break when it is not attached to a block appropriately, like an end rod. For example, if the pole was facing the floor it would break if the block below it was removed, if it was facing the ceiling it would check the block above it, and so on. However, no matter what face I check for, the block never breaks.
I have tried the "Set enum property" block and it works completely fine with the same property and value fields (e.g. I can change the block's "face" to "wall"). But if I check the block to see if it has said fields immediately afterwards, it never returns true.
Here is a test procedure I made to debug this, which should demonstrate the issue. The first block runs with no issues, but the if statement always goes to the else.
I would suggest trying to print the value to the console to see what value is being returned
Okay, so after having done that it seems the value for the enum property getter is case sensitive. The console returned "CEILING" and after having changed my procedure blocks to use capitals it seems to be working. No idea why that's required for the getter and not the setter, though.
Thanks for the help!
i didnt work for me even after puting it in caps and it doesnt work, even tho i tested it and it returned it correctly
NVM IM SO DUMB, I WAS DETECTING BELOW INSTED OF ABOVE IF THE BLOCK WAS SOLID
The capitalization did not work for me. I needed to use "Is (provided blockstate) the same blockstate as ((modded block) with enum property (face) set to (floor))" instead of "(get enum property (face) of (provided blockspace)) = (floor)"