Package de.teamlapen.werewolves.network
Record Class ServerboundBiteEventPackage
java.lang.Object
java.lang.Record
de.teamlapen.werewolves.network.ServerboundBiteEventPackage
- All Implemented Interfaces:
de.teamlapen.lib.network.IMessage,de.teamlapen.lib.network.IMessage.IServerBoundMessage
public record ServerboundBiteEventPackage(int entityId)
extends Record
implements de.teamlapen.lib.network.IMessage.IServerBoundMessage
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.teamlapen.lib.network.IMessage
de.teamlapen.lib.network.IMessage.IClientBoundMessage, de.teamlapen.lib.network.IMessage.IServerBoundMessage -
Constructor Summary
ConstructorsConstructorDescriptionServerboundBiteEventPackage(int entityId) Creates an instance of aServerboundBiteEventPackagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.static voidhandle(ServerboundBiteEventPackage 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.
-
Constructor Details
-
ServerboundBiteEventPackage
public ServerboundBiteEventPackage(int entityId) Creates an instance of aServerboundBiteEventPackagerecord class.- Parameters:
entityId- the value for theentityIdrecord component
-
-
Method Details
-
handle
public static void handle(ServerboundBiteEventPackage 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 with '=='. -
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-