Fix renaming hook again

Turns out, there's a bug in Forge and the stacks are misassigned for that particular event
This commit is contained in:
abel1502 2025-06-02 23:12:38 +03:00
parent cf26eac2c9
commit 5fe26d5647
No known key found for this signature in database
GPG Key ID: 076926596A536338

View File

@ -1252,10 +1252,11 @@ public class ModEventHandler {
@SubscribeEvent
public void onAnvilRepair(AnvilRepairEvent event) {
// Anvil renaming no longer increments the repair cost
// Note: Forge has a bug, the names are wrong. Right is output, output is left, left is right
if(event.left == null && event.right != null && event.output != null) {
event.output.setRepairCost(event.right.getRepairCost());
event.right.setRepairCost(event.output.getRepairCost());
}
}