Class AreaEffectCloud

All Implemented Interfaces:
CommandSource, SyncedDataHolder, TraceableEntity, EntityAccess, Nameable, ScoreHolder, IAttachmentHolder, IEntityExtension, INBTSerializable<CompoundTag>

public class AreaEffectCloud extends Entity implements TraceableEntity
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • TIME_BETWEEN_APPLICATIONS

      private static final int TIME_BETWEEN_APPLICATIONS
      See Also:
    • DATA_RADIUS

      private static final EntityDataAccessor<Float> DATA_RADIUS
    • DATA_WAITING

      private static final EntityDataAccessor<Boolean> DATA_WAITING
    • DATA_PARTICLE

      private static final EntityDataAccessor<ParticleOptions> DATA_PARTICLE
    • MAX_RADIUS

      private static final float MAX_RADIUS
      See Also:
    • MINIMAL_RADIUS

      private static final float MINIMAL_RADIUS
      See Also:
    • DEFAULT_RADIUS

      private static final float DEFAULT_RADIUS
      See Also:
    • DEFAULT_WIDTH

      public static final float DEFAULT_WIDTH
      See Also:
    • HEIGHT

      public static final float HEIGHT
      See Also:
    • potionContents

      private PotionContents potionContents
    • victims

      private final Map<Entity,Integer> victims
    • duration

      private int duration
    • waitTime

      private int waitTime
    • reapplicationDelay

      private int reapplicationDelay
    • durationOnUse

      private int durationOnUse
    • radiusOnUse

      private float radiusOnUse
    • radiusPerTick

      private float radiusPerTick
    • owner

      @Nullable private LivingEntity owner
    • ownerUUID

      @Nullable private UUID ownerUUID
  • Constructor Details

    • AreaEffectCloud

      public AreaEffectCloud(EntityType<? extends AreaEffectCloud> pEntityType, Level pLevel)
    • AreaEffectCloud

      public AreaEffectCloud(Level pLevel, double pX, double pY, double pZ)
  • Method Details

    • defineSynchedData

      protected void defineSynchedData(SynchedEntityData.Builder pBuilder)
      Specified by:
      defineSynchedData in class Entity
    • setRadius

      public void setRadius(float pRadius)
    • refreshDimensions

      public void refreshDimensions()
      Overrides:
      refreshDimensions in class Entity
    • getRadius

      public float getRadius()
    • setPotionContents

      public void setPotionContents(PotionContents p_330869_)
    • updateColor

      private void updateColor()
    • addEffect

      public void addEffect(MobEffectInstance pEffectInstance)
    • getParticle

      public ParticleOptions getParticle()
    • setParticle

      public void setParticle(ParticleOptions p_19725_)
    • setWaiting

      protected void setWaiting(boolean pWaiting)
      Sets if the cloud is waiting. While waiting, the radius is ignored and the cloud shows fewer particles in its area.
    • isWaiting

      public boolean isWaiting()
    • getDuration

      public int getDuration()
    • setDuration

      public void setDuration(int pDuration)
    • tick

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

      public float getRadiusOnUse()
    • setRadiusOnUse

      public void setRadiusOnUse(float pRadiusOnUse)
    • getRadiusPerTick

      public float getRadiusPerTick()
    • setRadiusPerTick

      public void setRadiusPerTick(float pRadiusPerTick)
    • getDurationOnUse

      public int getDurationOnUse()
    • setDurationOnUse

      public void setDurationOnUse(int pDurationOnUse)
    • getWaitTime

      public int getWaitTime()
    • setWaitTime

      public void setWaitTime(int pWaitTime)
    • setOwner

      public void setOwner(@Nullable LivingEntity pOwner)
    • getOwner

      @Nullable public LivingEntity getOwner()
      Specified by:
      getOwner in interface TraceableEntity
    • readAdditionalSaveData

      protected void readAdditionalSaveData(CompoundTag pCompound)
      (abstract) Protected helper method to read subclass entity data from NBT.
      Specified by:
      readAdditionalSaveData in class Entity
    • addAdditionalSaveData

      protected void addAdditionalSaveData(CompoundTag pCompound)
      Specified by:
      addAdditionalSaveData in class Entity
    • onSyncedDataUpdated

      public void onSyncedDataUpdated(EntityDataAccessor<?> pKey)
      Specified by:
      onSyncedDataUpdated in interface SyncedDataHolder
      Overrides:
      onSyncedDataUpdated in class Entity
    • getPistonPushReaction

      public PushReaction getPistonPushReaction()
      Overrides:
      getPistonPushReaction in class Entity
    • getDimensions

      public EntityDimensions getDimensions(Pose pPose)
      Overrides:
      getDimensions in class Entity