Soul Bound

Mod: Ender IO
Git Hash: a8197e002
Registry Name: enderio.soulBound
Enchantment Type: all (can be applied to any item)
Max Level: 1


Description

Prevents items from being dropped on player death. When a player dies with a Soul Bound item, the item is saved directly to their inventory instead of appearing in the death drop. If the player’s inventory would overflow, remaining Soul Bound items are dropped normally.

Effect

When the player dies:

  1. Soul Bound items are intercepted before other mods can move them to gravestones or other grave systems.
  2. Items are added back to the player’s inventory.
  3. If the inventory is full, overflowing Soul Bound items are dropped as normal.

When the player respawns, their original inventory (including Soul Bound items) is restored.

Configuration

Setting Default Description
enchantmentSoulBoundEnabled true Whether the enchantment is registered
enchantmentSoulBoundId -1 (auto) Numeric enchantment ID; -1 uses the lowest unassigned ID
enchantmentSoulBoundWeight 1 Chance of appearing in enchantment table

All settings are under the enchantments section in EnderIO.cfg.

Technical Details

  • Listens to PlayerDropsEvent at HIGHEST priority to intercept items before other mods process them.
  • Listens to PlayerEvent.Clone to restore Soul Bound items on respawn.
  • Registered on the Forge event bus via MinecraftForge.EVENT_BUS.
  • Implements IAdvancedEnchant for tooltip support.

Source File

EnchantmentSoulBound.java — crazypants/enderio/enchantment/