Class ClientboundSetHealthPacket
java.lang.Object
net.minecraft.network.protocol.game.ClientboundSetHealthPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final floatprivate final floatstatic final StreamCodec<FriendlyByteBuf, ClientboundSetHealthPacket> -
Constructor Summary
ConstructorsModifierConstructorDescriptionClientboundSetHealthPacket(float pHealth, int pFood, float pSaturation) private -
Method Summary
Modifier and TypeMethodDescriptionintgetFood()floatfloatvoidhandle(ClientGamePacketListener pHandler) Passes this Packet on to the NetHandler for processing.type()private voidwrite(FriendlyByteBuf pBuffer) Writes the raw packet data to the data stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
STREAM_CODEC
-
health
private final float health -
food
private final int food -
saturation
private final float saturation
-
-
Constructor Details
-
ClientboundSetHealthPacket
public ClientboundSetHealthPacket(float pHealth, int pFood, float pSaturation) -
ClientboundSetHealthPacket
-
-
Method Details
-
write
Writes the raw packet data to the data stream. -
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
getHealth
public float getHealth() -
getFood
public int getFood() -
getSaturation
public float getSaturation()
-