Class AreaEffectCloud

All Implemented Interfaces:
DataComponentGetter, SyncedDataHolder, TraceableEntity, EntityAccess, UniquelyIdentifyable, Nameable, ScoreHolder, IAttachmentHolder, IEntityExtension

public class AreaEffectCloud extends Entity implements TraceableEntity
  • Field Details

  • Constructor Details

    • AreaEffectCloud

      public AreaEffectCloud(EntityType<? extends AreaEffectCloud> p_19704_, Level p_19705_)
    • AreaEffectCloud

      public AreaEffectCloud(Level level, double x, double y, double z)
  • Method Details

    • defineSynchedData

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

      public void setRadius(float radius)
    • refreshDimensions

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

      public float getRadius()
    • setPotionContents

      public void setPotionContents(PotionContents potionContents)
    • setPotionDurationScale

      public void setPotionDurationScale(float potionDurationScale)
    • updateColor

      private void updateColor()
    • addEffect

      public void addEffect(MobEffectInstance effectInstance)
    • getParticle

      public ParticleOptions getParticle()
    • setParticle

      public void setParticle(ParticleOptions particleOption)
    • setWaiting

      protected void setWaiting(boolean waiting)
      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 duration)
    • tick

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

      private void clientTick()
    • serverTick

      private void serverTick(ServerLevel level)
    • getRadiusOnUse

      public float getRadiusOnUse()
    • setRadiusOnUse

      public void setRadiusOnUse(float radiusOnUse)
    • getRadiusPerTick

      public float getRadiusPerTick()
    • setRadiusPerTick

      public void setRadiusPerTick(float radiusPerTick)
    • getDurationOnUse

      public int getDurationOnUse()
    • setDurationOnUse

      public void setDurationOnUse(int durationOnUse)
    • getWaitTime

      public int getWaitTime()
    • setWaitTime

      public void setWaitTime(int waitTime)
    • setOwner

      public void setOwner(@Nullable LivingEntity owner)
    • getOwner

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

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

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

      public void onSyncedDataUpdated(EntityDataAccessor<?> key)
      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 pose)
      Overrides:
      getDimensions in class Entity
    • hurtServer

      public final boolean hurtServer(ServerLevel p_376207_, DamageSource p_376186_, float p_376930_)
      Specified by:
      hurtServer in class Entity
    • get

      @Nullable public <T> T get(DataComponentType<? extends T> p_400140_)
      Specified by:
      get in interface DataComponentGetter
      Overrides:
      get in class Entity
    • applyImplicitComponents

      protected void applyImplicitComponents(DataComponentGetter p_400159_)
      Overrides:
      applyImplicitComponents in class Entity
    • applyImplicitComponent

      protected <T> boolean applyImplicitComponent(DataComponentType<T> p_400217_, T p_399556_)
      Overrides:
      applyImplicitComponent in class Entity