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 - acl- 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 SummaryFieldsModifier 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 SummaryConstructorsModifierConstructorDescriptionEntityDamageS2CPacket(int int2, RegistryEntry<DamageType> registryEntry, int int3, int int4, Optional<Vec3d> optional) EntityDamageS2CPacket(Entity entity, DamageSource damageSource) private
- 
Method SummaryModifier 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.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.packet.PacketisWritingErrorSkippable, transitionsNetworkState
- 
Field Details- 
entityIdprivate final int entityIdThe field for theentityIdrecord component.
- 
sourceTypeThe field for thesourceTyperecord component.
- 
sourceCauseIdprivate final int sourceCauseIdThe field for thesourceCauseIdrecord component.
- 
sourceDirectIdprivate final int sourceDirectIdThe field for thesourceDirectIdrecord component.
- 
sourcePositionThe field for thesourcePositionrecord component.
- 
CODEC- 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- Lacl;a:Lyn;
 
 
- 
- 
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;)V- intermediary - <init>- Lnet/minecraft/class_8143;<init>(Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;)V- official - <init>- Lacl;<init>(Lbum;Lbtc;)V
 
- 
EntityDamageS2CPacket- 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>- Lacl;<init>(Lwa;)V
 
- 
EntityDamageS2CPacketpublic EntityDamageS2CPacket(int int2, RegistryEntry<DamageType> registryEntry, int int3, int int4, Optional<Vec3d> optional) 
 
- 
- 
Method Details- 
writeOffsetVarInt- 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- Lacl;a(Lvl;I)V
 
- 
readOffsetVarInt- 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- Lacl;a(Lvl;)I
 
- 
write- 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- Lacl;a(Lwa;)V
 
- 
getPacketType- Specified by:
- getPacketTypein interface- Packet<ClientPlayPacketListener>
- Mappings:
- Namespace - Name - Mixin selector - named - getPacketType- Lnet/minecraft/network/packet/Packet;getPacketType()Lnet/minecraft/network/packet/PacketType;- intermediary - method_65080- Lnet/minecraft/class_2596;method_65080()Lnet/minecraft/class_9145;- official - a- Lyw;a()Lyy;
 
- 
apply- Specified by:
- applyin 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- Lacl;a(Labl;)V
 
- 
createDamageSource- 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- Lacl;a(Ldgj;)Lbtc;
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
entityIdpublic int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the entityIdrecord component
 
- 
sourceTypeReturns the value of thesourceTyperecord component.- Returns:
- the value of the sourceTyperecord component
 
- 
sourceCauseIdpublic int sourceCauseId()Returns the value of thesourceCauseIdrecord component.- Returns:
- the value of the sourceCauseIdrecord component
 
- 
sourceDirectIdpublic int sourceDirectId()Returns the value of thesourceDirectIdrecord component.- Returns:
- the value of the sourceDirectIdrecord component
 
- 
sourcePositionReturns the value of thesourcePositionrecord component.- Returns:
- the value of the sourcePositionrecord component
 
 
-