Skip to content

Commit

Permalink
Add Spectator mode ability layer (#3770)
Browse files Browse the repository at this point in the history
Fixes #3769
  • Loading branch information
patyhank authored May 13, 2023
1 parent 2b56927 commit ea136b2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1739,7 +1739,12 @@ public void sendAdventureSettings() {
abilities.add(Ability.NO_CLIP);
}

abilityLayer.setLayerType(AbilityLayer.Type.BASE);
// https://github.com/GeyserMC/Geyser/issues/3769 Setting Spectator mode ability layer
if (spectator) {
abilityLayer.setLayerType(AbilityLayer.Type.SPECTATOR);
} else {
abilityLayer.setLayerType(AbilityLayer.Type.BASE);
}
abilityLayer.setFlySpeed(flySpeed);
// https://github.com/GeyserMC/Geyser/issues/3139 as of 1.19.10
abilityLayer.setWalkSpeed(walkSpeed == 0f ? 0.01f : walkSpeed);
Expand Down

0 comments on commit ea136b2

Please sign in to comment.