Skip to content

Commit

Permalink
Only send the ServerboundClientTickEndPacket while in the GAME protoc…
Browse files Browse the repository at this point in the history
…ol state, make locale non-null

Fixes #5278
  • Loading branch information
onebeastchris committed Jan 15, 2025
1 parent 58e2f17 commit 07629a4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ protected void tick() {

this.bundleCache.tick();

if (spawned) {
if (spawned && protocol.getOutboundState() == ProtocolState.GAME) {
// Could move this to the PlayerAuthInput translator, in the event the player lags
// but this will work once we implement matching Java custom tick cycles
sendDownstreamGamePacket(ServerboundClientTickEndPacket.INSTANCE);
Expand Down Expand Up @@ -1400,7 +1400,7 @@ public GeyserSession connection() {

@Override
public String locale() {
return clientData.getLanguageCode();
return clientData != null ? clientData.getLanguageCode() : GeyserLocale.getDefaultLocale();
}

@Override
Expand Down

0 comments on commit 07629a4

Please # to comment.