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 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 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 p_397061_) 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.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 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 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
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 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
-