Package de.teamlapen.werewolves.network
Record Class ServerboundSimpleInputEventPacket
java.lang.Object
java.lang.Record
de.teamlapen.werewolves.network.ServerboundSimpleInputEventPacket
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ServerboundSimpleInputEventPacket(ServerboundSimpleInputEventPacket.Type type)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ServerboundSimpleInputEventPacket>static final net.minecraft.resources.ResourceLocation -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aServerboundSimpleInputEventPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.type()Returns the value of thetyperecord component.voidwrite(net.minecraft.network.FriendlyByteBuf buffer)
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID -
CODEC
-
-
Constructor Details
-
ServerboundSimpleInputEventPacket
Creates an instance of aServerboundSimpleInputEventPacketrecord class.- Parameters:
type- the value for thetyperecord 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 withObjects::equals(Object,Object). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-