diff --git a/java/noppes/npcs/api/AbstractNpcAPI.java b/java/noppes/npcs/api/AbstractNpcAPI.java index 9344a3d..e5b377f 100644 --- a/java/noppes/npcs/api/AbstractNpcAPI.java +++ b/java/noppes/npcs/api/AbstractNpcAPI.java @@ -276,6 +276,8 @@ public abstract class AbstractNpcAPI { public abstract IDamageSource getIDamageSource(IEntity entity); + public abstract IEnergyController getEnergyController(); + public abstract EventBus events(); public abstract File getGlobalDir(); diff --git a/java/noppes/npcs/api/entity/IEnergyAbility.java b/java/noppes/npcs/api/entity/IEnergyAbility.java index d37219e..f0e37e4 100644 --- a/java/noppes/npcs/api/entity/IEnergyAbility.java +++ b/java/noppes/npcs/api/entity/IEnergyAbility.java @@ -1,6 +1,7 @@ package noppes.npcs.api.entity; import net.minecraft.entity.Entity; +import noppes.npcs.api.INbt; /** * Base interface for all energy ability entities (Projectiles, Barriers). @@ -93,4 +94,20 @@ public interface IEnergyAbility extends IEntity { /** @param ignore Whether this entity should ignore target invulnerability frames when dealing damage. */ void setIgnoreIFrames(boolean ignore); + + // ==================== CUSTOM DAMAGE DATA ==================== + + /** + * Get the custom damage data attached to this energy entity. + * Used by addon handlers (e.g. DBC Addon) to carry damage configuration + * directly on the entity, enabling DBC damage scaling without a sourceAbility. + * @return Custom damage data as INbt, or null if none set. + */ + INbt getDamageData(); + + /** + * Set custom damage data on this energy entity. + * @param data Custom damage data as INbt. Pass null to clear. + */ + void setDamageData(INbt data); } diff --git a/java/noppes/npcs/api/entity/IEnergyPanel.java b/java/noppes/npcs/api/entity/IEnergyPanel.java index 122dab3..6371973 100644 --- a/java/noppes/npcs/api/entity/IEnergyPanel.java +++ b/java/noppes/npcs/api/entity/IEnergyPanel.java @@ -17,10 +17,17 @@ public interface IEnergyPanel extends IEnergyBarrier { float getPanelYaw(); + void setPanelYaw(float yaw); + /** * Panel mode: 0=PLACED, 1=HELD, 2=LAUNCHED */ int getPanelMode(); + void setPanelMode(int mode); + boolean isLaunched(); + + /** Spawn this panel entity into the world. */ + void spawn(); }