Class AreaEffectCloud

All Implemented Interfaces:
DataComponentGetter, TypedInstance<EntityType<?>>, SyncedDataHolder, DebugValueSource, ItemOwner, SlotProvider, TraceableEntity, EntityAccess, UniquelyIdentifyable, Nameable, ScoreHolder, IAttachmentHolder, IEntityExtension

public class AreaEffectCloud extends Entity implements TraceableEntity
  • Field Details

  • Constructor Details

    • AreaEffectCloud

      public AreaEffectCloud(EntityType<? extends AreaEffectCloud> type, Level level)
    • AreaEffectCloud

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

    • defineSynchedData

      protected void defineSynchedData(SynchedEntityData.Builder entityData)
      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 contents)
    • setCustomParticle

      public void setCustomParticle(@Nullable ParticleOptions customParticle)
    • setPotionDurationScale

      public void setPotionDurationScale(float scale)
    • updateParticle

      private void updateParticle()
    • addEffect

      public void addEffect(MobEffectInstance effect)
    • getParticle

      public ParticleOptions getParticle()
    • 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 serverLevel)
    • 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

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

      protected void readAdditionalSaveData(ValueInput input)
      Specified by:
      readAdditionalSaveData in class Entity
    • addAdditionalSaveData

      protected void addAdditionalSaveData(ValueOutput output)
      Specified by:
      addAdditionalSaveData in class Entity
    • onSyncedDataUpdated

      public void onSyncedDataUpdated(EntityDataAccessor<?> accessor)
      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 level, DamageSource source, float damage)
      Specified by:
      hurtServer in class Entity
    • get

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

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

      protected <T> boolean applyImplicitComponent(DataComponentType<T> type, T value)
      Overrides:
      applyImplicitComponent in class Entity