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

AnvilInventory#getRepairCost() always returns 0 in 1.21 but works fine in 1.20.6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • CraftBukkit version 4283-Spigot-fb8fb72-8c51673 (MC: 1.21) (Implementing API version 1.21-R0.1-SNAPSHOT)
    • Yes

      • Open an anvil
      • Trigger a PrepareAnvilEvent by renaming an item
      • Take a look at the output of AnvilInventory#getRepairCost() 
      • The correct output is provided by AnvilView#getRepairCost()

      Outcome - shown in the attached video:

      AnvilInventory#getRepairCost() is always 0.

      AnvilView#getRepairCost() is not always 0.

       

      Yes, AnvilInventory#getRepairCost() is deprecated since 1.21 and marked for removal in the future. However the replacement method in AnvilView is still marked as experimental. In any case, it can't be deprecated and made unusable in the same version



      code in TestPlugin

            Unassigned Unassigned
            explosivemines Explosivemines
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: