mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-17 15:45:13 +00:00
Added Scripting Projectile and Barrier Syncing
This commit is contained in:
1 parent
fff8a25e0e
commit
a6c55ca331
2 files changed
+43
No files matched your search
@@ -65,4 +65,22 @@ public interface IEnergyBarrier<T extends Entity> extends IEnergyAbility<T> {
|
||||
* Returns the barrier type: 0=Dome, 1=Panel
|
||||
*/
|
||||
int getBarrierType();
|
||||
|
||||
// ==================== SYNC ====================
|
||||
|
||||
/**
|
||||
* Sends all current visual and barrier-specific data to tracking clients.
|
||||
* <p>
|
||||
* Call this <b>after</b> making batch changes to properties like colors, alpha,
|
||||
* lightning, dome radius, panel dimensions, etc. This sends a single packet
|
||||
* instead of one per setter call.
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>
|
||||
* dome.setInnerColor(0xFF0000);
|
||||
* dome.setDomeRadius(5.0);
|
||||
* dome.syncClient(); // one packet for all changes
|
||||
* </pre>
|
||||
*/
|
||||
void syncClient();
|
||||
}
|
||||
@@ -174,6 +174,31 @@ public interface IEnergyProjectile<T extends Entity> extends IEnergyAbility<T> {
|
||||
*/
|
||||
int getEnergyType();
|
||||
|
||||
// ==================== SYNC ====================
|
||||
|
||||
/**
|
||||
* Sends all current visual, movement, and position data to tracking clients.
|
||||
* <p>
|
||||
* Call this <b>after</b> making batch changes to properties like size, speed,
|
||||
* homing, colors, or type-specific fields (beam width, disc radius, etc.).
|
||||
* This avoids sending a separate packet for every setter call.
|
||||
* <p>
|
||||
* <b>Note:</b> {@code fireAt()}, {@code fireDirection()}, and {@code fireFrom()}
|
||||
* automatically sync motion when called on an already-spawned projectile,
|
||||
* so you do not need to call {@code syncClient()} after firing.
|
||||
* Use this method when changing properties that affect rendering or movement
|
||||
* behavior without re-firing.
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>
|
||||
* orb.setSize(2.0);
|
||||
* orb.setSpeed(0.5);
|
||||
* orb.setInnerColor(0xFF0000);
|
||||
* orb.syncClient(); // one packet for all changes
|
||||
* </pre>
|
||||
*/
|
||||
void syncClient();
|
||||
|
||||
// ==================== FIRE / LAUNCH ====================
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user