How to power a lever and update blocks around?

Hello,

I try to power a lever and update the blocks around to power the redstone dust.

With this code I can power the lever:

BlockState state = this.getSnapshot().getState();
BlockState newstate = state.with(Keys.POWERED, bit).get();
this.getSnapshot().getLocation().get().setBlock(newstate, true);

But the redstone dust is not powered.

I tried also this code, but same issue:

BlockState state = this.getSnapshot().getState();
BlockState newstate = state.with(Keys.POWERED, bit).get();
this.getSnapshot().withState(newstate).restore(false, true);

Anyone can help me and tell me what’s wrong ?

Thanks

Help ! Could it be a bug in Sponge ?

@Aaron1011 made an issue on Github, any comments Aaron?

I plan to work on that fairly soon.