[SPIGOT-7570] PrepareItemCraftEvent#isRepair() seems to always return false in 1.20 Created: 17/Jan/24  Updated: 25/Dec/24  Resolved: 18/Jan/24

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Athlaeos Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: api, bug, crafting, repairing
Environment:

Tested in spigot 1.19 and 1.20

 


Attachments: PNG File image-2024-01-17-21-16-29-154.png     PNG File image-2024-01-17-21-16-42-884.png     PNG File image-2024-01-17-21-17-38-183.png    
Version: CraftBukkit version 4014-Spigot-864e4ac-771182f (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

PrepareItemCraftEvent#isRepair() seems to always return false on 1.20 versions of spigot, making it unreliable in checking if the current recipe is a repairing recipe. On 1.19 this seems to work properly

 

The following code used:

@EventHandler(priority = EventPriority.HIGHEST)public void onPrepareCraft(PrepareItemCraftEvent e){ System.out.println("is repair: " + e.isRepair());

{color:#cc7832}}

On 1.20 the following recipe

returns

On 1.19 this returns true instead.

 

A workaround is checking if all items in the grid are identical, with max durabilities greater than 0.


Generated at Sat Dec 13 13:39:13 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.