diff --git a/java/noppes/npcs/api/entity/IEnergyBarrier.java b/java/noppes/npcs/api/entity/IEnergyBarrier.java index 44f2ddd..36999cf 100644 --- a/java/noppes/npcs/api/entity/IEnergyBarrier.java +++ b/java/noppes/npcs/api/entity/IEnergyBarrier.java @@ -65,4 +65,22 @@ public interface IEnergyBarrier extends IEnergyAbility { * Returns the barrier type: 0=Dome, 1=Panel */ int getBarrierType(); + + // ==================== SYNC ==================== + + /** + * Sends all current visual and barrier-specific data to tracking clients. + *

+ * Call this after 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. + *

+ * Example: + *

+     * dome.setInnerColor(0xFF0000);
+     * dome.setDomeRadius(5.0);
+     * dome.syncClient(); // one packet for all changes
+     * 
+ */ + void syncClient(); } diff --git a/java/noppes/npcs/api/entity/IEnergyProjectile.java b/java/noppes/npcs/api/entity/IEnergyProjectile.java index 4168f9d..0a339e3 100644 --- a/java/noppes/npcs/api/entity/IEnergyProjectile.java +++ b/java/noppes/npcs/api/entity/IEnergyProjectile.java @@ -174,6 +174,31 @@ public interface IEnergyProjectile extends IEnergyAbility { */ int getEnergyType(); + // ==================== SYNC ==================== + + /** + * Sends all current visual, movement, and position data to tracking clients. + *

+ * Call this after 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. + *

+ * Note: {@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. + *

+ * Example: + *

+     * orb.setSize(2.0);
+     * orb.setSpeed(0.5);
+     * orb.setInnerColor(0xFF0000);
+     * orb.syncClient(); // one packet for all changes
+     * 
+ */ + void syncClient(); + // ==================== FIRE / LAUNCH ==================== /**