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/EntityDamageS2CPacket
intermediary net/minecraft/class_8143
official adi
named entityId
intermediary comp_1267
official b
named sourceType
intermediary comp_1268
official c
named sourceCauseId
intermediary comp_1269
official d
named sourceDirectId
intermediary comp_1270
official e
named sourcePosition
intermediary comp_1271
official f
  • Field Details Link icon

    • entityId Link icon

      private final int entityId
      The field for the entityId record component.
    • sourceType Link icon

      private final RegistryEntry<DamageType> sourceType
      The field for the sourceType record component.
    • sourceCauseId Link icon

      private final int sourceCauseId
      The field for the sourceCauseId record component.
    • sourceDirectId Link icon

      private final int sourceDirectId
      The field for the sourceDirectId record component.
    • sourcePosition Link icon

      private final Optional<Vec3d> sourcePosition
      The field for the sourcePosition record component.
    • CODEC Link icon

      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_47921 Lnet/minecraft/class_8143;field_47921:Lnet/minecraft/class_9139;
      official a Ladi;a:Lzn;
    • DAMAGE_TYPE_PACKET_CODEC Link icon

      private static final PacketCodec<RegistryByteBuf,RegistryEntry<DamageType>> DAMAGE_TYPE_PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named DAMAGE_TYPE_PACKET_CODEC Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;DAMAGE_TYPE_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_48707 Lnet/minecraft/class_8143;field_48707:Lnet/minecraft/class_9139;
      official g Ladi;g:Lzn;
  • Constructor Details Link icon

    • EntityDamageS2CPacket Link icon

      public EntityDamageS2CPacket(Entity entity, DamageSource damageSource)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;<init>(Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;)V
      intermediary <init> Lnet/minecraft/class_8143;<init>(Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;)V
      official <init> Ladi;<init>(Lbsw;Lbrp;)V
    • EntityDamageS2CPacket Link icon

      private EntityDamageS2CPacket(RegistryByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;<init>(Lnet/minecraft/network/RegistryByteBuf;)V
      intermediary <init> Lnet/minecraft/class_8143;<init>(Lnet/minecraft/class_9129;)V
      official <init> Ladi;<init>(Lxa;)V
    • EntityDamageS2CPacket Link icon

      public EntityDamageS2CPacket(int int2, RegistryEntry<DamageType> registryEntry, int int3, int int4, Optional<Vec3d> optional)
  • Method Details Link icon

    • writeOffsetVarInt Link icon

      private static void writeOffsetVarInt(PacketByteBuf buf, int value)
      Mappings:
      Namespace Name Mixin selector
      named writeOffsetVarInt Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;writeOffsetVarInt(Lnet/minecraft/network/PacketByteBuf;I)V
      intermediary method_49072 Lnet/minecraft/class_8143;method_49072(Lnet/minecraft/class_2540;I)V
      official a Ladi;a(Lwm;I)V
    • readOffsetVarInt Link icon

      private static int readOffsetVarInt(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      named readOffsetVarInt Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;readOffsetVarInt(Lnet/minecraft/network/PacketByteBuf;)I
      intermediary method_49075 Lnet/minecraft/class_8143;method_49075(Lnet/minecraft/class_2540;)I
      official a Ladi;a(Lwm;)I
    • write Link icon

      private void write(RegistryByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      named write Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;write(Lnet/minecraft/network/RegistryByteBuf;)V
      intermediary method_55873 Lnet/minecraft/class_8143;method_55873(Lnet/minecraft/class_9129;)V
      official a Ladi;a(Lxa;)V
    • getPacketId Link icon

      public PacketType<EntityDamageS2CPacket> getPacketId()
      Specified by:
      getPacketId in interface Packet<ClientPlayPacketListener>
      Mappings:
      Namespace Name Mixin selector
      named getPacketId Lnet/minecraft/network/packet/Packet;getPacketId()Lnet/minecraft/network/packet/PacketType;
      intermediary method_55846 Lnet/minecraft/class_2596;method_55846()Lnet/minecraft/class_9145;
      official a Lzw;a()Lzy;
    • apply Link icon

      public void apply(ClientPlayPacketListener clientPlayPacketListener)
      Specified by:
      apply in interface Packet<ClientPlayPacketListener>
      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)V
      intermediary method_49074 Lnet/minecraft/class_8143;method_49074(Lnet/minecraft/class_2602;)V
      official a Ladi;a(Laci;)V
    • createDamageSource Link icon

      public DamageSource createDamageSource(World world)
      Mappings:
      Namespace Name Mixin selector
      named createDamageSource Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;createDamageSource(Lnet/minecraft/world/World;)Lnet/minecraft/entity/damage/DamageSource;
      intermediary method_49071 Lnet/minecraft/class_8143;method_49071(Lnet/minecraft/class_1937;)Lnet/minecraft/class_1282;
      official a Ladi;a(Ldca;)Lbrp;
    • toString Link icon

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode Link icon

      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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals Link icon

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • entityId Link icon

      public int entityId()
      Returns the value of the entityId record component.
      Returns:
      the value of the entityId record component
    • sourceType Link icon

      public RegistryEntry<DamageType> sourceType()
      Returns the value of the sourceType record component.
      Returns:
      the value of the sourceType record component
    • sourceCauseId Link icon

      public int sourceCauseId()
      Returns the value of the sourceCauseId record component.
      Returns:
      the value of the sourceCauseId record component
    • sourceDirectId Link icon

      public int sourceDirectId()
      Returns the value of the sourceDirectId record component.
      Returns:
      the value of the sourceDirectId record component
    • sourcePosition Link icon

      public Optional<Vec3d> sourcePosition()
      Returns the value of the sourcePosition record component.
      Returns:
      the value of the sourcePosition record component