Record Class ClientboundRemoveMobEffectPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundRemoveMobEffectPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundRemoveMobEffectPacket(int entityId, Holder<MobEffect> effect)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theeffectrecord component.private final intThe field for theentityIdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundRemoveMobEffectPacket(int entityId, Holder<MobEffect> effect) Creates an instance of aClientboundRemoveMobEffectPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptioneffect()Returns the value of theeffectrecord component.intentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener p_132908_) final inthashCode()Returns a hash code value for this object.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
-
entityId
private final int entityIdThe field for theentityIdrecord component. -
effect
The field for theeffectrecord component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,ClientboundRemoveMobEffectPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundRemoveMobEffectPacket
Creates an instance of aClientboundRemoveMobEffectPacketrecord class.- Parameters:
entityId- the value for theentityIdrecord componenteffect- the value for theeffectrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
getEntity
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
effect
Returns the value of theeffectrecord component.- Returns:
- the value of the
effectrecord component
-