Class HangingEntity

All Implemented Interfaces:
CommandSource, EntityAccess, Nameable, ScoreHolder, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, INBTSerializable<CompoundTag>
Direct Known Subclasses:
ItemFrame, LeashFenceKnotEntity, Painting

public abstract class HangingEntity extends Entity
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • 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_31728_)
    • recalculateBoundingBox

      protected void recalculateBoundingBox()
    • offs

      private double offs(int p_31710_)
    • 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_31750_)
      Overrides:
      skipAttackInteraction in class Entity
    • getDirection

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

      public boolean hurt(DamageSource p_31715_, float p_31716_)
      Overrides:
      hurt in class Entity
    • move

      public void move(MoverType p_31719_, Vec3 p_31720_)
      Overrides:
      move in class Entity
    • push

      public void push(double p_31744_, double p_31745_, double p_31746_)
      Overrides:
      push in class Entity
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag p_31736_)
      Specified by:
      addAdditionalSaveData in class Entity
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag p_31730_)
      Specified by:
      readAdditionalSaveData in class Entity
    • getWidth

      public abstract int getWidth()
    • getHeight

      public abstract int getHeight()
    • dropItem

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

      public abstract void playPlacementSound()
    • spawnAtLocation

      public ItemEntity spawnAtLocation(ItemStack p_31722_, float p_31723_)
      Overrides:
      spawnAtLocation in class Entity
    • repositionEntityAfterLoad

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

      public void setPos(double p_31739_, double p_31740_, double p_31741_)
      Overrides:
      setPos in class Entity
    • getPos

      public BlockPos getPos()
    • rotate

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

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

      public void thunderHit(ServerLevel p_31712_, LightningBolt p_31713_)
      Overrides:
      thunderHit in class Entity
    • refreshDimensions

      public void refreshDimensions()
      Overrides:
      refreshDimensions in class Entity