Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
GeyserSession: always send naturalRegeneration=false gamerule (#1097)
This essentially gives the server full control over the health visual.
Dieser Commit ist enthalten in:
Ursprung
7df476183a
Commit
0fde30fc78
@ -249,6 +249,12 @@ public class GeyserSession implements CommandSender {
|
|||||||
attributes.add(new AttributeData("minecraft:movement", 0.0f, 1024f, 0.1f, 0.1f));
|
attributes.add(new AttributeData("minecraft:movement", 0.0f, 1024f, 0.1f, 0.1f));
|
||||||
attributesPacket.setAttributes(attributes);
|
attributesPacket.setAttributes(attributes);
|
||||||
upstream.sendPacket(attributesPacket);
|
upstream.sendPacket(attributesPacket);
|
||||||
|
|
||||||
|
// Only allow the server to send health information
|
||||||
|
// Setting this to false allows natural regeneration to work false but doesn't break it being true
|
||||||
|
GameRulesChangedPacket gamerulePacket = new GameRulesChangedPacket();
|
||||||
|
gamerulePacket.getGameRules().add(new GameRuleData<>("naturalregeneration", false));
|
||||||
|
upstream.sendPacket(gamerulePacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void login() {
|
public void login() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren