9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-22 08:29:35 +00:00

switch to itemManager's getItemID

This commit is contained in:
XiaoMoMi
2024-03-29 13:36:09 +08:00
parent c82244188e
commit 504c8be268

View File

@@ -2268,7 +2268,7 @@ public class ItemManagerImpl implements ItemManager {
return;
}
// Then check item in hand
String itemID = customProvider.getItemID(condition.getItemInHand());
String itemID = getItemID(condition.getItemInHand());
Optional.ofNullable(itemID2FunctionMap.get(itemID))
.map(map -> map.get(FunctionTrigger.INTERACT_AT))
.ifPresent(itemFunctions -> handleFunctions(itemFunctions, condition, event));
@@ -2287,7 +2287,7 @@ public class ItemManagerImpl implements ItemManager {
var condition = new InteractWrapper(player, null);
// check item in hand
String itemID = customProvider.getItemID(condition.getItemInHand());
String itemID = getItemID(condition.getItemInHand());
Optional.ofNullable(itemID2FunctionMap.get(itemID))
.map(map -> map.get(FunctionTrigger.INTERACT_AIR))
.ifPresent(cFunctions -> handleFunctions(cFunctions, condition, event));
@@ -2333,7 +2333,7 @@ public class ItemManagerImpl implements ItemManager {
return;
}
// Then check item in hand
String itemID = customProvider.getItemID(condition.getItemInHand());
String itemID = getItemID(condition.getItemInHand());
Optional.ofNullable(itemID2FunctionMap.get(itemID))
.map(map -> map.get(FunctionTrigger.INTERACT_AT))
.ifPresent(cFunctions -> handleFunctions(cFunctions, condition, event));