Show the current stage in the action bar instead of a title
This commit is contained in:
1 parent
b1950dd664
commit
8ba25758be
1 file changed
+6
-2
@@ -70,10 +70,14 @@ public class JumpGenerator {
|
|||||||
this.player.sendPacket(new ParticlePacket(Particle.CRIT, current, current.add(0.5), 1.5f, 50));
|
this.player.sendPacket(new ParticlePacket(Particle.CRIT, current, current.add(0.5), 1.5f, 50));
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockPalette.Stage reachedStage = BlockPalette.stageStartingAt(this.blocks.size()-this.preview-1);
|
// Abschnitt dauerhaft in der Actionbar (Titel werden von der Combo-Anzeige überschrieben)
|
||||||
|
int standingIndex = Math.max(0, this.blocks.size()-this.preview-1);
|
||||||
|
BlockPalette.Stage reachedStage = BlockPalette.stageStartingAt(standingIndex);
|
||||||
if(reachedStage != null && reachedStage.from() > 0) {
|
if(reachedStage != null && reachedStage.from() > 0) {
|
||||||
this.player.playSound(Sound.sound(SoundEvent.UI_TOAST_CHALLENGE_COMPLETE, Sound.Source.MASTER, 0.4f, 1f));
|
this.player.playSound(Sound.sound(SoundEvent.UI_TOAST_CHALLENGE_COMPLETE, Sound.Source.MASTER, 0.4f, 1f));
|
||||||
this.player.showTitle(Title.title(Component.text(reachedStage.name(), TextColor.color(255, 170, 0)), Component.text("")));
|
this.player.sendActionBar(Component.text(reachedStage.name(), TextColor.color(255, 170, 0)));
|
||||||
|
} else {
|
||||||
|
this.player.sendActionBar(Component.text(BlockPalette.stageAt(standingIndex).name(), TextColor.color(170, 170, 170)));
|
||||||
}
|
}
|
||||||
this.blocks.add(target);
|
this.blocks.add(target);
|
||||||
this.combo++;
|
this.combo++;
|
||||||
|
|||||||
Reference in new issue
Block a user