Skip to content

Mixin リファレンスとフック

概要

Stack Size Adjuster は SpongePowered Mixin を使用して、スタック上限やドロップ挙動、フォント描画のフックを Minecraft のコアエンジンに注入します。


📊 Mixin 注入ポイント一覧

Mixin クラス対象 Minecraft クラス注入ポイント (@At) / 種別説明と役割
ItemMixinnet.minecraft.world.item.Item@Inject(method = "getDefaultMaxStackSize", at = @At("RETURN"))StackSizeManager を用いてデフォルトスタック数を変更。
ItemInstanceMixinnet.minecraft.world.item.ItemInstance@Inject(method = "getMaxStackSize", at = @At("RETURN"))アイテムインスタンスのスタック上限を動的に変更。
ItemStackMixinnet.minecraft.world.item.ItemStack@Redirect (ExtraCodecs.intRange)最大スタック数範囲を Integer.MAX_VALUE に拡張。
ContainerMixinnet.minecraft.world.Container@Overwrite (getMaxStackSize)コンテナ枠の最大スタック数を Integer.MAX_VALUE に上書き。
ContainersMixinnet.minecraft.world.Containers@Overwrite (dropItemStack)コンテナ破壊時のドロップを InventoryDropHelper に委譲。
AbstractContainerMenuMixinnet.minecraft.world.inventory.AbstractContainerMenu@Overwrite (getQuickCraftPlaceCount)オーバーフローを防ぐため double 精度で計算。
GiveCommandMixinnet.minecraft.server.commands.GiveCommand@Inject(method = "giveItem", at = @At("HEAD"))/give をフックして GiveCommandHelper で安全に処理。
DataComponentsMixinnet.minecraft.core.component.DataComponents@Redirect (ExtraCodecs.intRange)DataComponents.MAX_STACK_SIZE コーデックの境界を変更。
ItemStackTemplateMixinnet.minecraft.world.item.ItemStackTemplate@Redirect (ExtraCodecs.intRange)テンプレートコーデックを Integer.MAX_VALUE に拡張。
MinecraftServerMixinnet.minecraft.server.MinecraftServer@Inject(method = "onGameRuleChanged", at = @At("TAIL"))GameRule 変更を監視して制限値を同期。
GuiGraphicsExtractorMixinnet.minecraft.client.gui.GuiGraphicsExtractor@Inject(method = "itemCount", at = @At("HEAD"))スロットの個数表示を縮小マトリックスで描画。

Official documentation & web portal for Dasik Igaijinn mods.