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> 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 pPotionContents)
    • setCustomParticle

      public void setCustomParticle(@Nullable ParticleOptions pCustomParticle)
    • setPotionDurationScale

      public void setPotionDurationScale(float pPotionDurationScale)
    • updateParticle

      private void updateParticle()
    • addEffect

      public void addEffect(MobEffectInstance pEffectInstance)
    • getParticle

      public ParticleOptions getParticle()
    • 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(ValueInput pInput)
      Specified by:
      readAdditionalSaveData in class Entity
    • addAdditionalSaveData

      protected void addAdditionalSaveData(ValueOutput pOutput)
      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 pLevel, DamageSource pDamageSource, float pAmount)
      Specified by:
      hurtServer in class Entity
    • get

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

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

      protected <T> boolean applyImplicitComponent(DataComponentType<T> pComponent, T pValue)
      Overrides:
      applyImplicitComponent in class Entity