Record Class EntityDamageS2CPacket
java.lang.Object
java.lang.Record
net.minecraft.network.packet.s2c.play.EntityDamageS2CPacket
- Record Components:
entityId-sourceTypeId-sourceCauseId-sourceDirectId-sourcePosition-
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public record EntityDamageS2CPacket(int entityId, int sourceTypeId, int sourceCauseId, int sourceDirectId, Optional<Vec3d> sourcePosition)
extends Record
implements Packet<ClientPlayPacketListener>
- Mappings:
Namespace Name official vqintermediary net/minecraft/class_8143named net/minecraft/network/packet/s2c/play/EntityDamageS2CPacketofficial aintermediary comp_1267named entityIdofficial bintermediary comp_1268named sourceTypeIdofficial cintermediary comp_1269named sourceCauseIdofficial dintermediary comp_1270named sourceDirectIdofficial eintermediary comp_1271named sourcePosition
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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 intThe field for thesourceTypeIdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntityDamageS2CPacket(int int2, int int3, int int4, int int5, Optional<Vec3d> optional) EntityDamageS2CPacket(Entity entity, DamageSource damageSource) -
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.intReturns the value of thesourceTypeIdrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(PacketByteBuf 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
-
Field Details
-
entityId
private final int entityIdThe field for theentityIdrecord component. -
sourceTypeId
private final int sourceTypeIdThe field for thesourceTypeIdrecord 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.
-
-
Constructor Details
-
EntityDamageS2CPacket
- Mappings:
Namespace Name Mixin selector official <init>Lvq;<init>(Lbfh;Lbem;)Vintermediary <init>Lnet/minecraft/class_8143;<init>(Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;)Vnamed <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>Lvq;<init>(Lsf;)Vintermediary <init>Lnet/minecraft/class_8143;<init>(Lnet/minecraft/class_2540;)Vnamed <init>Lnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)V
-
EntityDamageS2CPacket
-
-
Method Details
-
writeOffsetVarInt
- Mappings:
Namespace Name Mixin selector official aLvq;a(Lsf;I)Vintermediary method_49072Lnet/minecraft/class_8143;method_49072(Lnet/minecraft/class_2540;I)Vnamed writeOffsetVarIntLnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;writeOffsetVarInt(Lnet/minecraft/network/PacketByteBuf;I)V
-
readOffsetVarInt
- Mappings:
Namespace Name Mixin selector official bLvq;b(Lsf;)Iintermediary method_49075Lnet/minecraft/class_8143;method_49075(Lnet/minecraft/class_2540;)Inamed readOffsetVarIntLnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;readOffsetVarInt(Lnet/minecraft/network/PacketByteBuf;)I
-
write
- Specified by:
writein interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector official aLuo;a(Lsf;)Vintermediary method_11052Lnet/minecraft/class_2596;method_11052(Lnet/minecraft/class_2540;)Vnamed writeLnet/minecraft/network/packet/Packet;write(Lnet/minecraft/network/PacketByteBuf;)V
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector official aLvq;a(Lur;)Vintermediary method_49074Lnet/minecraft/class_8143;method_49074(Lnet/minecraft/class_2602;)Vnamed applyLnet/minecraft/network/packet/s2c/play/EntityDamageS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)V
-
createDamageSource
- Mappings:
Namespace Name Mixin selector official aLvq;a(Lcmk;)Lbem;intermediary method_49071Lnet/minecraft/class_8143;method_49071(Lnet/minecraft/class_1937;)Lnet/minecraft/class_1282;named createDamageSourceLnet/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 theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
sourceTypeId
public int sourceTypeId()Returns the value of thesourceTypeIdrecord component.- Returns:
- the value of the
sourceTypeIdrecord 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
-