your current location:首页 > news>[CD] CollisionDamage) Minecraft

[CD] CollisionDamage) Minecraft

2024-12-15 01:07:42|Myriagame |source:minecraft skins

Brief introduction

The collision damage module is added with a new potion effect: collision damage, which allows the entity to cause damage and horizontal knocking on the collision object when moving at high speed, which is convenient for integrated packages or Addon authors.

Pot instructions:/Effect @S CollISINAMAGE: COLLISION_DAMAGE Time Level

Main characteristic

When the speed is greater than 10m/s, the collision of other entities can cause a positive proportional damage to it.Damage value = speed*potion level*0.1;

Speed ​​display: When the player has a collision damage effect, the player's real -time vector speed will be displayed on the upper right of the item bar;

Minecraft images

Working principle

When the entity has a collision damage effect, bring the changes in the X, Y, and Z coordinates of each tick into the formula of the Eujiri.The distance, remove the average speed in this tick at a tick time (default 0.02 seconds)

While calculating the speed, every TICK detection once with the entity with a collision damage effect of less than 1, when other entities are detected and their own speed is greater than 10m/s, it causes speed of the entity*Potal level*0.1 damage

Minecraft images

Minecraft images

Minecraft images

In addition to other statements, MCMOD.CN, all open public editing content uses the BY-NC-SA 3.0 protocol.