Class OtherClientPlayerEntity

All Implemented Interfaces:
Attackable, DataTracked, ScoreHolder, CommandOutput, Nameable, EntityLike

@Environment(CLIENT) public class OtherClientPlayerEntity extends AbstractClientPlayerEntity
Represents a player entity that is present on the client but is not the client's own player.
Mappings:
Namespace Name
named net/minecraft/client/network/OtherClientPlayerEntity
intermediary net/minecraft/class_745
official gdi
  • Field Details

    • clientVelocity

      private Vec3d clientVelocity
      Mappings:
      Namespace Name Mixin selector
      named clientVelocity Lnet/minecraft/client/network/OtherClientPlayerEntity;clientVelocity:Lnet/minecraft/util/math/Vec3d;
      intermediary field_42907 Lnet/minecraft/class_745;field_42907:Lnet/minecraft/class_243;
      official g Lgdi;g:Lewh;
    • velocityLerpDivisor

      private int velocityLerpDivisor
      Mappings:
      Namespace Name Mixin selector
      named velocityLerpDivisor Lnet/minecraft/client/network/OtherClientPlayerEntity;velocityLerpDivisor:I
      intermediary field_42908 Lnet/minecraft/class_745;field_42908:I
      official h Lgdi;h:I
  • Constructor Details

    • OtherClientPlayerEntity

      public OtherClientPlayerEntity(ClientWorld world, com.mojang.authlib.GameProfile profile)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/network/AbstractClientPlayerEntity;<init>(Lnet/minecraft/client/world/ClientWorld;Lcom/mojang/authlib/GameProfile;)V
      intermediary <init> Lnet/minecraft/class_742;<init>(Lnet/minecraft/class_638;Lcom/mojang/authlib/GameProfile;)V
      official <init> Lgde;<init>(Lfyl;Lcom/mojang/authlib/GameProfile;)V
  • Method Details

    • shouldRender

      public boolean shouldRender(double distance)
      Overrides:
      shouldRender in class Entity
      Mappings:
      Namespace Name Mixin selector
      named shouldRender Lnet/minecraft/entity/Entity;shouldRender(D)Z
      intermediary method_5640 Lnet/minecraft/class_1297;method_5640(D)Z
      official a Lbsh;a(D)Z
    • damage

      public boolean damage(DamageSource source, float amount)
      Applies a damage to this entity. The exact implementation differs between subclasses.

      invalid reference
      LivingEntity
      has health value, and damaging the entity decreases it. This also handles shields, extra damage to helmets for falling blocks, setting the attacker, playing hurt sound, etc.

      Some entities like

      invalid reference
      ItemEntity
      also have health value, which the overridden method decrements. There also exist several entities, like EndCrystalEntity, where any damage discards the entity (perhaps with an explosion).

      If this is overridden, it must check the result of PlayerEntity.isInvulnerableTo(net.minecraft.entity.damage.DamageSource) and return early.

      Overrides:
      damage in class PlayerEntity
      Returns:
      whether the entity was actually damaged
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named damage Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/damage/DamageSource;F)Z
      intermediary method_5643 Lnet/minecraft/class_1297;method_5643(Lnet/minecraft/class_1282;F)Z
      official a Lbsh;a(Lbra;F)Z
    • tick

      public void tick()
      Ticks this entity.
      Overrides:
      tick in class AbstractClientPlayerEntity
      See Also:
      API Note:
      This can be overridden to add additional logics. super.tick(); should be called in those cases.
      Implementation Note:
      By default, this delegates all logics to LivingEntity.baseTick().
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/entity/Entity;tick()V
      intermediary method_5773 Lnet/minecraft/class_1297;method_5773()V
      official l Lbsh;l()V
    • tickMovement

      public void tickMovement()
      Overrides:
      tickMovement in class PlayerEntity
      Mappings:
      Namespace Name Mixin selector
      named tickMovement Lnet/minecraft/entity/LivingEntity;tickMovement()V
      intermediary method_6007 Lnet/minecraft/class_1309;method_6007()V
      official m_ Lbtc;m_()V
    • setVelocityClient

      public void setVelocityClient(double x, double y, double z)
      Overrides:
      setVelocityClient in class Entity
      Mappings:
      Namespace Name Mixin selector
      named setVelocityClient Lnet/minecraft/entity/Entity;setVelocityClient(DDD)V
      intermediary method_5750 Lnet/minecraft/class_1297;method_5750(DDD)V
      official l Lbsh;l(DDD)V
    • updatePose

      protected void updatePose()
      Overrides:
      updatePose in class PlayerEntity
      Mappings:
      Namespace Name Mixin selector
      named updatePose Lnet/minecraft/entity/player/PlayerEntity;updatePose()V
      intermediary method_7318 Lnet/minecraft/class_1657;method_7318()V
      official fT Lcml;fT()V
    • sendMessage

      public void sendMessage(Text message)
      Sends a system message.
      Specified by:
      sendMessage in interface CommandOutput
      Overrides:
      sendMessage in class Entity
      Implementation Note:
      The output location depends on the implementation; players will use the in-game chat, and others will output to the log.
      Mappings:
      Namespace Name Mixin selector
      named sendMessage Lnet/minecraft/server/command/CommandOutput;sendMessage(Lnet/minecraft/text/Text;)V
      intermediary method_43496 Lnet/minecraft/class_2165;method_43496(Lnet/minecraft/class_2561;)V
      official a Lep;a(Lwu;)V
    • onSpawnPacket

      public void onSpawnPacket(EntitySpawnS2CPacket packet)
      Called on the client when the entity receives a spawn packet.

      This sets the entity's position, angles, ID, and UUID. Subclasses can override this to initialize additional fields.

      Overrides:
      onSpawnPacket in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named onSpawnPacket Lnet/minecraft/entity/Entity;onSpawnPacket(Lnet/minecraft/network/packet/s2c/play/EntitySpawnS2CPacket;)V
      intermediary method_31471 Lnet/minecraft/class_1297;method_31471(Lnet/minecraft/class_2604;)V
      official a Lbsh;a(Labo;)V