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 pLevel, double pX, double pY, double pZ)
  • Method Details

    • defineSynchedData

      protected void defineSynchedData(SynchedEntityData.Builder p_326332_)
      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 pPotionContents)
    • setPotionDurationScale

      public void setPotionDurationScale(float pPotionDurationScale)
    • updateColor

      private void updateColor()
    • addEffect

      public void addEffect(MobEffectInstance pEffectInstance)
    • getParticle

      public ParticleOptions getParticle()
    • setParticle

      public void setParticle(ParticleOptions pParticleOption)
    • 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
    • clientTick

      private void clientTick()
    • serverTick

      private void serverTick(ServerLevel pLevel)
    • 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
    • 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