根据体型差异添加生物碰撞伤害。
更新:
- 玩家首次生成时将拥有随机体型。
- 提供可选开关,用于启用或禁用碰撞逻辑和随机体型功能。默认情况下两者均处于开启状态。
- 可在配置文件中自定义每个随机选择的体型大小。
Forge 1.20.1 和 NeoForge 1.21.1 版本将继续获得支持。
在我有空时它们会继续更新,并且两个版本的功能应基本保持一致。
碰撞逻辑的工作原理:
剧透
-
首先检查较大的生物是否正在向较小的生物移动。
-
然后计算两个发生碰撞的生物之间的体型比例差异。
-
接着检查较大生物的体型是否至少是较小生物的 4 倍。
-
然后检查较大生物的体型是否小于较小生物的 100 倍。
-
随后在体型差异中加入随机波动值。
-
加入波动值后,检查较大生物当前是处于行走、疾跑、潜行还是下落状态,并根据不同状态应用相应的乘数。
-
最后,在将体型差异转化为对较小生物的伤害之前,检查配置是否允许较小生物因此死亡。
你可以将此模组放入任何你喜欢的整合包(modpack)或你自己的模组项目中,只需确保人们能够找到我的名字或该模组的页面即可。你不得修改我的代码并声称这是你自己的作品;这意味着你可以私下编辑和使用它,但未经我许可不得擅自上传发布。
Adds mob collision damage based on size differences.
Update:
- Players are now given a random size on first spawn.
- Optional toggle to turn on and off both the collision logic and random size. Both are on by default.
- Can coustomize each randomly picked size in config file.
Both Forge 1.20.1 and NeoForge 1.21.1 wwill keep being supported.
They'll keep being updated when I feel like It and should be pretty much identical.
How the collision logic works:
Spoiler
-
First it checks if the bigger mob is moving into the smaller mob.
-
Then it finds the scale difference between the two coliding mobs.
-
Then it checks if the bigger one is at least 4x the scale.
-
Then it checks if the bigger mob is less than 100x the scale.
-
Then it adds random variance to the difference.
-
After adding varience it checks if the bigger mob was either walking, sprinting, crouching, or falling, adding different multipliers off that.
-
Finally it checks if config allows the smaller mob to die before applying the difference as damage to the smaller mob.
You may put my mod in whatever you want, whether it's a modpack, or your own mod, just make sure people are able to either find my name or the mod page. You can not edit my code and upload it as your own, this means you can edit, and use it privately, just dont upload it without my permission.
评论 0
登录后参与评分
还没有评论,来抢沙发吧