Class ClientboundSetHealthPacket
java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket
- All Implemented Interfaces:
Packet,MinecraftPacket
-
Constructor Summary
ConstructorsConstructorDescriptionClientboundSetHealthPacket(float health, int food, float saturation) ClientboundSetHealthPacket(io.netty.buffer.ByteBuf in, MinecraftCodecHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanintgetFood()floatfloatinthashCode()voidserialize(io.netty.buffer.ByteBuf out, MinecraftCodecHelper helper) @NonNull StringtoString()@NonNull ClientboundSetHealthPacketwithFood(int food) @NonNull ClientboundSetHealthPacketwithHealth(float health) @NonNull ClientboundSetHealthPacketwithSaturation(float saturation) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.mcprotocollib.network.packet.Packet
isPriority, isTerminal
-
Constructor Details
-
ClientboundSetHealthPacket
-
ClientboundSetHealthPacket
public ClientboundSetHealthPacket(float health, int food, float saturation)
-
-
Method Details
-
serialize
- Specified by:
serializein interfaceMinecraftPacket
-
getHealth
public float getHealth() -
getFood
public int getFood() -
getSaturation
public float getSaturation() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withHealth
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withFood
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withSaturation
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-