Dangercarts: Dangerous Minecarts
如果一块铁以高速在轨道上飞驰并击中你,你自然预期会受到伤害;然而,你可以用身体阻挡矿车而不受任何影响。如果你启用了 Minecart Improvements 实验,这显得 尤其奇怪,因为在该实验中矿车可以跑得飞快。
使用此数据包后,矿车现在会根据其速度造成伤害和击退效果!如果你被矿车杀死,死亡信息会恰当地显示你是“被一辆快速矿车砸碎”。
所有能受到伤害的实体都会受到伤害和击退,这还有一个额外好处:它可以杀死或击落轨道上的生物,使你的矿车不会那么频繁地停下来。
它是如何工作的?
该数据包通过在矿车即将撞击实体时在其前方生成一个名为 "a fast minecart" 的隐形史莱姆来工作。然后根据矿车的速度应用伤害,就像我们最喜欢的隐形史莱姆 "a fast minecart" 使用战锤(Mace)攻击一样。
注意:此数据包在和平难度下无效。
配置
你可以使用以下命令为每个速度等级设置速度阈值(单位:方块/秒)和伤害值(单位:半颗心)。你可以将伤害设置为 40 以实现必杀。
| 设置项 |
命令 |
| set_low_threshold |
/function dangercarts:config/set_low_threshold {value: <newvalue>} |
| set_medium_threshold |
/function dangercarts:config/set_medium_threshold {value: <newvalue>} |
| set_high_threshold |
/function dangercarts:config/set_high_threshold {value: <newvalue>} |
| set_low_damage |
/function dangercarts:config/set_low_damage {value: <newvalue>} |
| set_medium_damage |
/function dangercarts:config/set_medium_damage {value: <newvalue>} |
| set_high_damage |
/function dangercarts:config/set_high_damage {value: <newvalue>} |
预设
你还可以使用以下命令将数值设置为某些预设:
默认
/function dangercarts:config/preset_default
| 设置项 |
高 |
中 |
低 |
| 阈值 |
6 |
4 |
2 |
| 伤害 |
7 |
4 |
2 |
改进型矿车实验,且 minecartMaxSpeed 设置为 22+
/function dangercarts:config/preset_improved_minecarts
| 设置项 |
高 |
中 |
低 |
| 阈值 |
21 |
15 |
10 |
| 伤害 |
40 |
12 |
6 |
重要说明
- 该数据包需要史莱姆能够生成。这意味着它 在和平难度下无效。
- 伤害是在史莱姆用于击退实体所造成的小额伤害之上叠加的。
- 似乎矿车的最大速度是每秒 47 个方块,即使你使用新的 Minecart Improvements 实验通过
gamerule minecartMaxSpeed 设置了更高的值。
卸载
要卸载该数据包,请运行以下命令:
/function dangercarts:uninstall
这将移除该数据包使用的所有记分板目标和数据存储。运行此命令后,你应该使用 /datapack disable 禁用或从 datapacks 文件夹中手动删除该数据包,然后再重启世界/服务器。
报告问题 / 贡献
请在 Github 页面 上报告问题和贡献项目。
致谢
此数据包是对 Deadly Minecarts 的改编,使其适用于 1.21.x 版本,并加入了一些改进。它还使用了由 NOPENAME 开发的平方根函数。
Dangercarts: Dangerous Minecarts
If a hunk of iron speeding down some tracks hits you, you'd expect some damage; however, you can stop minecarts going any speed with your body without any repercussions. This is especially weird if you enabled the Minecart Improvements experiment, in which Minecarts can go super fast.
With this data pack, minecarts now deal damage and knockback based on their speed! If you get killed by one, the death message will appropriately say that you got "smashed by a fast minecart".
Damage and knockback are dealt to all entities that can take it, which has an added bonus of killing or knocking off mobs from your rails, making your minecart not stop as often.
How does it work?
The data pack works by spawning an invisible slime named "a fast minecart" in front of the minecart when it should hit entities. Damage is then applied based on the speed of the Minecart as if it were a mace attack by our favourite invisible slime, a fast minecart.
Note: This datapack does not work in peaceful difficulty.
Configuration
You can set the speed threshold (in blocks per second) and damage values (in half hearts) for each speed using the following commands. You can set damage to 40 for a sure instant kill.
| Setting |
Command |
| set_low_threshold |
/function dangercarts:config/set_low_threshold {value: <newvalue>} |
| set_medium_threshold |
/function dangercarts:config/set_medium_threshold {value: <newvalue>} |
| set_high_threshold |
/function dangercarts:config/set_high_threshold {value: <newvalue>} |
| set_low_damage |
/function dangercarts:config/set_low_damage {value: <newvalue>} |
| set_medium_damage |
/function dangercarts:config/set_medium_damage {value: <newvalue>} |
| set_high_damage |
/function dangercarts:config/set_high_damage {value: <newvalue>} |
Presets
You can also use the following commands to set the values to some presets:
Default
/function dangercarts:config/preset_default
| Setting |
High |
Medium |
Low |
| threshold |
6 |
4 |
2 |
| damage |
7 |
4 |
2 |
Improved Minecarts Experiment with minecartMaxSpeed set to 22+
/function dangercarts:config/preset_improved_minecarts
| Setting |
High |
Medium |
Low |
| threshold |
21 |
15 |
10 |
| damage |
40 |
12 |
6 |
Important Notes
- The datapack needs slimes to be able to spawn. This means that it will not work in peaceful difficulty.
- Damage is applied on top of the small damage dealt by the slime used to knockback entities.
- It seems like the maximum speed of a minecart is 47 blocks per second, even if you set it higher using
gamerule minecartMaxSpeed using the new Minecart Improvements experiment.
Uninstalling
To uninstall the datapack, run the following command:
/function dangercarts:uninstall
This will remove all the scoreboard objectives and data storage used by the datapack. After running this command, you should disable or remove the datapack using /datapack disable or manually removing it from the datapacks folder before restarting the world/server.
Reporting an issue / Contributing
Please report issues and contribute to the project on the Github page.
Credits
This data pack is an adaptation of Deadly Minecarts to make it work with versions 1.21.x, and with a few improvements sprinkled in. It also uses a square root function developed by NOPENAME.
评论 0
登录后参与评分
还没有评论,来抢沙发吧