Modscraper Modscraper Minecraft
Icterine logo

Icterine

Mod

by mephodio

Advancements optimization (specifically, InventoryChangeTrigger)

Type

Mod

CurseForge Downloads

10,573,559

CurseForge ID

974774

Modrinth Downloads

3,849,538

Modrinth ID

7RvRWn6p

Last Updated

Sep 5, 2026

Description

## Summary * Optimizes triggering advancements for obtaining items; * Might break parity with vanilla, but doesn't affect vanilla advancements and shouldn't affect the vast majority of mods/datapacks; * Even if it does affect something, advancement still should be obtainable by just dropping and picking up one of required items; * Currently, there are no known incompatibilities or issues; * Every injection into vanilla code can be disabled in config file. * All changes are server-side. ## Results Live test performed on dedicated server with 3 active players online, running custom Forge modpack with over 200 mods and [BlazeandCave's Advancements Pack](https://modrinth.com/datapack/blazeandcaves-advancements-pack), which adds over 950 advancements. Stats collected using Spark for one hour. With Icterine, InventoryChangeTrigger executes almost **2.5 times faster** (as of version 1.1.0), spending about 7.5% of the tick time instead of 20%. Stats comparison for Icterine 1.0.0 (~2 times faster): ![Statistics](https://raw.githubusercontent.com/Mephodio/Icterine/3d54de4965100c172c9c5a75dce6520071d66f22/media/img_compare.png) ## How vanilla InventoryChangeTrigger works 1. When the game detects that stack in player inventory has changed, it calls InventoryChangeTrigger for it. This includes picking up items, dropping items, dropping whole stacks, moving items in your inventory. 1. Also, when you open a container (chest, furnace, etc.), game thinks that all the slots in your inventory changed, and calls trigger for all of them, including empty slots. 2. InventoryChangeTrigger counts empty, non-empty and completely filled slots in your inventory. This information [could be used in advancement triggers](https://minecraft.wiki/w/Advancement/JSON_format#minecraft:inventory_changed), but is not used in vanilla. 3. InventoryChangeTrigger goes over registered advancement criteria. 4. If criterion has slot count requirements and they don't match values from step 2, or if criterion doesn't have item requirements, criterion is skipped. 5. If criterion has only one item requirement, changed stack is checked against this requirement. 6. If criterion has multiple items requirements (e.g., "Cover me with debris" requires having full netherite armor set), **every** item stack in the inventory is checked against every requirement (but fulfilled requirements get removed and are no longer checked). 7. Item matching, especially against tag, is very heavy. But the game first checks if the player's item type matches the one from the requirement, and only then checks other parameters like count, enchants and other NBT data. ## How Icterine's optimizations work 1. In step 1, do not call InventoryChangeTrigger when you drop stacks or move them out of your inventory (e.g. to chest). This is controlled by the `ignore_triggers_for_emptied_stacks` parameter in config file. 2. Similarly, do not call InventoryChangeTrigger if stack change was caused by decreasing stack but not emptying it (e.g. player dropped single item from the full stack). Controlled by `ignore_triggers_for_decreased_stacks`. 3. And also do not call InventoryChangeTrigger if stack size increased, but hasn't passed threshold for any advancement. For example, dirt stack size increased from 52 to 53, but there's no advancement for getting 53 dirt in your modpack. Controlled by `optimize_triggers_for_increased_stacks`. 4. Modify how game checks for changed items when player opens container screen, so it doesn't treat all the stack as changed the second you open anything. Controlled by `initialize_inventory_last_slots`. 5. In step 6, firstly check if changed slot matches any requirement, and only then check other stack in the inventory. Controlled by `optimize_multiple_predicate_trigger`. 6. In step 7, compare the stack count first to avoid unneeded tag matching. Also use previous stack count to avoid even more unneeded matching. Controlled by `check_count_before_item_predicate_match`. Further optimizations are planned. ## Supported versions Icterine v1.2.0 works with Minecraft Fabric/Quilt from 1.18.2 to 1.19.4, and Forge from 1.18.2 to 1.19.2 *(forge moment)*. Icterine v1.3.0 has the same features as v1.2.0 and works with Fabric/Quilt 1.20 - 1.20.4, Forge 1.19.3 - 1.20.4, and NeoForge 1.20.1 - 1.20.4. Use filter on the [versions page](https://modrinth.com/mod/icterine/versions) to choose the right file. If you need port to any other version, please open an issue, or ask on [Discord](https://discord.gg/2SpfwvM7dm) server.

Compatibility

Mod Loaders

Fabric Forge Neoforge Quilt

Game Versions

1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 +1 more

Recommended Gear

Affiliate

Hardware and extras that pair well with this mod.

As an Amazon Associate I earn from qualifying purchases.

Screenshots

Similar Mods

Included in Modpacks (100)

