fixed starting platform for elytra race
This commit is contained in:
parent
350cf108dd
commit
cfbb2688d2
@ -105,7 +105,7 @@ public class ElytraRace extends StatelessGame {
|
|||||||
@Override
|
@Override
|
||||||
protected void onLoad(@NotNull CompletableFuture<Void> callback) {
|
protected void onLoad(@NotNull CompletableFuture<Void> callback) {
|
||||||
Point spawnpoint = new Pos(vale.getXShiftAtZ(0), -46, 0);
|
Point spawnpoint = new Pos(vale.getXShiftAtZ(0), -46, 0);
|
||||||
GeneratorUtils.iterateArea(spawnpoint.sub(2, 0, 2), spawnpoint.add(2, 0, 2), point -> {
|
GeneratorUtils.iterateArea(spawnpoint.sub(5, 0, 5), spawnpoint.add(5, 0, 5), point -> {
|
||||||
setBlock(point, BlockPallet.STREET.rnd());
|
setBlock(point, BlockPallet.STREET.rnd());
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -130,6 +130,11 @@ public class ElytraRace extends StatelessGame {
|
|||||||
Player player = playerMoveEvent.getPlayer();
|
Player player = playerMoveEvent.getPlayer();
|
||||||
Point newPos = playerMoveEvent.getNewPosition();
|
Point newPos = playerMoveEvent.getNewPosition();
|
||||||
|
|
||||||
|
if(isBeforeBeginning && playerMoveEvent.getNewPosition().y() < getSpawn().y()) {
|
||||||
|
player.teleport(getSpawn());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
playerCheckpoints.putIfAbsent(player, new CheckPointData(ringSpacing, ringSpacing * 2));
|
playerCheckpoints.putIfAbsent(player, new CheckPointData(ringSpacing, ringSpacing * 2));
|
||||||
|
|
||||||
if(newPos.z() > generatedUntil - ringSpacing) {
|
if(newPos.z() > generatedUntil - ringSpacing) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user