Skip to content

Architecture & Mixins Breakdown (MC 26.2)

This document details the internal package layout, class hierarchy, Mixin target breakdown, shadow members, and injection points for Item Clumps on Minecraft 26.2.


🌳 Package Hierarchy & Class Diagram

net.instantgratification.item_clumps

├── ItemClumpsFabric.java                   [Main Entrypoint / GameRules Registration]

├── config/
│   ├── ItemClumpsConfig.java               [Configuration POJO / ConfigHelper Persistence]
│   ├── ModMenuIntegration.java             [ModMenuApi Provider / Safe GUI Factory]
│   └── YaclScreenHelper.java               [YetAnotherConfigLib v3 Screen Factory]

├── mixin/
│   ├── HopperBlockEntityMixin.java         [Hopper Drip Extraction Mixin]
│   └── ItemEntityMixin.java                [Mega-Stack Aggregation & Smart Pickup Mixin]

└── util/
    └── ModVersionGuard.java                [Knot ClassLoader Runtime Safety Guard]

🛠️ Complete Mixin Targets & Injection Breakdown

1. ItemEntityMixin.java

  • Target Class: net.minecraft.world.entity.item.ItemEntity
  • Superclass Extension: extends net.minecraft.world.entity.Entity
Member / MethodAnnotationInjection PointPurpose
getItem()@ShadowN/AAccesses the item stack.
setItem(ItemStack)@ShadowN/AMutates the item stack and updates tracker data.
target@ShadowN/AUUID of the targeting player (for throw safety).
pickupDelay@ShadowN/APickup cooldown timer ticks.
age@ShadowN/ADespawn age timer ticks ($0\text{ to }6000$).
setItem@Inject@At("TAIL")Triggers custom name tag update when stack count changes.
isMergable@Inject@At("HEAD"), cancellable = trueOverrides max stack check with max_clump_size GameRule.
mergeWithNeighbours@RedirectINVOKE -> AABB.inflate(DDD)Zero-allocation expansion of horizontal search radius ($r \in [1, 10]$).
tryToMerge@Inject@At("HEAD"), cancellable = trueExecutes 64-bit sum math, youngest age inheritance, and magnet check.
playerTouch@Inject@At("HEAD"), cancellable = trueDispatches single-batch inventory intake in clean vanilla stacks.

2. HopperBlockEntityMixin.java

  • Target Class: net.minecraft.world.level.block.entity.HopperBlockEntity
MethodAnnotationInjection PointPurpose
addItem(Container, ItemEntity)@Inject@At("HEAD"), cancellable = trueExtracts 1-item slices from mega-clumps ($2.5\text{ items/s}$) into hopper containers.

📄 Mixin Configuration (item-clumps.mixins.json)

json
{
    "required": true,
    "package": "net.instantgratification.item_clumps.mixin",
    "compatibilityLevel": "JAVA_25",
    "refmap": "item-clumps-refmap.json",
    "mixins": [
        "HopperBlockEntityMixin",
        "ItemEntityMixin"
    ],
    "injectors": {
        "defaultRequire": 1
    }
}

Official documentation & web portal for Dasik Igaijinn mods.