Record Class ServerboundTestInstanceBlockActionPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ServerboundTestInstanceBlockActionPacket
- All Implemented Interfaces:
Packet<ServerGamePacketListener>
public record ServerboundTestInstanceBlockActionPacket(BlockPos pos, ServerboundTestInstanceBlockActionPacket.Action action, TestInstanceBlockEntity.Data data)
extends Record
implements Packet<ServerGamePacketListener>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ServerboundTestInstanceBlockActionPacket.Action
The field for theaction
record component.private final TestInstanceBlockEntity.Data
The field for thedata
record component.private final BlockPos
The field for thepos
record component. -
Constructor Summary
ConstructorsConstructorDescriptionServerboundTestInstanceBlockActionPacket
(BlockPos p_397563_, ServerboundTestInstanceBlockActionPacket.Action p_397686_, Optional<ResourceKey<GameTestInstance>> p_397885_, Vec3i p_397965_, Rotation p_397552_, boolean p_397584_) ServerboundTestInstanceBlockActionPacket
(BlockPos pos, ServerboundTestInstanceBlockActionPacket.Action action, TestInstanceBlockEntity.Data data) Creates an instance of aServerboundTestInstanceBlockActionPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionaction()
Returns the value of theaction
record component.data()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.void
handle
(ServerGamePacketListener p_397061_) final int
hashCode()
Returns a hash code value for this object.pos()
Returns the value of thepos
record component.final String
toString()
Returns a string representation of this record class.type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
pos
The field for thepos
record component. -
action
The field for theaction
record component. -
data
The field for thedata
record component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,ServerboundTestInstanceBlockActionPacket> STREAM_CODEC
-
-
Constructor Details
-
ServerboundTestInstanceBlockActionPacket
public ServerboundTestInstanceBlockActionPacket(BlockPos p_397563_, ServerboundTestInstanceBlockActionPacket.Action p_397686_, Optional<ResourceKey<GameTestInstance>> p_397885_, Vec3i p_397965_, Rotation p_397552_, boolean p_397584_) -
ServerboundTestInstanceBlockActionPacket
public ServerboundTestInstanceBlockActionPacket(BlockPos pos, ServerboundTestInstanceBlockActionPacket.Action action, TestInstanceBlockEntity.Data data) Creates an instance of aServerboundTestInstanceBlockActionPacket
record class.- Parameters:
pos
- the value for thepos
record componentaction
- the value for theaction
record componentdata
- the value for thedata
record component
-
-
Method Details
-
type
- Specified by:
type
in interfacePacket<ServerGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ServerGamePacketListener>
-
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)
. -
pos
Returns the value of thepos
record component.- Returns:
- the value of the
pos
record component
-
action
Returns the value of theaction
record component.- Returns:
- the value of the
action
record component
-
data
Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-