Record Class GridExtractPacket
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.support.packet.c2s.GridExtractPacket
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record GridExtractPacket(PlatformResourceKey resource, GridExtractMode mode, boolean cursor)
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.protocol.common.custom.CustomPacketPayload.Type<GridExtractPacket> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, GridExtractPacket> -
Constructor Summary
ConstructorsConstructorDescriptionGridExtractPacket(PlatformResourceKey resource, GridExtractMode mode, boolean cursor) Creates an instance of aGridExtractPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancursor()Returns the value of thecursorrecord component.final booleanIndicates whether some other object is "equal to" this one.static voidhandle(GridExtractPacket packet, PacketContext ctx) final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.resource()Returns the value of theresourcerecord 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()
-
Field Details
-
PACKET_TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GridExtractPacket> PACKET_TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, GridExtractPacket> STREAM_CODEC
-
-
Constructor Details
-
GridExtractPacket
Creates an instance of aGridExtractPacketrecord class.- Parameters:
resource- the value for theresourcerecord componentmode- the value for themoderecord componentcursor- the value for thecursorrecord component
-
-
Method Details
-
handle
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
cursor
public boolean cursor()Returns the value of thecursorrecord component.- Returns:
- the value of the
cursorrecord component
-