diff --git a/src/main/java/fi/dy/masa/itemscroller/mixin/MixinItemStak.java b/src/main/java/fi/dy/masa/itemscroller/mixin/MixinItemStack.java similarity index 93% rename from src/main/java/fi/dy/masa/itemscroller/mixin/MixinItemStak.java rename to src/main/java/fi/dy/masa/itemscroller/mixin/MixinItemStack.java index 44e22cde8..fca0f3c53 100644 --- a/src/main/java/fi/dy/masa/itemscroller/mixin/MixinItemStak.java +++ b/src/main/java/fi/dy/masa/itemscroller/mixin/MixinItemStack.java @@ -11,10 +11,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(ItemStack.class) -public class MixinItemStak +public class MixinItemStack { @Inject(method = "capCount", at = @At("HEAD"), cancellable = true) - private void dontCap(int maxCount, CallbackInfo ci) { + private void dontCap(int maxCount, CallbackInfo ci) + { // Client-side fx for empty shulker box stacking if (MinecraftClient.getInstance().isOnThread() && Configs.Generic.SORT_ASSUME_EMPTY_BOX_STACKS.getBooleanValue()) { @@ -23,7 +24,8 @@ private void dontCap(int maxCount, CallbackInfo ci) { } @Inject(method = "getMaxCount", at = @At("HEAD"), cancellable = true) - private void getMaxCount(CallbackInfoReturnable cir) { + private void getMaxCount(CallbackInfoReturnable cir) + { // Client-side fx for empty shulker box stacking if (MinecraftClient.getInstance().isOnThread() && Configs.Generic.SORT_ASSUME_EMPTY_BOX_STACKS.getBooleanValue() && InventoryUtils.assumeEmptyShulkerStacking) { diff --git a/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java b/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java index 5452dd8e1..b61158d97 100644 --- a/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java +++ b/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java @@ -2790,8 +2790,10 @@ private static boolean isEmptyShulkerBox(ItemStack stack) return isShulkerBox(stack) && stack.getOrDefault(DataComponentTypes.CONTAINER, ContainerComponent.DEFAULT).streamNonEmpty().findAny().isEmpty(); } - public static int stackMaxSize(ItemStack stack, boolean assumeShulkerStacking) { - if (stack.isEmpty()) { + public static int stackMaxSize(ItemStack stack, boolean assumeShulkerStacking) + { + if (stack.isEmpty()) + { return 64; } diff --git a/src/main/resources/mixins.itemscroller.json b/src/main/resources/mixins.itemscroller.json index 69e662dbe..ceb5467e5 100644 --- a/src/main/resources/mixins.itemscroller.json +++ b/src/main/resources/mixins.itemscroller.json @@ -16,7 +16,7 @@ "MixinMerchantScreenHandler", "MixinRecipeBookWidget", "MixinScreen", - "MixinItemStak" + "MixinItemStack" ], "injectors": { "defaultRequire": 1