Enchantment Splitting 图标

Enchantment Splitting

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/enchantment-splitting
资源信息

Minecraft 版本: 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11

平台: datapack

标签: equipment magic utility

资源介绍

Enchantment Splitting

Hit your enchanted items with a mace to move/split their enchantments!

How to use (in-game)

  1. Drop an enchanted item and an unenchanted item onto an enchanting table
  2. Hit the items with a mace
  3. That's it! The enchantments will be evenly distributed across both items.

How it works

An interaction entity is spawned whenever an enchanted and unenchanted item are on top of an enchanting table at the same time. The instant it is hit, the game checks to see if a nearby player is holding a mace, and if so, it begins the enchantment splitting process.

  • The originally enchanted item will be referred to as item 0.
  • The originally unenchanted item will be referred to as item 1.

Enchantment Splitting Process

  1. Identify each item as item 0 and item 1, and tag them accordingly. This is to simplify identifying them in future commands.
  2. Summon an armor stand and clone item 0 to its mainhand. This armor stand is used as an enchantment list, and will be destroyed as soon as the splitting process is over.
  3. Remove all enchantments from item 0.
  4. Initiate a scoreboard toggle that decides which item receives the next enchantment. This always begins with item 1.
  5. Begin distributing.
  6. After distribution is complete, kill the armor stand and interaction entity, and remove tags from the items involved.

Distribution

  • A registry has been made containing all vanilla enchantments.
  • For each enchantment in the registry, a function is run storing its value as a score on the armor stand. If the score is greater than 0, the enchantment is present on the enchantment list.
  • If an enchantment is present, a function is run to copy the enchantment's value to the item, remove it from the enchantment list, and toggle which item gets the next enchantment.
  • Once all enchantments in the registry have been checked, all remaining enchantments on the enchantment list are merged to item 1.

All of this happens within a single game tick.

Quick Answers

What happens if I "split" an item with only one enchantment?
The enchantment is moved from item 0 to item 1.

Can I split enchantments across different items (e.g. splitting multiple sword enchantments across a Diamond Sword and Netherite Sword)?
Yes.

Can I split enchantments onto items that can't have certain enchantments (e.g. splitting Infinity onto a Crossbow)?
Yes.

Can I split enchantments onto items that can't normally be enchanted (e.g. splitting Knockback onto a Stick)?
Yes.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
AllCherry

价格:0 墨喵币
下载量:0

查看详情
GoldFarmFix DataPack

价格:0 墨喵币
下载量:0

查看详情
Smart Armor Repair

价格:0 墨喵币
下载量:0

查看详情
MystiasIzakaya

价格:0 墨喵币
下载量:0

查看详情