Count skipped checkpoints when jumping past them
This commit is contained in:
1 parent
249cd0c08a
commit
de3578eafe
1 file changed
+5
-3
@@ -145,9 +145,11 @@ public class JumpGenerator {
|
||||
this.player.showTitle(Title.title(Component.empty(), Component.text(this.combo, COMBO_COLOR)));
|
||||
}
|
||||
|
||||
if(isCheckpoint(index)) {
|
||||
this.checkpoint = this.step(index).pos();
|
||||
Progress.save(this.player.getUuid(), index);
|
||||
// auch ein übersprungener Checkpoint zählt: der letzte zwischen altem und neuem Stand
|
||||
int reachedCheckpoint = index / 10 * 10;
|
||||
if(reachedCheckpoint > previous) {
|
||||
this.checkpoint = this.step(reachedCheckpoint).pos();
|
||||
Progress.save(this.player.getUuid(), reachedCheckpoint);
|
||||
this.player.playSound(CHECKPOINT_SOUND);
|
||||
this.player.showTitle(CHECKPOINT_TITLE);
|
||||
this.player.sendPacket(new ParticlePacket(Particle.CRIT, this.checkpoint, this.checkpoint.add(0.5), 1.5f, 50));
|
||||
|
||||
Reference in new issue
Block a user