Community listing page, reviews here may not be monitored by the author.
Open And Close Non Player Inventories
No reviews yet
you can now detect opening and closing inventories with this datapack!
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
Inventory Detection: The "Impossible" Datapack For years, the Minecraft technical community has searched for a reliable way to detect when a player opens or closes their inventory. Many said it was impossible.
This datapack introduces a revolutionary logic system that detects inventory states in real-time, allowing you to trigger commands the exact moment a player interacts with a chest, lectern, or even a beacon!
How It Works (The "Bug" Feature)This pack utilizes a unique behavior within Minecraft's advancement system. The "inventory_changed" advancement trigger is highly reliable—except for one specific quirk: it stops triggering while a player is inside a non-player inventory.
The Logic:Every single game tick (1/20th of a second), the pack briefly swaps the player’s head slot with a custom item and back again.This forced change attempts to fire an advancement, scoreboard tracks these fires.
If the advancement stops firing for even one tick, the system knows the player is currently viewing an inventory. The moment the advancement fires again, the system knows the inventory has been closed.
High Performance: Optimized to run every tick with minimal impact on MSPT (usually 0.1-0.2).
Multiplayer Compatible: Tested and verified to work with multiple players on a server simultaneously.
Developer Friendly: All functions and variables are prefixed with Cailem to prevent conflicts with your existing projects.
In Creative mode, the inventory triggers the advancement twice due to unique engine behavior. The pack can actually be used to detect if a player is specifically in the Creative menu!
Examples that are now possible: Loot Chests: Spawns a chest while mining that automatically cleans itself up the moment you close it. Lectern Traps: Triggers world events (like spawning a Warden) the second a player stops reading. Survival Flight: A flight mode that protects the player but force-closes the inventory to prevent "cheating" items.
BROKEN: While the audio is suppressed, Minecraft’s subtitles may still show Gear equips. Note that the rapid item swapping can trigger Skulk Sensors/Wardens. (This can be disabled via version-specific tags if needed).
Note: This is a technical resource intended for datapack creators and map makers. Knowledge of how to install and reference functions is recommended.
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources