Record Class EntityDamageS2CPacket
java.lang.Object
java.lang.Record
net.minecraft.network.packet.s2c.play.EntityDamageS2CPacket
- Record Components:
entityId-sourceType-sourceCauseId-sourceDirectId-sourcePosition-
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public record EntityDamageS2CPacket(int entityId, RegistryEntry<DamageType> sourceType, int sourceCauseId, int sourceDirectId, Optional<Vec3d> sourcePosition)
extends Record
implements Packet<ClientPlayPacketListener>
- Mappings:
Namespace Name named net/minecraft/network/packet/s2c/play/EntityDamageS2CPacketintermediary net/minecraft/class_8143official acunamed entityIdintermediary comp_1267official bnamed sourceTypeintermediary comp_1268official cnamed sourceCauseIdintermediary comp_1269official dnamed sourceDirectIdintermediary comp_1270official enamed sourcePositionintermediary comp_1271official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PacketCodec<RegistryByteBuf, EntityDamageS2CPacket> private final intThe field for theentityIdrecord component.private final intThe field for thesourceCauseIdrecord component.private final intThe field for thesourceDirectIdrecord component.The field for thesourcePositionrecord component.private final RegistryEntry<DamageType> The field for thesourceTyperecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionEntityDamageS2CPacket(int int2, RegistryEntry<DamageType> registryEntry, int int3, int int4, Optional<Vec3d> optional) EntityDamageS2CPacket(Entity entity, DamageSource damageSource) private -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(ClientPlayPacketListener clientPlayPacketListener) createDamageSource(World world) intentityId()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.private static intintReturns the value of thesourceCauseIdrecord component.intReturns the value of thesourceDirectIdrecord component.Returns the value of thesourcePositionrecord component.Returns the value of thesourceTyperecord component.final StringtoString()Returns a string representation of this record class.private voidwrite(RegistryByteBuf buf) private static voidwriteOffsetVarInt(PacketByteBuf buf, int value) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.packet.Packet
isWritingErrorSkippable, transitionsNetworkState
-
Field Details
-
entityId
private final int entityIdThe field for theentityIdrecord component. -
sourceType
The field for thesourceTyperecord component. -
sourceCauseId
private final int sourceCauseIdThe field for thesourceCauseIdrecord component. -
sourceDirectId
private final int sourceDirectIdThe field for thesourceDirectIdrecord component. -
sourcePosition
The field for thesourcePositionrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_47921Lnet/minecraft/class_8143;field_47921:Lnet/minecraft/class_9139;official aLacu;a:Lyx;
-
-
Constructor Details
-
EntityDamageS2CPacket
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;<init>(Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;)Vintermediary <init>Lnet/minecraft/class_8143;<init>(Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;)Vofficial <init>Lacu;<init>(Lbsr;Lbrk;)V
-
EntityDamageS2CPacket
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;<init>(Lnet/minecraft/network/RegistryByteBuf;)Vintermediary <init>Lnet/minecraft/class_8143;<init>(Lnet/minecraft/class_9129;)Vofficial <init>Lacu;<init>(Lwk;)V
-
EntityDamageS2CPacket
public EntityDamageS2CPacket(int int2, RegistryEntry<DamageType> registryEntry, int int3, int int4, Optional<Vec3d> optional)
-
-
Method Details
-
writeOffsetVarInt
- Mappings:
Namespace Name Mixin selector named writeOffsetVarIntLnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;writeOffsetVarInt(Lnet/minecraft/network/PacketByteBuf;I)Vintermediary method_49072Lnet/minecraft/class_8143;method_49072(Lnet/minecraft/class_2540;I)Vofficial aLacu;a(Lvw;I)V
-
readOffsetVarInt
- Mappings:
Namespace Name Mixin selector named readOffsetVarIntLnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;readOffsetVarInt(Lnet/minecraft/network/PacketByteBuf;)Iintermediary method_49075Lnet/minecraft/class_8143;method_49075(Lnet/minecraft/class_2540;)Iofficial aLacu;a(Lvw;)I
-
write
- Mappings:
Namespace Name Mixin selector named writeLnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;write(Lnet/minecraft/network/RegistryByteBuf;)Vintermediary method_55873Lnet/minecraft/class_8143;method_55873(Lnet/minecraft/class_9129;)Vofficial aLacu;a(Lwk;)V
-
getPacketId
- Specified by:
getPacketIdin interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector named getPacketIdLnet/minecraft/network/packet/Packet;getPacketId()Lnet/minecraft/network/packet/PacketType;intermediary method_55846Lnet/minecraft/class_2596;method_55846()Lnet/minecraft/class_9145;official aLzg;a()Lzi;
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector named applyLnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)Vintermediary method_49074Lnet/minecraft/class_8143;method_49074(Lnet/minecraft/class_2602;)Vofficial aLacu;a(Labu;)V
-
createDamageSource
- Mappings:
Namespace Name Mixin selector named createDamageSourceLnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;createDamageSource(Lnet/minecraft/world/World;)Lnet/minecraft/entity/damage/DamageSource;intermediary method_49071Lnet/minecraft/class_8143;method_49071(Lnet/minecraft/class_1937;)Lnet/minecraft/class_1282;official aLacu;a(Ldcw;)Lbrk;
-
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
-
sourceType
Returns the value of thesourceTyperecord component.- Returns:
- the value of the
sourceTyperecord component
-
sourceCauseId
public int sourceCauseId()Returns the value of thesourceCauseIdrecord component.- Returns:
- the value of the
sourceCauseIdrecord component
-
sourceDirectId
public int sourceDirectId()Returns the value of thesourceDirectIdrecord component.- Returns:
- the value of the
sourceDirectIdrecord component
-
sourcePosition
Returns the value of thesourcePositionrecord component.- Returns:
- the value of the
sourcePositionrecord component
-