Merge pull request 'elytra race fix boost ring 1' (#8) from develop-jannis into develop

Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
2026-01-10 13:48:50 +00:00
2 changed files with 4 additions and 1 deletions

View File

@@ -133,7 +133,7 @@ public class ElytraRace extends StatelessGame {
return; return;
} }
this.playerCheckpoints.putIfAbsent(player, new CheckPointData(this.ringSpacing, this.ringSpacing * 2)); this.playerCheckpoints.putIfAbsent(player, new CheckPointData(0, this.ringSpacing));
if(newPos.z() > this.generatedUntil - this.ringSpacing) { if(newPos.z() > this.generatedUntil - this.ringSpacing) {
this.generateRing(this.generatedUntil + this.ringSpacing); this.generateRing(this.generatedUntil + this.ringSpacing);
@@ -224,7 +224,9 @@ public class ElytraRace extends StatelessGame {
} }
private void toCheckpoint(Player p) { private void toCheckpoint(Player p) {
CheckPointData data = this.playerCheckpoints.get(p);
Point checkpointPos = this.getRingPositionAtZ(this.playerCheckpoints.get(p).currentCheckpoint); Point checkpointPos = this.getRingPositionAtZ(this.playerCheckpoints.get(p).currentCheckpoint);
if(data.currentCheckpoint == 0) checkpointPos = this.getSpawn().add(0, 3, 0);
p.setVelocity(Vec.ZERO); p.setVelocity(Vec.ZERO);
p.setFlyingWithElytra(false); p.setFlyingWithElytra(false);
p.teleport(Pos.fromPoint(checkpointPos).add(0.5, 0, 0.5)); p.teleport(Pos.fromPoint(checkpointPos).add(0.5, 0, 0.5));

View File

@@ -122,6 +122,7 @@ public class Stickfight extends StatelessGame {
player.teleport(this.spawnPoints.get(player)); player.teleport(this.spawnPoints.get(player));
this.scoreMap.putIfAbsent(player, 0); this.scoreMap.putIfAbsent(player, 0);
this.scoreMap.put(player, this.scoreMap.get(player) + 1); this.scoreMap.put(player, this.scoreMap.get(player) + 1);
player.setLevel(this.scoreMap.get(player));
} }
} }