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