Record Class RenderPacket
java.lang.Object
java.lang.Record
cromveil.combatnumbers.packets.RenderPacket
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record RenderPacket(int entityId, float value, int skinIndex, int animationIndex)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, RenderPacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<RenderPacket> -
Constructor Summary
ConstructorsConstructorDescriptionRenderPacket(int entityId, float value, int skinIndex, int animationIndex) Creates an instance of aRenderPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theanimationIndexrecord component.intentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theskinIndexrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()floatvalue()Returns the value of thevaluerecord component.
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<RenderPacket> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, RenderPacket> STREAM_CODEC
-
-
Constructor Details
-
RenderPacket
public RenderPacket(int entityId, float value, int skinIndex, int animationIndex) Creates an instance of aRenderPacketrecord class.- Parameters:
entityId- the value for theentityIdrecord componentvalue- the value for thevaluerecord componentskinIndex- the value for theskinIndexrecord componentanimationIndex- the value for theanimationIndexrecord component
-
-
Method Details
-
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
value
public float value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
skinIndex
public int skinIndex()Returns the value of theskinIndexrecord component.- Returns:
- the value of the
skinIndexrecord component
-
animationIndex
public int animationIndex()Returns the value of theanimationIndexrecord component.- Returns:
- the value of the
animationIndexrecord component
-