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