3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 08:30:12 +01:00

Ensure spawn radius is always 0 on the client's end

Fixes #1496 to the best of my knowledge. Any issue regarding the spawnpoint being off in terms of radius is up to the server at this point - would not be an us situation here.
Dieser Commit ist enthalten in:
RednedEpic 2020-12-12 01:22:57 -06:00
Ursprung 50662bc65c
Commit 31209be79e

Datei anzeigen

@ -385,6 +385,8 @@ public class GeyserSession implements CommandSender {
// Don't let the client modify the inventory on death // Don't let the client modify the inventory on death
// Setting this to true allows keep inventory to work if enabled but doesn't break functionality being false // Setting this to true allows keep inventory to work if enabled but doesn't break functionality being false
gamerulePacket.getGameRules().add(new GameRuleData<>("keepinventory", true)); gamerulePacket.getGameRules().add(new GameRuleData<>("keepinventory", true));
// Ensure client doesn't try and do anything funky; the server handles this for us
gamerulePacket.getGameRules().add(new GameRuleData<>("spawnradius", 0));
upstream.sendPacket(gamerulePacket); upstream.sendPacket(gamerulePacket);
} }