Record Class SyncBossBarEntityS2CPayload
java.lang.Object
java.lang.Record
io.github.xrickastley.sevenelements.networking.SyncBossBarEntityS2CPayload
- All Implemented Interfaces:
SevenElementsPayload,FabricPacket
public record SyncBossBarEntityS2CPayload(UUID uuid, boolean hasEntity, int entityId)
extends Record
implements SevenElementsPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.xrickastley.sevenelements.networking.SevenElementsPayload
SevenElementsPayload.Id<T extends SevenElementsPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SyncBossBarEntityS2CPayload>private final intThe field for theentityIdrecord component.private final booleanThe field for thehasEntityrecord component.static final SevenElementsPayload.Id<SyncBossBarEntityS2CPayload>private final UUIDThe field for theuuidrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSyncBossBarEntityS2CPayload(UUID uuid, boolean hasEntity, int entityId) Creates an instance of aSyncBossBarEntityS2CPayloadrecord class.SyncBossBarEntityS2CPayload(BossBar bossBar, LivingEntity entity) -
Method Summary
Modifier and TypeMethodDescriptionintentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.com.mojang.serialization.Codec<? extends SevenElementsPayload>getCodec()SevenElementsPayload.Id<? extends SevenElementsPayload>getId()booleanReturns the value of thehasEntityrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.uuid()Returns the value of theuuidrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.xrickastley.sevenelements.networking.SevenElementsPayload
getType, write
-
Field Details
-
uuid
The field for theuuidrecord component. -
hasEntity
private final boolean hasEntityThe field for thehasEntityrecord component. -
entityId
private final int entityIdThe field for theentityIdrecord component. -
CODEC
-
ID
-
-
Constructor Details
-
SyncBossBarEntityS2CPayload
-
SyncBossBarEntityS2CPayload
Creates an instance of aSyncBossBarEntityS2CPayloadrecord class.- Parameters:
uuid- the value for theuuidrecord componenthasEntity- the value for thehasEntityrecord componententityId- the value for theentityIdrecord component
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceSevenElementsPayload
-
getCodec
- Specified by:
getCodecin interfaceSevenElementsPayload
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
uuid
Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
hasEntity
public boolean hasEntity()Returns the value of thehasEntityrecord component.- Returns:
- the value of the
hasEntityrecord component
-
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-