Package de.teamlapen.werewolves.network
Record Class ServerboundSimpleInputEventPacket
java.lang.Object
java.lang.Record
de.teamlapen.werewolves.network.ServerboundSimpleInputEventPacket
- All Implemented Interfaces:
de.teamlapen.lib.network.IMessage,de.teamlapen.lib.network.IMessage.IServerBoundMessage
public record ServerboundSimpleInputEventPacket(ServerboundSimpleInputEventPacket.Type type)
extends Record
implements de.teamlapen.lib.network.IMessage.IServerBoundMessage
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface de.teamlapen.lib.network.IMessage
de.teamlapen.lib.network.IMessage.IClientBoundMessage, de.teamlapen.lib.network.IMessage.IServerBoundMessage -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aServerboundSimpleInputEventPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static voidhandle(ServerboundSimpleInputEventPacket msg, Supplier<net.minecraftforge.network.NetworkEvent.Context> contextSupplier) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ServerboundSimpleInputEventPacket
Creates an instance of aServerboundSimpleInputEventPacketrecord class.- Parameters:
type- the value for thetyperecord component
-
-
Method Details
-
handle
public static void handle(ServerboundSimpleInputEventPacket msg, Supplier<net.minecraftforge.network.NetworkEvent.Context> contextSupplier) -
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-