-
Notifications
You must be signed in to change notification settings - Fork 0
26.1.2 Hopper and Automation Integration
This document details the hopper extraction mechanics, transfer rate parity, redstone sorter stability, and container integration of Item Clumps for Minecraft 26.1.2.
| Property | Specification |
|---|---|
| System Name | Hopper Drip Extraction Engine |
| Target Class | net.minecraft.world.level.block.entity.HopperBlockEntity |
| Extraction Method | HopperBlockEntity.addItem(Container, ItemEntity) |
| Extraction Rate |
|
| Item Slice Strategy | baseItem.setCount(1) |
| Automation Compatibility | 100% compatible with Vanilla Redstone Item Sorters & Filters |
In vanilla Minecraft, hoppers extract entire ItemEntity instances if their stack size is
Item Clumps intercepts HopperBlockEntity.addItem to enforce Drip Extraction:
┌────────────────────────────┐
│ Hopper Tick Cycle │
│ (Every 8 Game Ticks) │
└─────────────┬──────────────┘
│
▼
┌────────────────────────────┐
│ Is Item Entity Count > 1? │
└─────────────┬──────────────┘
│
┌────────────────┴────────────────┐
│ (Yes) │ (No)
▼ ▼
┌───────────────────────────┐ ┌───────────────────────────┐
│ Clone Single Item Slice │ │ Native Vanilla Extraction │
│ baseItem = stack.copy() │ │ (Standard 1-item / stack) │
│ baseItem.setCount(1) │ └───────────────────────────┘
└─────────────┬─────────────┘
│
▼
┌───────────────────────────┐
│ Try Insert Into Hopper │
│ HopperBlockEntity.addItem │
└─────────────┬─────────────┘
│
┌────────┴────────┐
│ │
(Success) (Failed / Full)
│ │
▼ ▼
┌───────────────────┐ ┌───────────────┐
│ Shrink Ground │ │ Abort Transfer│
│ Clump by 1; │ │ Entity Retains│
│ Refresh Name Tag. │ │ Full Count. │
└───────────────────┘ └───────────────┘
From HopperBlockEntityMixin.java in Minecraft 26.1.2:
@Inject(method = "addItem(Lnet/minecraft/world/Container;Lnet/minecraft/world/entity/item/ItemEntity;)Z", at = @At("HEAD"), cancellable = true)
private static void item_clumps$customHopperExtract(Container container, ItemEntity entity, CallbackInfoReturnable<Boolean> cir) {
ItemStack itemStack = entity.getItem();
int count = itemStack.getCount();
if (count > 1) {
// Entity is a clump. Extract exactly 1 item.
ItemStack baseItem = itemStack.copy();
baseItem.setCount(1);
ItemStack result = HopperBlockEntity.addItem(null, container, baseItem, null);
if (result.isEmpty()) {
// Hopper successfully absorbed the 1 item. Shrink entity stack.
ItemStack originalStack = entity.getItem();
originalStack.shrink(1);
entity.setItem(originalStack); // Updates standard item tracker and custom name
cir.setReturnValue(true);
} else {
// Hopper was full or couldn't take it
cir.setReturnValue(false);
}
}
}Item Clumps is engineered with ❤️ by Dasik (Rifaditya) | Licensed under GNU General Public License v3.0 (GPL-3.0-or-later).
📌 Repository Source Disclaimer: The documentation in this Wiki reflects the current source code state in the repository, which may include recent unreleased commits or developmental features ahead of public release builds on CurseForge and Modrinth.
- 26.2 Hub
- 26.2 Mega-Stack Clumping
- 26.2 Smart Pickup System
- 26.2 Hopper Integration
- 26.2 Despawn Age Rules
- 26.2 Holographic Labels
- 26.2 Mod Compatibility
- 26.2 GameRules Table
- 26.2 Commands & Admin
- 26.2 Advancements
- 26.2 Configuration
- 26.2 ModVersionGuard
- 26.2 Architecture & Mixins
- 26.2 Developer Setup
- 26.2 API & Addons
- 26.2 FAQ & Diagnostics
- 26.1.2 Hub
- 26.1.2 Mega-Stack Clumping
- 26.1.2 Smart Pickup System
- 26.1.2 Hopper Integration
- 26.1.2 Despawn Age Rules
- 26.1.2 Holographic Labels
- 26.1.2 GameRules Table
- 26.1.2 Commands & Admin
- 26.1.2 Advancements
- 26.1.2 Configuration
- 26.1.2 Architecture & Mixins
- 26.1.2 Developer Setup
- 26.1.2 API & Addons
- 26.1.2 FAQ & Diagnostics