From 7fa12bd8145ba140287d1abc5c47d13b89b2077e Mon Sep 17 00:00:00 2001 From: NotMyWing Date: Mon, 11 Dec 2023 14:16:12 +1100 Subject: [PATCH] Fix formatted cells not displaying stack counts Closes #33 --- .../neeve/nae2/mixin/jei/cellview/MixinApiClientHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/co/neeve/nae2/mixin/jei/cellview/MixinApiClientHelper.java b/src/main/java/co/neeve/nae2/mixin/jei/cellview/MixinApiClientHelper.java index 46e6b83..9af4a81 100644 --- a/src/main/java/co/neeve/nae2/mixin/jei/cellview/MixinApiClientHelper.java +++ b/src/main/java/co/neeve/nae2/mixin/jei/cellview/MixinApiClientHelper.java @@ -8,6 +8,7 @@ import co.neeve.nae2.common.features.subfeatures.JEIFeatures; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import com.llamalad7.mixinextras.sugar.Local; import mezz.jei.config.KeyBindings; import net.minecraft.client.resources.I18n; import org.spongepowered.asm.mixin.Mixin; @@ -34,9 +35,10 @@ private > void addCellInformation(ICellInventoryHandler "Lappeng/api/storage/data/IItemList;" )) private > IItemList getAvailableItems(ICellInventory instance, IItemList in, - Operation> operation) { + Operation> operation, + @Local ICellInventoryHandler handler) { // Return the same list without filling it. - if (JEIFeatures.CELL_VIEW.isEnabled()) return in; + if (!handler.isPreformatted() && JEIFeatures.CELL_VIEW.isEnabled()) return in; return operation.call(instance, in); }