Offering Keys.POWERED or BlockTrait BooleanTraits.LEVER_POWERED to a lever doesnt update the block the lever is on. #420
Description
I am currently running
- SpongeVanilla version: 1.12.2-7.1.7-RC218 (recommended/latest still?)
- Java version: 1.8.0_222/64-bit
- Operating System: Linux (4.4.0-89-generic/amd64)
- Plugins: Just my test plugin
Issue Description
I have attempted to change the state of a lever by trying either the methods above like so:
if(!block.supports(Keys.POWERED)) return; Sponge.getCauseStackManager().pushCause(Object); block.offer(Keys.POWERED, power); Sponge.getCauseStackManger().popCause();
and
Optional<BlockState> lever = block.getBlock().withTrait(BooleanTraits.LEVER_POWERED,power); if(lever.isPresent()) { Sponge.getCauseStackManager().pushCause(Object); block.setBlock(lever.get()); Sponge.getCauseStackManager().popCause(); }
Ive even added a scheduled update on the block the lever is on, to no avail.
The reason i say the block the lever is on is not updating is because redstone torches and lamps on the block don't update around the block the lever is on. Redstone or other blocks DIRECTLY connected to the lever work as normal. Oddly enough, i dont hear the lever flick sound effect, not sure if related.