Show fewer
DeceasedCraft - Urban Zombie Apocalypse DeceasedCraft - Urban Zombie Apocalypse Homestead - A Cozy Survival Experience Homestead - A Cozy Survival Experience Lucky World Invasion Lucky World Invasion Integrated MC Integrated MC Soulrend - Dark Fantasy RPG Soulslike Soulrend - Dark Fantasy RPG Soulslike Create+ [Old] Create+ [Old] Homestead Homestead Age of Fate Age of Fate SUPERIOR - RPG SUPERIOR - RPG Jurassic World Reborn II Jurassic World Reborn II Project Infinity 0.1 Project Infinity 0.1 Tensura Journey of Reincarnation Tensura Journey of Reincarnation Create: Delight Remake Create: Delight Remake A Distant Journey A Distant Journey Adventure Life - Legacy Adventure Life - Legacy Insomnia: Hardcore | Origins, Bosses, Skills Insomnia: Hardcore | Origins, Bosses, Skills Embeddium plus Embeddium plus TRACING LIGHT · DARK TIDE TRACING LIGHT · DARK TIDE FreshCraft Classic FreshCraft Classic Back to Back Back to Back Ender's Journey - Beyond The End Ender's Journey - Beyond The End Shadow Awakening Shadow Awakening Forget Me Not Forget Me Not FreshCraft SteamPunk Industry DLC FreshCraft SteamPunk Industry DLC Mystic's Monstrosity - Greedy Edition Mystic's Monstrosity - Greedy Edition AtlanAbyss AtlanAbyss Apocalypse Begins [Zombie Apocalypse] Apocalypse Begins [Zombie Apocalypse] Civilization-L Civilization-L UMA New World UMA New World All The Mario All The Mario Modpack Essentials Modpack Essentials FreshCraft Fantasy DLC FreshCraft Fantasy DLC Craftformers Official Server Modpack Craftformers Official Server Modpack Comes Alive & The Autumn Days Comes Alive & The Autumn Days Zelda TOTK Zelda TOTK MekaMiners Brasil MekaMiners Brasil Penumbralcraft Penumbralcraft Minenufactory Minenufactory The Last Day Shines The Last Day Shines Refined Pack 2 Refined Pack 2 TerraFirmaCraft:Leap The Top TerraFirmaCraft:Leap The Top Calvin's wonderland.jar Calvin's wonderland.jar Farms N' Furniture Farms N' Furniture Permadeath+ Permadeath+ Project X (Palladium) Project X (Palladium) Flourish & Flutter: A Nature’s Journey Flourish & Flutter: A Nature’s Journey Christmas Dreams Christmas Dreams Better fps than vanilla and optifine Infinity Pack 1 Infinity Pack 1 Asai Integrated Modpack Asai Integrated Modpack SwordCraft Origins SwordCraft Origins Integrated MineColonies Integrated MineColonies Aruori Aruori Nomurras Terror Nomurras Terror Absolute Realism Absolute Realism NovaMTR Modpack NovaMTR Modpack KRILLKRAFT KRILLKRAFT True: Calamity True: Calamity Pixverse Pixverse Jujustsu Monky Modulo Jujustsu Monky Modulo ReCraft S8 Project infinity 0.1 ReCraft S8 Project infinity 0.1 Horyzen Horyzen Dragonlands Dragonlands theboysvanilla+ theboysvanilla+ Create: Physics and Roads Create: Physics and Roads The Last Krafter The Last Krafter Farlands - Origins Of The Olimpus Farlands - Origins Of The Olimpus Eldion Eldion Late Long Nights Late Long Nights Mystic's Monstrosity - Avaricious Edition Mystic's Monstrosity - Avaricious Edition Figuratives 2 Figuratives 2 SharkSquad Modpacks SharkSquad Modpacks Optix - Boost FPS, Smooth, Performance Optix - Boost FPS, Smooth, Performance Lucky World Invasion (Updates & Tweaks) Lucky World Invasion (Updates & Tweaks) RPG Strimios RPG Strimios Berezka's SCP Berezka's SCP Create: Astral Tinkerer Create: Astral Tinkerer Tardis And Stuff (TAF) Tardis And Stuff (TAF) DeadZone Brasil - DeceasedCraft DeadZone Brasil - DeceasedCraft Requiem Black Dawn Requiem Black Dawn Arctic Winter Arctic Winter Aeternis Aeternis GregTech Mechanical Era GregTech Mechanical Era Winter Leveling Winter Leveling GreenBound GreenBound Create: Punk'd Create: Punk'd Worlds Unbound Worlds Unbound Create - Technomancy Create - Technomancy Daldon's Immersive Survival Daldon's Immersive Survival Human a Realistic Survival Experience Human a Realistic Survival Experience Tech and Guns: Zombie warfare Tech and Guns: Zombie warfare Wild Odyssey Wild Odyssey Steel ball craft Roundabout The JoJo s Steel ball craft Roundabout The JoJo s Recraft S7 Deceased Craft Recraft S7 Deceased Craft Ducky's Fantasy Ducky's Fantasy Create in Wars Create in Wars Tuchebander Adventures Tuchebander Adventures REforged 2.0 II REforged 2.0 II Fabulously Fossils & Archeology Fabulously Fossils & Archeology OptiMizaPion OptiMizaPion

External Resources