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.
This commit is contained in:
RednedEpic 2020-12-12 01:22:57 -06:00
parent 50662bc65c
commit 31209be79e

View file

@ -385,6 +385,8 @@ public class GeyserSession implements CommandSender {
// 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
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);
}