Class HealthUpdateS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.HealthUpdateS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class HealthUpdateS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Field Summary
Fields Modifier and Type Field Description private int
food
private float
health
private float
saturation
-
Constructor Summary
Constructors Constructor Description HealthUpdateS2CPacket()
HealthUpdateS2CPacket(float health, int food, float saturation)
-
Method Summary
Modifier and Type Method Description void
apply(ClientPlayPacketListener clientPlayPacketListener)
int
getFood()
float
getHealth()
float
getSaturation()
void
read(PacketByteBuf buf)
void
write(PacketByteBuf buf)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
health
private float health -
food
private int food -
saturation
private float saturation
-
-
Constructor Details
-
HealthUpdateS2CPacket
public HealthUpdateS2CPacket() -
HealthUpdateS2CPacket
public HealthUpdateS2CPacket(float health, int food, float saturation)
-
-
Method Details
-
read
- Specified by:
read
in interfacePacket<ClientPlayPacketListener>
- Throws:
IOException
-
write
- Specified by:
write
in interfacePacket<ClientPlayPacketListener>
- Throws:
IOException
-
apply
- Specified by:
apply
in interfacePacket<ClientPlayPacketListener>
-
getHealth
@Environment(CLIENT) public float getHealth() -
getFood
@Environment(CLIENT) public int getFood() -
getSaturation
@Environment(CLIENT) public float getSaturation()
-