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 official acm
intermediary net/minecraft/class_8143
named net/minecraft/network/packet/s2c/play/EntityDamageS2CPacket
official b
intermediary comp_1267
named entityId
official c
intermediary comp_1268
named sourceType
official d
intermediary comp_1269
named sourceCauseId
official e
intermediary comp_1270
named sourceDirectId
official f
intermediary comp_1271
named sourcePosition
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PacketCodec
<RegistryByteBuf, EntityDamageS2CPacket> private static final PacketCodec
<RegistryByteBuf, RegistryEntry<DamageType>> private final int
The field for theentityId
record component.private final int
The field for thesourceCauseId
record component.private final int
The field for thesourceDirectId
record component.The field for thesourcePosition
record component.private final RegistryEntry
<DamageType> The field for thesourceType
record 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 TypeMethodDescriptionvoid
apply
(ClientPlayPacketListener clientPlayPacketListener) createDamageSource
(World world) int
entityId()
Returns the value of theentityId
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.private static int
int
Returns the value of thesourceCauseId
record component.int
Returns the value of thesourceDirectId
record component.Returns the value of thesourcePosition
record component.Returns the value of thesourceType
record component.final String
toString()
Returns a string representation of this record class.private void
write
(RegistryByteBuf buf) private static void
writeOffsetVarInt
(PacketByteBuf buf, int value) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.packet.Packet
isWritingErrorSkippable, transitionsNetworkState
-
Field Details
-
entityId
private final int entityIdThe field for theentityId
record component. -
sourceType
The field for thesourceType
record component. -
sourceCauseId
private final int sourceCauseIdThe field for thesourceCauseId
record component. -
sourceDirectId
private final int sourceDirectIdThe field for thesourceDirectId
record component. -
sourcePosition
The field for thesourcePosition
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector official a
Lacm;a:Lys;
intermediary field_47921
Lnet/minecraft/class_8143;field_47921:Lnet/minecraft/class_9139;
named CODEC
Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
DAMAGE_TYPE_PACKET_CODEC
private static final PacketCodec<RegistryByteBuf,RegistryEntry<DamageType>> DAMAGE_TYPE_PACKET_CODEC- Mappings:
Namespace Name Mixin selector official g
Lacm;g:Lys;
intermediary field_48707
Lnet/minecraft/class_8143;field_48707:Lnet/minecraft/class_9139;
named DAMAGE_TYPE_PACKET_CODEC
Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;DAMAGE_TYPE_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
-
Constructor Details
-
EntityDamageS2CPacket
- Mappings:
Namespace Name Mixin selector official <init>
Lacm;<init>(Lbrh;Lbqf;)V
intermediary <init>
Lnet/minecraft/class_8143;<init>(Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;)V
named <init>
Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;<init>(Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;)V
-
EntityDamageS2CPacket
- Mappings:
Namespace Name Mixin selector official <init>
Lacm;<init>(Lwf;)V
intermediary <init>
Lnet/minecraft/class_8143;<init>(Lnet/minecraft/class_9129;)V
named <init>
Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;<init>(Lnet/minecraft/network/RegistryByteBuf;)V
-
EntityDamageS2CPacket
public EntityDamageS2CPacket(int int2, RegistryEntry<DamageType> registryEntry, int int3, int int4, Optional<Vec3d> optional)
-
-
Method Details
-
writeOffsetVarInt
- Mappings:
Namespace Name Mixin selector official a
Lacm;a(Lvu;I)V
intermediary method_49072
Lnet/minecraft/class_8143;method_49072(Lnet/minecraft/class_2540;I)V
named writeOffsetVarInt
Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;writeOffsetVarInt(Lnet/minecraft/network/PacketByteBuf;I)V
-
readOffsetVarInt
- Mappings:
Namespace Name Mixin selector official a
Lacm;a(Lvu;)I
intermediary method_49075
Lnet/minecraft/class_8143;method_49075(Lnet/minecraft/class_2540;)I
named readOffsetVarInt
Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;readOffsetVarInt(Lnet/minecraft/network/PacketByteBuf;)I
-
write
- Mappings:
Namespace Name Mixin selector official a
Lacm;a(Lwf;)V
intermediary method_55873
Lnet/minecraft/class_8143;method_55873(Lnet/minecraft/class_9129;)V
named write
Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;write(Lnet/minecraft/network/RegistryByteBuf;)V
-
getPacketId
- Specified by:
getPacketId
in interfacePacket<ClientPlayPacketListener>
- Mappings:
Namespace Name Mixin selector official a
Lzb;a()Lzd;
intermediary method_55846
Lnet/minecraft/class_2596;method_55846()Lnet/minecraft/class_9145;
named getPacketId
Lnet/minecraft/network/packet/Packet;getPacketId()Lnet/minecraft/network/packet/PacketType;
-
apply
- Specified by:
apply
in interfacePacket<ClientPlayPacketListener>
- Mappings:
Namespace Name Mixin selector official a
Lacm;a(Labm;)V
intermediary method_49074
Lnet/minecraft/class_8143;method_49074(Lnet/minecraft/class_2602;)V
named apply
Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)V
-
createDamageSource
- Mappings:
Namespace Name Mixin selector official a
Lacm;a(Ldad;)Lbqf;
intermediary method_49071
Lnet/minecraft/class_8143;method_49071(Lnet/minecraft/class_1937;)Lnet/minecraft/class_1282;
named createDamageSource
Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;createDamageSource(Lnet/minecraft/world/World;)Lnet/minecraft/entity/damage/DamageSource;
-
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 theentityId
record component.- Returns:
- the value of the
entityId
record component
-
sourceType
Returns the value of thesourceType
record component.- Returns:
- the value of the
sourceType
record component
-
sourceCauseId
public int sourceCauseId()Returns the value of thesourceCauseId
record component.- Returns:
- the value of the
sourceCauseId
record component
-
sourceDirectId
public int sourceDirectId()Returns the value of thesourceDirectId
record component.- Returns:
- the value of the
sourceDirectId
record component
-
sourcePosition
Returns the value of thesourcePosition
record component.- Returns:
- the value of the
sourcePosition
record component
-