classpublicPriority 3
DeferredCorpseRemoval
com.hypixel.hytale.server.core.modules.entity.damage.DeferredCorpseRemoval
implements Component
3
Methods
3
Public Methods
1
Fields
1
Constructors
Constructors
public
DeferredCorpseRemoval(double timeUntilCorpseRemoval)Methods
Public Methods (3)
public
Component<EntityStore> clone()@Nonnull@Override
publicstatic
ComponentType<EntityStore, DeferredCorpseRemoval> getComponentType()public
boolean tick(float dt)Fields
Protected Fields (1)
protected
double timeRemainingInheritance
Parent
Current
Interface
Child
Use mouse wheel to zoom, drag to pan. Click nodes to navigate.
Related Classes
Source Code
package com.hypixel.hytale.server.core.modules.entity.damage;
import com.hypixel.hytale.component.Component;
import com.hypixel.hytale.component.ComponentType;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import javax.annotation.Nonnull;
public class DeferredCorpseRemoval implements Component<EntityStore> {
protected double timeRemaining;
public static ComponentType<EntityStore, DeferredCorpseRemoval> getComponentType() {
return DamageModule.get().getDeferredCorpseRemovalComponentType();
}
public DeferredCorpseRemoval(double timeUntilCorpseRemoval) {
this.timeRemaining = timeUntilCorpseRemoval;
}
public boolean tick(float dt) {
return (this.timeRemaining -= (double)dt) <= 0.0;
}
@Nonnull
@Override
public Component<EntityStore> clone() {
return new DeferredCorpseRemoval(this.timeRemaining);
}
}