From 8a3c25ff8e152a408e65cadca7e4ab63af5476c5 Mon Sep 17 00:00:00 2001 From: ImmuState Date: Sat, 4 Jun 2022 17:30:44 -0700 Subject: [PATCH] Consume material. --- .../game/managers/ForgingManager/ForgingManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/game/managers/ForgingManager/ForgingManager.java b/src/main/java/emu/grasscutter/game/managers/ForgingManager/ForgingManager.java index 663bb5b2a..5ff18fb38 100644 --- a/src/main/java/emu/grasscutter/game/managers/ForgingManager/ForgingManager.java +++ b/src/main/java/emu/grasscutter/game/managers/ForgingManager/ForgingManager.java @@ -145,7 +145,8 @@ public class ForgingManager { continue; } - this.player.getInventory().removeItem(material.getItemId(), material.getCount() * req.getForgeCount()); + GameItem item = this.player.getInventory().getInventoryTab(ItemType.ITEM_MATERIAL).getItemById(material.getItemId()); + this.player.getInventory().removeItem(item, material.getCount() * req.getForgeCount()); } this.player.setMora(this.player.getMora() - forgeData.getScoinCost() * req.getForgeCount());