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.ActionThe field for theactionrecord component.private final TestInstanceBlockEntity.DataThe field for thedatarecord component.private final BlockPosThe field for theposrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionServerboundTestInstanceBlockActionPacket(BlockPos pos, ServerboundTestInstanceBlockActionPacket.Action action, Optional<ResourceKey<GameTestInstance>> test, Vec3i size, Rotation rotation, boolean ignoreEntities) ServerboundTestInstanceBlockActionPacket(BlockPos pos, ServerboundTestInstanceBlockActionPacket.Action action, TestInstanceBlockEntity.Data data) Creates an instance of aServerboundTestInstanceBlockActionPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ServerGamePacketListener listener) Passes this Packet on to the PacketListener for processing.final inthashCode()Returns a hash code value for this object.pos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
pos
The field for theposrecord component. -
action
The field for theactionrecord component. -
data
The field for thedatarecord component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, ServerboundTestInstanceBlockActionPacket> STREAM_CODEC
-
-
Constructor Details
-
ServerboundTestInstanceBlockActionPacket
public ServerboundTestInstanceBlockActionPacket(BlockPos pos, ServerboundTestInstanceBlockActionPacket.Action action, Optional<ResourceKey<GameTestInstance>> test, Vec3i size, Rotation rotation, boolean ignoreEntities) -
ServerboundTestInstanceBlockActionPacket
public ServerboundTestInstanceBlockActionPacket(BlockPos pos, ServerboundTestInstanceBlockActionPacket.Action action, TestInstanceBlockEntity.Data data) Creates an instance of aServerboundTestInstanceBlockActionPacketrecord class.- Parameters:
pos- the value for theposrecord componentaction- the value for theactionrecord componentdata- the value for thedatarecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ServerGamePacketListener>
-
handle
Description copied from interface:PacketPasses this Packet on to the PacketListener for processing.- Specified by:
handlein interfacePacket<ServerGamePacketListener>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-