✨ Spellbind
将法术绑定到你正在使用的物品上。
Spellbind 的功能
Spellbind 是一款 Minecraft 的辅助模组(tweak util mod)。
它允许你通过以下步骤创建自定义“法术”:
1️⃣ 创建一个包含 spellbind_spells 文件夹的数据包。所有法术都将以 JSON 格式编写并存放于此。
2️⃣ 指定一个物品 ID。该物品应当是“可交互使用”的:即你可以按住鼠标右键来使用它。例如食物或弓。
这里我们将使用 minecraft:apple。
3️⃣ 指定法术的攻击距离:法术能触及的最远距离(以方块为单位)。
它可以是一个浮点数,例如 10.0。
4️⃣ 指定一个生物实体 ID,例如 minecraft:pig,或者使用 #i_dont_care# 让法术对所有类型的生物生效。
5️⃣ 指定其他一些条件。目前 Spellbind 提供了 NBT 条件选项,让你的法术仅对具有特定 NBT 标签的生物生效。
如果你不需要此功能,在此处填入 #i_dont_care#。
6️⃣ 设置一系列动作。目前有 4 种可用的动作类型:
a. 应用药水效果,
b. 执行命令,
c. 修改属性,
d. 操作 NBT 数据。
7️⃣ 执行原版 /reload 命令。
此后,当你吃完一个苹果时,如果你注视着某个生物,且该生物当前处于法术范围内,
并且满足其他条件——即实体 ID 和 NBT 标签,那么步骤中指定的那些动作就会应用于该生物。
Spellbind 维基正在建设中!
借助 Spellbind,万物皆可化为魔法咒语。
发挥你的想象力,创造你所梦想的任何种类的魔法道具吧!
Spellbind 模组内置了示例数据包。其中包含两个法术,默认启用。
它们分别是:
- 消耗一个苹果,如果你正注视着一只猪,且它距离你不超过 10 个方块,并具有 "NoAI" NBT 标签,
你将赋予它速度 II 药水效果,持续 100 秒;向所有在线玩家发送标题提示;给它装备马鞍;将其最大生命值设置为 200;并将其传送至 x=~0, y=~8, z=~0(相对坐标)。
- 消耗一颗甜浆果,如果你正注视着某个生物或玩家,且它距离你不超过 3 个方块,无论其种类为何以及是否具有任何 NBT 标签,
你将为其额外增加 200 点最大生命值,然后将其生命值重置为 100 点,最后将其传送至 x=~0, y=~20, z=~0(相对坐标)。
如果你不需要这些功能,只需禁用 Spellbind 的数据包即可。
当前功能特性
? 条件系统
? 动作类型 1:应用药水效果
? 动作类型 2:执行命令
? 动作类型 3:修改属性
? 动作类型 4:操作 NBT 数据
未来计划
更多动作类型
更复杂的条件
支持 ZenScript 或 KubeJS
本项目是基于 MIT 许可证的开源项目。
✨ Spellbind
Bind spells to items you are using.
What Spellbind does
Spellbind is a Minecraft tweak util mod.
It allows you to make custom "spells" by following the steps below:
1️⃣ Make a datapack that contains a spellbind_spells folder in it. All spells will be written in JSON format and be put here.
2️⃣ Specify an item ID. This item should be "usable": You are able to hold your right mouse button to use it. Foods or Bows for example.
Here we will use minecraft:apple.
3️⃣ Specify your spell's attacking distance: how far (in blocks) can your spell reach.
It can be a float number, 10.0 for example.
4️⃣ Specify a mob entity ID, minecraft:pig for example, or use #i_dont_care# to let your spell to be effective to all types of mobs.
5️⃣ Specify some other criteria. Now Spellbind provides NBT criterion, let your spell only to be effective to those mobs which has the specific NBT tag.
If you do not need this, put #i_dont_care# here.
6️⃣ Set a series of actions. Presently 4 types of actions are available:
a. applying potion effects,
b. executing commands,
c. modifying attributes,
d. manipulating NBT data.
7️⃣ Execute vanilla /reload command.
After that, when you finish eating an apple, if you are looking at a mob, and it is within the range of a spell at the moment,
and it meets other criteria - now they are entity ID and NBT tag, then you will see those actions specified in Step 4 applied to that mob.
Spellbind wiki is under building!
With Spellbind, everything can be turned into a magic spell.
Use your imagination to create every kinds of magic prop you have dreamed about!
Spellbind mod has its example datapack in it. It contains two spells and is enabled by default.
They are:
- Consume an apple, if you are looking at a pig at the moment, and it's no more than 10 blocks away from you, with "NoAI" NBT tag,
you will give it Speed II potion effect for 100 seconds, send a title to all online players, give it a saddle, set it's max health to 200, and teleport it to x=~0, y=~8, z=~0 (Relative coordinates).
- Consume a sweet berry, if you are looking at a mob or player, and it's no more than 3 blocks away from you, regardless of what kind of mob it is and what NBT tag it has,
you will give it addtional 200 points of max health, then set its health to 100 point, and finally teleport it to x=~0, y=~20, z=~0 (Relative coordinates).
If you do not need them, simply disable Spellbind's datapack.
What can Spellbind do now
? Criteria system
? Action type 1: Applying potion effects
? Action type 2: Executing commands
? Action type 3: Modifying attributes
? Action type 4: Manipulating NBT data.
Future Plans
More action types
More complex criteria
ZenScript or KubeJS support
This project is an open-source project under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