Item Drain Potion Blacklist
「Ban without bounds, manage with order」
Youer can restrict the Item Drain from Create (mechanical power) so that banned potions cannot be emptied/cleared through it. This prevents using the Item Drain to duplicate or recycle specific potions.
Manage the blacklist with the /create_item_drain command, which works the same way as /bans (add | show).
Prerequisites
| Condition | Description |
|---|---|
| Create mod installed | Required. If not installed, the command is not registered and this feature is disabled |
| Permission node | youer.command.create_item_drain |
The command is named create_item_drain instead of create to avoid conflicting with Create mod's own create command.
Quick Start
Ban a potion in two steps:
Method 1: Ban directly by ID
Method 2: Place into GUI
Open your inventory, place the potion you want to ban, and close the GUI to save automatically.
View the current blacklist:
Right-click an entry in the GUI to remove it.
Commands
| Command | Description |
|---|---|
/create_item_drain potionban add | Open a GUI; place potions then close to add them to the blacklist (multiple potions at once, auto-dedup) |
/create_item_drain potionban add <potion ID> | Ban a potion directly by ID |
/create_item_drain potionban show | Open a GUI to view the blacklist; right-click an entry to remove it |
The command can only be executed by a player; the console cannot use it (same as
/bans).
Potion ID Format
Potion IDs use the registry-key format, for example:
| Potion | ID |
|---|---|
| Swiftness II (8:00) | minecraft:long_swiftness |
| Healing II | minecraft:strong_healing |
| Invisibility (3:00) | minecraft:invisibility |
After typing add, the ID argument supports Tab autocompletion, which lists all potions registered on the server, so you never have to memorize IDs.
Usage
Method 1: Place into GUI (recommended)
- Open an inventory GUI;
- Place the potion you want to ban (potion, splash potion, or lingering potion) into a slot;
- Close the GUI to save automatically; the chat shows how many were added this time.
Notes:
- Multiple different potions can be placed at once;
- Potions already on the blacklist are skipped automatically (no duplicates);
- Non-potion items are ignored.
Method 2: Add directly by ID
Common responses:
| Message | Meaning |
|---|---|
| Successfully banned potion: %s | Added to the blacklist |
| Invalid potion ID: %s | Wrong ID format (not namespace:path) |
| Potion %s does not exist | ID is valid but the server has no such potion |
| Potion %s is already banned | Already on the blacklist (duplicate) |
View and Remove
Open the GUI to view all currently banned potions (shown as their potion icons). Right-click an entry to remove it from the blacklist; the GUI refreshes automatically.
Config File
The blacklist is stored in youer-config/item-drain-potionban.yml:
- Changes take effect immediately, no server restart needed (command operations write to this file);
- Managing via commands is recommended to avoid formatting mistakes.
How It Works
The blacklist uses a Mixin to hook into Create's GenericItemEmptying.canItemBeEmptied:
- The check is based on the item's
potionregistry key, so potions, splash potions, and lingering potions all match the blacklist; - Banned potions cannot be emptied in the Item Drain (
canItemBeEmptiedreturnsfalse); - Other uses are unaffected: potions can still be drunk or thrown; only Item Drain emptying is restricted.
FAQ
I don't have the Create mod installed. Can I use this command?
No. The command is only registered when Create is detected; without it, the command appears not to exist.
After banning, can players still drink the potion?
Yes. The blacklist only restricts Item Drain emptying; drinking, throwing, and other normal uses are unaffected.
How do I find valid potion IDs?
Type /create_item_drain potionban add and press Tab; it lists all potions registered on the server.
Can the console run this command?
No, the command is players-only (it relies on a player-opened GUI).
Do I need to restart after editing the config file?
No, changes take effect immediately. But editing via the command is recommended to avoid formatting mistakes.