net.minecraft.network.packet.s2c.play

public record EntityDamageS2CPacket

implements Packet<ClientPlayPacketListener>

net.minecraft.network.protocol.game.ClientboundDamageEventPacket
net.minecraft.class_8143
net.minecraft.network.packet.s2c.play.EntityDamageS2CPacket

Field summary

Modifier and TypeField
private final int
entityId
comp_1267
entityId
private final RegistryEntry<DamageType>
sourceType
comp_1268
sourceType
private final int
sourceCauseId
comp_1269
sourceCauseId
private final int
sourceDirectId
comp_1270
sourceDirectId
private final Optional<Vec3d>
sourcePosition
comp_1271
sourcePosition
public static final PacketCodec<RegistryByteBuf, EntityDamageS2CPacket>
STREAM_CODEC
field_47921
CODEC

Constructor summary

ModifierConstructor
public (Entity entity, DamageSource damageSource)
private (RegistryByteBuf buf)
public (int entityId, RegistryEntry<DamageType> sourceType, int sourceCauseId, int sourceDirectId, Optional<Vec3d> sourcePosition)

Method summary

Modifier and TypeMethod
private static void
writeOptionalEntityId(FriendlyByteBuf output, int id)
method_49072(class_2540 arg0, int arg1)
writeOffsetVarInt(PacketByteBuf buf, int value)
private static int
readOptionalEntityId(FriendlyByteBuf input)
method_49075(class_2540 arg0)
readOffsetVarInt(PacketByteBuf buf)
private void
write(RegistryFriendlyByteBuf output)
method_55873(class_9129 arg0)
write(RegistryByteBuf buf)
public PacketType<EntityDamageS2CPacket>
type()
method_65080()
getPacketType()
public void
handle(ClientGamePacketListener listener)
method_49074(class_2602 arg0)
apply(ClientPlayPacketListener arg0)
public DamageSource
getSource(Level level)
method_49071(class_1937 arg0)
createDamageSource(World world)
public int
entityId()
comp_1267()
entityId()
public RegistryEntry<DamageType>
sourceType()
comp_1268()
sourceType()
public int
sourceCauseId()
comp_1269()
sourceCauseId()
public int
sourceDirectId()
comp_1270()
sourceDirectId()
public Optional<Vec3d>
sourcePosition()
comp_1271()
sourcePosition()
public void
handle(PacketListener listener)
method_65081(class_2547 arg0)
apply(PacketListener arg0)
private static void
lambda$write$0(FriendlyByteBuf arg0, Vec3 arg1)
method_49073(class_2540 arg0, class_243 arg1)
method_49073(PacketByteBuf bufx, Vec3d pos)
private static Vec3d
lambda$new$0(FriendlyByteBuf arg0)
method_49076(class_2540 arg0)
method_49076(PacketByteBuf pos)