Skip to content

Mixin Reference & Hooks

Overview

Stack Size Adjuster utilizes SpongePowered Mixins to adjust stack size limits, container drop limits, and font rendering directly within Minecraft's core engine classes.


📊 Complete Mixin Injection Breakdown Table

Mixin ClassTarget Minecraft ClassInjection Point (@At) / TypePurpose & Hook Description
ItemMixinnet.minecraft.world.item.Item@Inject(method = "getDefaultMaxStackSize", at = @At("RETURN"))Modifies default item stack size using StackSizeManager.
ItemInstanceMixinnet.minecraft.world.item.ItemInstance@Inject(method = "getMaxStackSize", at = @At("RETURN"))Modifies item instance stack limit dynamically.
ItemStackMixinnet.minecraft.world.item.ItemStack@Redirect on ExtraCodecs.intRangeExpands max stack size range to Integer.MAX_VALUE.
ContainerMixinnet.minecraft.world.Container@Overwrite on getMaxStackSizeOverrides container slot stack limit to Integer.MAX_VALUE.
ContainersMixinnet.minecraft.world.Containers@Overwrite on dropItemStackDelegates container item drops to InventoryDropHelper.
AbstractContainerMenuMixinnet.minecraft.world.inventory.AbstractContainerMenu@Overwrite on getQuickCraftPlaceCountUses double precision math to prevent quick-crafting divide wrap.
GiveCommandMixinnet.minecraft.server.commands.GiveCommand@Inject(method = "giveItem", at = @At("HEAD"))Intercepts /give to prevent entity overflow via GiveCommandHelper.
DataComponentsMixinnet.minecraft.core.component.DataComponents@Redirect on ExtraCodecs.intRangeModifies codec bounds for DataComponents.MAX_STACK_SIZE.
ItemStackTemplateMixinnet.minecraft.world.item.ItemStackTemplate@Redirect on ExtraCodecs.intRangeExpands template codec range to Integer.MAX_VALUE.
MinecraftServerMixinnet.minecraft.server.MinecraftServer@Inject(method = "onGameRuleChanged", at = @At("TAIL"))Listens to GameRule updates and synchronizes active limits.
GuiGraphicsExtractorMixinnet.minecraft.client.gui.GuiGraphicsExtractor@Inject(method = "itemCount", at = @At("HEAD"))Overrides slot item count text rendering with scale-down matrix.

Official documentation & web portal for Dasik Igaijinn mods.