Cannot Cast Block to Repeater

XMLWordPrintable

    • Type: Bug
    • Resolution: Invalid
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      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();

       

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

              Created:
              Updated:
              Resolved: