Record Class StructureDebugRequestPayload
java.lang.Object
java.lang.Record
net.frozenblock.lib.debug.networking.StructureDebugRequestPayload
- All Implemented Interfaces:
net.fabricmc.fabric.api.networking.v1.FabricPacket
public record StructureDebugRequestPayload(net.minecraft.world.level.ChunkPos chunkPos)
extends Record
implements net.fabricmc.fabric.api.networking.v1.FabricPacket
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.fabricmc.fabric.api.networking.v1.PacketType<StructureDebugRequestPayload> -
Constructor Summary
ConstructorsConstructorDescriptionStructureDebugRequestPayload(@NotNull net.minecraft.network.FriendlyByteBuf buf) StructureDebugRequestPayload(net.minecraft.world.level.ChunkPos chunkPos) Creates an instance of aStructureDebugRequestPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.ChunkPoschunkPos()Returns the value of thechunkPosrecord component.final booleanIndicates whether some other object is "equal to" this one.net.fabricmc.fabric.api.networking.v1.PacketType<?> getType()final inthashCode()Returns a hash code value for this object.static voidsendBack(net.minecraft.server.level.ServerPlayer sender, net.minecraft.server.level.ServerLevel serverLevel, net.minecraft.world.level.ChunkPos chunkPos) final StringtoString()Returns a string representation of this record class.voidwrite(@NotNull net.minecraft.network.FriendlyByteBuf buf)
-
Field Details
-
PACKET_TYPE
public static final net.fabricmc.fabric.api.networking.v1.PacketType<StructureDebugRequestPayload> PACKET_TYPE
-
-
Constructor Details
-
StructureDebugRequestPayload
public StructureDebugRequestPayload(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) -
StructureDebugRequestPayload
public StructureDebugRequestPayload(net.minecraft.world.level.ChunkPos chunkPos) Creates an instance of aStructureDebugRequestPayloadrecord class.- Parameters:
chunkPos- the value for thechunkPosrecord component
-
-
Method Details
-
write
public void write(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) - Specified by:
writein interfacenet.fabricmc.fabric.api.networking.v1.FabricPacket
-
sendBack
public static void sendBack(net.minecraft.server.level.ServerPlayer sender, net.minecraft.server.level.ServerLevel serverLevel, net.minecraft.world.level.ChunkPos chunkPos) -
getType
public net.fabricmc.fabric.api.networking.v1.PacketType<?> getType()- Specified by:
getTypein interfacenet.fabricmc.fabric.api.networking.v1.FabricPacket
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
chunkPos
public net.minecraft.world.level.ChunkPos chunkPos()Returns the value of thechunkPosrecord component.- Returns:
- the value of the
chunkPosrecord component
-