light level and redstone power level at coords
LadyCailin opened this issue ยท 5 comments
CMDHELPER-2658 - Reported by VergilPrime on 2013-04-26 01:21:31 UTC
Add functions to get the redstone power level and light level at a block.
Comment by jb_aero on 2013-06-29 00:28:03 UTC
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 on 2013-07-04 02:34:12 UTC
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. :(
Comment by PseudoKnight on 2015-07-10 19:50:51 UTC
Should be covered in build 2908 now.
Comment by PseudoKnight on 2013-07-03 16:51:18 UTC
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 on 2013-07-03 20:07:56 UTC
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.