Minecart.setDamage() not working

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • git-Spigot-a99063f-8ea9b13 (MC: 1.15.2)
    • Yes

      Calling Minecart.setDamage(40.0) doesn't kill the minecart as it said in javadoc.

      (Also tried numbers over 40, not work either.)

      Instead, the minecart's damage value is set to 40, which means after calling this, if you attack the minecart immediately, it can be killed with only one attack by hand.

       code used:
      public void on(VehicleCreateEvent event) {
        if (event.getVehicle() instanceof Minecart) {
          System.out.println("minecart!");
         ((Minecart)event.getVehicle()).setDamage(40.0); // also tried 41.0
       }
      }

            Assignee:
            Unassigned
            Reporter:
            djytw
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: