Skip to content

Commit e9fb25a

Browse files
committed
fix null fuzzymode error
close #833
1 parent 8f323f0 commit e9fb25a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • src/main/java/de/srendi/advancedperipherals/common/addons/ae2

‎src/main/java/de/srendi/advancedperipherals/common/addons/ae2/AEApi.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package de.srendi.advancedperipherals.common.addons.ae2;
22

33
import appeng.api.AECapabilities;
4+
import appeng.api.config.FuzzyMode;
45
import appeng.api.crafting.IPatternDetails;
56
import appeng.api.implementations.blockentities.IChestOrDrive;
67
import appeng.api.inventories.InternalInventory;
@@ -447,7 +448,10 @@ public static Map<String, Object> cellToLua(Item cell, ItemStack stack) {
447448

448449
properties.put("item", LuaConverter.itemToLua(cell));
449450
if (cell instanceof ICellWorkbenchItem workbenchCell) {
450-
properties.put("fuzzyMode", workbenchCell.getFuzzyMode(stack).toString());
451+
FuzzyMode fuzzyMode = workbenchCell.getFuzzyMode(stack);
452+
if (fuzzyMode != null) {
453+
properties.put("fuzzyMode", fuzzyMode.toString());
454+
}
451455
}
452456
ICellWrapper wrapper = ICellWrapper.of(cell, stack);
453457
if (wrapper != null) {

0 commit comments

Comments
 (0)