Adds obstacle blocks for parkour

This change reverts the advanced hit-box detection for kill plane blocks, giving them a full block's hit-box again.
Instead, obstacle blocks have been added, which have an accurate hit-box, and can trigger a hit from any direction.
The horizontal kill plane hit box option has been removed as it's no longer useful.
This commit is contained in:
2023-10-02 23:05:39 +02:00
parent fc6bd33e87
commit 310802b42d
10 changed files with 216 additions and 80 deletions

View File

@ -64,10 +64,12 @@ public enum ParkourArenaEditableProperty {
EditablePropertyType.MATERIAL_LIST),
/**
* The horizontal hit-box of kill blocks
* The blocks used as this arena's obstacle blocks
*/
HORIZONTAL_KILL_PLANE_HIT_BOX("horizontalKillPlaneHitBox",
(arena) -> String.valueOf(arena.getHorizontalKillPlaneHitBox()), EditablePropertyType.DOUBLE);
OBSTACLE_BLOCKS("obstacleBlocks", (arena) -> String.valueOf(arena.getObstacleBlockNames()),
EditablePropertyType.MATERIAL_LIST),
;
private final @NotNull String argumentString;
private final Function<ParkourArena, String> currentValueProvider;