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

Cannot Cast Block to Repeater

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Minor Minor
    • None
    • None
    • Running Spigot --rev Latest as of date of post on Windows 10 OS.

    • 1.14.4
    • Yes

      Able to Cast Block to Depreciated Diode but throws Block Cannot be cast to Repeater error if using Repeater.

      Function Header: RepeaterHandler(PlayerInteractEvent e)

      CODE WORKS:

      Block RB = e.getClickedBlock();

      if(RB.getType().equals(Material.REPEATER))
           Diode repeater = (Diode)RB.getState().getData();

      CODE FAILS:

      Block RB = e.getClickedBlock();

      if(RB.getType().equals(Material.REPEATER))
          Repeater repeater = (Repeater)RB.getState().getData();

       

            Unassigned Unassigned
            GCD56 Guy Desroches
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: