Class HangingEntity

All Implemented Interfaces:
ICommandSource, INameable, ICapabilityProvider, ICapabilitySerializable<CompoundNBT>, IForgeEntity, INBTSerializable<CompoundNBT>
Direct Known Subclasses:
ItemFrameEntity, LeashKnotEntity, PaintingEntity

public abstract class HangingEntity extends Entity
  • Field Details

    • HANGING_ENTITY

      protected static final Predicate<Entity> HANGING_ENTITY
    • checkInterval

      private int checkInterval
    • pos

      protected BlockPos pos
    • direction

      protected Direction direction
  • Constructor Details

  • Method Details

    • defineSynchedData

      protected void defineSynchedData()
      Specified by:
      defineSynchedData in class Entity
    • setDirection

      protected void setDirection(Direction p_174859_1_)
    • recalculateBoundingBox

      protected void recalculateBoundingBox()
    • offs

      private double offs(int p_190202_1_)
    • tick

      public void tick()
      Overrides:
      tick in class Entity
    • survives

      public boolean survives()
    • isPickable

      public boolean isPickable()
      Overrides:
      isPickable in class Entity
    • skipAttackInteraction

      public boolean skipAttackInteraction(Entity p_85031_1_)
      Overrides:
      skipAttackInteraction in class Entity
    • getDirection

      public Direction getDirection()
      Overrides:
      getDirection in class Entity
    • hurt

      public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
      Overrides:
      hurt in class Entity
    • move

      public void move(MoverType p_213315_1_, Vector3d p_213315_2_)
      Overrides:
      move in class Entity
    • push

      public void push(double p_70024_1_, double p_70024_3_, double p_70024_5_)
      Overrides:
      push in class Entity
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundNBT p_213281_1_)
      Specified by:
      addAdditionalSaveData in class Entity
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundNBT p_70037_1_)
      Specified by:
      readAdditionalSaveData in class Entity
    • getWidth

      public abstract int getWidth()
    • getHeight

      public abstract int getHeight()
    • dropItem

      public abstract void dropItem(@Nullable Entity p_110128_1_)
    • playPlacementSound

      public abstract void playPlacementSound()
    • spawnAtLocation

      public ItemEntity spawnAtLocation(ItemStack p_70099_1_, float p_70099_2_)
      Overrides:
      spawnAtLocation in class Entity
    • repositionEntityAfterLoad

      protected boolean repositionEntityAfterLoad()
      Overrides:
      repositionEntityAfterLoad in class Entity
    • setPos

      public void setPos(double p_70107_1_, double p_70107_3_, double p_70107_5_)
      Overrides:
      setPos in class Entity
    • getPos

      public BlockPos getPos()
    • rotate

      public float rotate(Rotation p_184229_1_)
      Overrides:
      rotate in class Entity
    • mirror

      public float mirror(Mirror p_184217_1_)
      Overrides:
      mirror in class Entity
    • thunderHit

      public void thunderHit(ServerWorld p_241841_1_, LightningBoltEntity p_241841_2_)
      Overrides:
      thunderHit in class Entity
    • refreshDimensions

      public void refreshDimensions()
      Overrides:
      refreshDimensions in class Entity