Kompatibilität & Mod-Integrationen (MC 26.2)
Dieses Dokument beschreibt Drittanbieter-Mod-Integrationen, dynamische Reflexionsprüfungen, Stack Size Adjuster-Abgleich und Farm-Kompatibilität in Item Clumps für Minecraft 26.2.
📊 Feature-Infobox
| Integration | Typ | Kompatibilitätsstatus | Verarbeitungsmechanismus |
|---|---|---|---|
| Magnet ("Let me get that!") | Optional | 🟢 100 % Nahtlos | Dynamische Reflexionsprüfung (ig_magnet$isMagnetized / ig$isMagnetized) |
| Stack Size Adjuster | Optional | 🟢 Dynamischer Sync | Überlässt max_clump_size-Registrierung getMaxStackSize() |
| YetAnotherConfigLib (YACL v3) | Optionale GUI | 🟢 Unterstützt | Verzögertes Klassenladen über GuiHelper.getOptionalYaclFactory |
| ModMenu | Optionale GUI | 🟢 Unterstützt | ModMenu-Einstiegspunkt-Integration |
| Vanilla-Automation / Redstone | Kern | 🟢 100 % Parität | Einzelitem-Trichter-Extraktion & Vererbung des jüngsten Alters |
🧲 1. Flugschutz für Magnet-Mods
Bei Verwendung von Magnet-Mods (wie Magnet: Let me get that!) heben Items vom Boden ab und fliegen in 3D-Trajektorien auf den Spieler zu.
┌───────────────────────────────────────────────────────────┐
│ Item In-Flight Magnet Trajectory │
│ │
│ [Item A (In-Flight)] --------> [Player] │
│ │ │
│ (Passes close to Item B on ground) │
│ │ │
│ ❌ WITHOUT MAGNET CHECK: │
│ Item A merges with B; flight velocity resets; │
│ Item snaps to ground. │
│ │
│ ✅ WITH ITEM CLUMPS MAGNET CHECK: │
│ Merge paused while in-flight; │
│ Smooth curve preserved straight to player! │
└───────────────────────────────────────────────────────────┘Item Clumps fragt den Magnet-Zustand per Reflexion ab, ohne feste Kompilierzeit-Abhängigkeiten:
java
if (net.fabricmc.loader.api.FabricLoader.getInstance().isModLoaded("magnet")) {
try {
java.lang.reflect.Method isMagnetizedMethod;
try {
isMagnetizedMethod = this.getClass().getMethod("ig_magnet$isMagnetized");
} catch (NoSuchMethodException e) {
isMagnetizedMethod = this.getClass().getMethod("ig$isMagnetized");
}
if ((boolean) isMagnetizedMethod.invoke(this) || (boolean) isMagnetizedMethod.invoke(other)) {
ci.cancel();
return;
}
} catch (Throwable ignored) {}
}📦 2. Dynamischer Abgleich mit Stack Size Adjuster
Wenn Stack Size Adjuster zusammen mit Item Clumps installiert ist:
- GameRule-Deduplizierung: Item Clumps unterdrückt automatisch die Registrierung von
item_clumps:max_clump_sizeund das zugehörige YACL-Widget. - Einheitliche Limitsynchronisation: Grenzwerte für das Verschmelzen am Boden fragen
itemStack.getMaxStackSize()ab, sodass Stack Size Adjuster Limits global oder pro Item bestimmen kann.
java
int maxClump;
if (net.fabricmc.loader.api.FabricLoader.getInstance().isModLoaded("stack-size-adjuster") ||
ItemClumpsFabric.MAX_CLUMP_SIZE == null) {
maxClump = thisStack.getMaxStackSize();
} else {
maxClump = DynamicGameRuleManager.getInt(this.level(), ItemClumpsFabric.MAX_CLUMP_SIZE);
}