Rework Root Target.

This commit completely reworks the Root Target ability implementation by
replacing the repeated teleportation code with potion effects.

The old implementation relied on teleporting the target every tick for a
given duration, but because teleporting also involves pitch and yaw, the
result was a constant "snapping back in place" experience.

The new implementation works by applying the following potion effects
with a very large amplification:

- Slowness, to prevent the player from moving out of place.
- Slow falling, to negate fall damage.
- Negative jump boost, to prevent the player from jumping around.

Note that the jump boost uses a _negative_ amplification to make it have
the inverse effect, i.e. a much worse jump ability. It is still possible
to jump an arguably negligible amount away from the root location.

Fixes #490
This commit is contained in:
Nesseley
2020-05-04 07:57:43 +02:00
committed by Andreas Troelsen
parent e8cce8e620
commit 7e37d93a0e
2 changed files with 10 additions and 54 deletions
+1
View File
@@ -15,6 +15,7 @@ These changes will (most likely) be included in the next version.
- Arena signs now support dynamic list entry variables for 4 different player lists. As an example, `<notready-1>` results in the name of a player in the lobby who hasn't readied up yet. This is useful for visualizing who is holding up the lobby. Check the wiki for details.
- Elytra are now supported chest pieces in class chests.
- Boss names now support color codes.
- The Root Target ability now uses potion effects (slowness, slow falling, and negative jump boost) instead of repeated teleports. This should make for a smoother root experience.
- Config-files with missing `pet-items` nodes no longer errors. A missing `pet-items` node in `global-settings` is treated as empty, i.e. no pet items will be registered.
## [0.104.2] - 2020-01-03