Can anyone else confirm? Trying to toggle PoweredData on levers and buttons seems unsuccessful. While testing I also printed out the Container and even when flipping a lever in game, power Key is always false, when it clearly has is powered in game
Just to claify
location.offer(Keys.POWERED, true);
That definitely should work, it’s implemented right here
What version of Sponge are you running? What is the return value of offer?
Yeah I know. It used to work until I updated the plugin to 5.0.0. I’ve tried latest bleeding SpongeForge and SpongeVanilla. offer always returns false.
Can anyone replicate this? I’m trying to figure out whether this is a Sponge bug or not?
Just tested it on the latest bleeding and can confirm that it’s not working. BlockStates can be modified, however modifying a Location directly does not.
Ah ha! Looking at the implementation here you’ll see that without a Cause in the offer method, the world will only change tile entities.
That explains a lot. Thanks