Package de.teamlapen.werewolves.network
Record Class ServerboundBiteEventPackage
java.lang.Object
java.lang.Record
de.teamlapen.werewolves.network.ServerboundBiteEventPackage
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ServerboundBiteEventPackage(int entityId)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ServerboundBiteEventPackage>static final net.minecraft.resources.ResourceLocation -
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.final inthashCode()Returns a hash code value for this object.@NotNull net.minecraft.resources.ResourceLocationid()final StringtoString()Returns a string representation of this record class.voidwrite(net.minecraft.network.FriendlyByteBuf buffer)
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID -
CODEC
-
-
Constructor Details
-
ServerboundBiteEventPackage
public ServerboundBiteEventPackage(int entityId) Creates an instance of aServerboundBiteEventPackagerecord class.- Parameters:
entityId- the value for theentityIdrecord component
-
-
Method Details
-
write
public void write(net.minecraft.network.FriendlyByteBuf buffer) - Specified by:
writein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
id
@NotNull public @NotNull net.minecraft.resources.ResourceLocation id()- Specified by:
idin interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
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
-