DamageMemory.java
package com.hypixel.hytale.builtin.npccombatactionevaluator.memory;
import com.hypixel.hytale.builtin.npccombatactionevaluator.NPCCombatActionEvaluatorPlugin;
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 DamageMemory implements Component<EntityStore> {
private float recentDamage;
private float totalCombatDamage;
public DamageMemory() {
}
public static ComponentType<EntityStore, DamageMemory> getComponentType() {
return NPCCombatActionEvaluatorPlugin.get().getDamageMemoryComponentType();
}
public float getRecentDamage() {
return this.recentDamage;
}
public float getTotalCombatDamage() {
return this.totalCombatDamage;
}
public void {
.totalCombatDamage += damage;
.recentDamage += damage;
}
{
.recentDamage = ;
}
{
.totalCombatDamage = ;
.clearRecentDamage();
}
Component<EntityStore> {
();
damageMemory.recentDamage = .recentDamage;
damageMemory.totalCombatDamage = .totalCombatDamage;
damageMemory;
}
String {
.recentDamage;
+ var10000 + + .totalCombatDamage + + .toString();
}
}