
light level and redstone power level at coords
LadyCailinBot opened this issue ยท 5 comments
CMDHELPER-2658 - Reported by VergilPrime
Add functions to get the redstone power level and light level at a block.
Comment by jb_aero
get_light_at has been added, as well as is_block_powered.
Bukkit's API for checking actual power level was so unhelpful it wasn't worth adding a function for.
Comment by PseudoKnight
getBlockPower is not useful for this? It's supposed to return block power level. Or did you test it and it wasn't accurate?
Comment by jb_aero
In most cases it was either 15 or 0, and very rarely 12, and I don't recall understanding the twelves. For example, a redstone block returns 0 on its own, as does redstone dust. Put dust next to the block and the block will be 15 but the dust will still be 0. Make a trail of dust and check the block that should be a low power level, and it will return 15. I even made a script that tested the block I was looking at and all six sides, then I redid it using the one that takes a BlockFace and found it equally confusing.
Comment by PseudoKnight
Well, I guess some of that makes sense, as a redstoner. Block powered is a separate thing from a redstone source. A redstone block is a source, but it's not powered by anything. You put the redstone next to it, then it feeds back into the block -- as silly as that is practically. I'm just not sure how you'd ever measure a different power level if blocks don't get different power levels. :(