Package com.breakinblocks.graveless.net
Record Class GravelessNetworking.GraveListPayload
java.lang.Object
java.lang.Record
com.breakinblocks.graveless.net.GravelessNetworking.GraveListPayload
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
- Enclosing class:
GravelessNetworking
public static record GravelessNetworking.GraveListPayload(UUID ownerId, String ownerName, List<GravelessNetworking.GraveSummary> graves, boolean admin, boolean ownerEnabled, Optional<UUID> trackedId, List<GravelessNetworking.PlayerEntry> players, List<GravelessNetworking.PlayerEntry> allowed, Optional<UUID> focusId)
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 extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, GravelessNetworking.GraveListPayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GravelessNetworking.GraveListPayload> -
Constructor Summary
ConstructorsConstructorDescriptionGraveListPayload(UUID ownerId, String ownerName, List<GravelessNetworking.GraveSummary> graves, boolean admin, boolean ownerEnabled, Optional<UUID> trackedId, List<GravelessNetworking.PlayerEntry> players, List<GravelessNetworking.PlayerEntry> allowed, Optional<UUID> focusId) Creates an instance of aGraveListPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanadmin()Returns the value of theadminrecord component.allowed()Returns the value of theallowedrecord component.final booleanIndicates whether some other object is "equal to" this one.focusId()Returns the value of thefocusIdrecord component.graves()Returns the value of thegravesrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theownerEnabledrecord component.ownerId()Returns the value of theownerIdrecord component.Returns the value of theownerNamerecord component.players()Returns the value of theplayersrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrackedIdrecord component.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GravelessNetworking.GraveListPayload> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,GravelessNetworking.GraveListPayload> STREAM_CODEC
-
-
Constructor Details
-
GraveListPayload
public GraveListPayload(UUID ownerId, String ownerName, List<GravelessNetworking.GraveSummary> graves, boolean admin, boolean ownerEnabled, Optional<UUID> trackedId, List<GravelessNetworking.PlayerEntry> players, List<GravelessNetworking.PlayerEntry> allowed, Optional<UUID> focusId) Creates an instance of aGraveListPayloadrecord class.- Parameters:
ownerId- the value for theownerIdrecord componentownerName- the value for theownerNamerecord componentgraves- the value for thegravesrecord componentadmin- the value for theadminrecord componentownerEnabled- the value for theownerEnabledrecord componenttrackedId- the value for thetrackedIdrecord componentplayers- the value for theplayersrecord componentallowed- the value for theallowedrecord componentfocusId- the value for thefocusIdrecord 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
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 '=='. -
ownerId
Returns the value of theownerIdrecord component.- Returns:
- the value of the
ownerIdrecord component
-
ownerName
Returns the value of theownerNamerecord component.- Returns:
- the value of the
ownerNamerecord component
-
graves
Returns the value of thegravesrecord component.- Returns:
- the value of the
gravesrecord component
-
admin
public boolean admin()Returns the value of theadminrecord component.- Returns:
- the value of the
adminrecord component
-
ownerEnabled
public boolean ownerEnabled()Returns the value of theownerEnabledrecord component.- Returns:
- the value of the
ownerEnabledrecord component
-
trackedId
Returns the value of thetrackedIdrecord component.- Returns:
- the value of the
trackedIdrecord component
-
players
Returns the value of theplayersrecord component.- Returns:
- the value of the
playersrecord component
-
allowed
Returns the value of theallowedrecord component.- Returns:
- the value of the
allowedrecord component
-
focusId
Returns the value of thefocusIdrecord component.- Returns:
- the value of the
focusIdrecord component
-