DeferredCorpseRemoval class

Пакет: com.hypixel.hytale.server.core.modules.entity.damage

Файл: com/hypixel/hytale/server/core/modules/entity/damage/DeferredCorpseRemoval.java

implements: Component<EntityStore>

Поля (1)

МодификаторыТипИмя
protected double timeRemaining

Методы (3)

МодификаторыВозвратСигнатура
static ComponentType<EntityStore, DeferredCorpseRemoval> getComponentTypeComponentType<EntityStore, DeferredCorpseRemoval> getComponentType()
public boolean shouldRemoveboolean shouldRemove()
public void tickvoid tick(float var1)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.modules.entity.damage;

class="kw">import com.hypixel.hytale.component.Component;
class="kw">import com.hypixel.hytale.component.ComponentType;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;

class="kw">public class DeferredCorpseRemoval class="kw">implements Component<EntityStore> {
   class="kw">protected double timeRemaining;
   @Nullable
   class="kw">protected String deathParticles;

   class="kw">public class="kw">static ComponentType<EntityStore, DeferredCorpseRemoval> getComponentType() {
      class="kw">return DamageModule.get().getDeferredCorpseRemovalComponentType();
   }

   class="kw">public DeferredCorpseRemoval(double var1, @Nullable String var3) {
      this.timeRemaining = var1;
      this.deathParticles = var3;
   }

   class="kw">public void tick(float var1) {
      this.timeRemaining -= var1;
   }

   class="kw">public boolean shouldRemove() {
      class="kw">return this.timeRemaining <= 0.0;
   }

   @Nullable
   class="kw">public String getDeathParticles() {
      class="kw">return this.deathParticles;
   }

   @Nonnull
   @Override
   class="kw">public Component<EntityStore> clone() {
      class="kw">return new DeferredCorpseRemoval(this.timeRemaining, this.deathParticles);
   }
}