mirror of
https://github.com/tanyaofei/minecraft-fakeplayer.git
synced 2025-07-13 12:52:23 +08:00
Reset food level on spawning
This commit is contained in:
parent
b472fe2938
commit
b1a75c5fe2
@ -168,6 +168,7 @@ public class Fakeplayer {
|
||||
this.player.setHealth(Optional.ofNullable(this.player.getAttribute(Attribute.GENERIC_MAX_HEALTH))
|
||||
.map(AttributeInstance::getValue)
|
||||
.orElse(20D)); // 恢复生命值
|
||||
this.player.setFoodLevel(20);
|
||||
this.setupName();
|
||||
this.handle.setupClientOptions(); // 处理皮肤设置问题
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user