Add energy projectile types and events: implement IEnergyOrb, IEnergyBeam, IEnergyDisc, and IEnergyLaser interfaces, along with their respective script handlers and event hooks

This commit is contained in:
Kam committed 2026-02-16 01:03:05 -05:00
1 parent 66fff09d20
commit efa8721d36
10 files changed
+402 -5

No files matched your search

+46
View File
@@ -1,6 +1,10 @@
package noppes.npcs.api;
import net.minecraft.world.WorldServer;
import noppes.npcs.api.entity.IEnergyBeam;
import noppes.npcs.api.entity.IEnergyDisc;
import noppes.npcs.api.entity.IEnergyLaser;
import noppes.npcs.api.entity.IEnergyOrb;
import noppes.npcs.api.entity.IEntity;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.handler.data.ISound;
@@ -445,5 +449,47 @@ public interface IWorld {
*/
int getDimensionID();
/**
* Creates an energy orb projectile. Not spawned until fire() is called.
* @param owner The entity that owns this projectile
* @param x Spawn X position
* @param y Spawn Y position
* @param z Spawn Z position
* @param size Orb size
*/
IEnergyOrb createEnergyOrb(IEntity owner, double x, double y, double z, float size);
/**
* Creates an energy beam projectile. Not spawned until fire() is called.
* @param owner The entity that owns this projectile
* @param x Spawn X position
* @param y Spawn Y position
* @param z Spawn Z position
* @param beamWidth Width of the beam
* @param headSize Size of the beam head
*/
IEnergyBeam createEnergyBeam(IEntity owner, double x, double y, double z, float beamWidth, float headSize);
/**
* Creates an energy disc projectile. Not spawned until fire() is called.
* @param owner The entity that owns this projectile
* @param x Spawn X position
* @param y Spawn Y position
* @param z Spawn Z position
* @param radius Disc radius
* @param thickness Disc thickness
*/
IEnergyDisc createEnergyDisc(IEntity owner, double x, double y, double z, float radius, float thickness);
/**
* Creates an energy laser projectile. Not spawned until fire() is called.
* @param owner The entity that owns this projectile
* @param x Spawn X position
* @param y Spawn Y position
* @param z Spawn Z position
* @param laserWidth Width of the laser
*/
IEnergyLaser createEnergyLaser(IEntity owner, double x, double y, double z, float laserWidth);
void broadcast(String message);
}