[SPIGOT-5780] BlockState#update(boolean, boolean) does not change state of redstone components Created: 13/Jun/20  Updated: 13/Jun/20

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Kai Widmaier Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: blockupdates, bug, piston, redstone, spigot, update
Environment:

Linux (Debian 10)
Java 11


Attachments: PNG File 2020-06-13_21.15.45.png     PNG File 2020-06-13_21.15.51.png    
Version: git-Spigot-ae72bf4-183139d (MC: 1.15.2)
Guidelines Read: Yes

 Description   

I'm using the following code to rotate "Directional" blocks and trigger a blockupdate:

 

 

@EventHandler
public void onClick(PlayerInteractEvent e){
  Block block = e.getClickedBlock();
  BlockState state = block.getState();
  BlockData blockData = block.getBlockData();
  Directional directional = (Directional) blockData;
  directional.setFacing(BlockFace.NORTH);
  state.setBlockData(directional);
  e.setCancelled(true);
  state.update(true, true);
}

 

 

This works fine, the rotation happens. However, when using it on Redstone components (For example Pistons or Repeaters) they don't change their powered state even though they are updated with state.update(true, true). In the screenshots it should be clear what I mean by that. 
 

 


Generated at Tue Apr 15 11:10:43 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.