跳到正文
烈焰甘蔗Wiki

Soul Bound

Mod: Ender IO
Git Hash: a8197e002
Registry Name: enderio.soulBound(EnchantmentSoulBound.java:41) Enchantment ID: 由 Enchantments.java:23-34 取 Config.enchantmentSoulBoundId,默认 -1 = 自动取 Enchantment.enchantmentsList 中第一个空位
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
附魔可施加类型 EnumEnchantmentType.all(任意物品,EnchantmentSoulBound.java:40) EnchantmentSoulBound.java:40
getMaxEnchantability 原版值 +30(EnchantmentSoulBound.java:44-47) EnchantmentSoulBound.java:44-47

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/

浏览全部模组