Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-5780

BlockState#update(boolean, boolean) does not change state of redstone components

XMLWordPrintable

    • git-Spigot-ae72bf4-183139d (MC: 1.15.2)
    • Yes

      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. 
       

       

        1. 2020-06-13_21.15.45.png
          1.60 MB
          Kai Widmaier
        2. 2020-06-13_21.15.51.png
          1.77 MB
          Kai Widmaier

            Unassigned Unassigned
            RealityTest Kai Widmaier
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: