Added Scripting Projectile and Barrier Syncing

This commit is contained in:
Kam committed 2026-03-08 22:49:34 -04:00
1 parent ed176cfaf5
commit 182f7d8c9c
15 files changed
+440 -2

No files matched your search

@@ -140,4 +140,12 @@ public class ScriptEnergyBarrier<T extends EntityEnergyBarrier> extends ScriptEn
public int getBarrierType() {
return entity instanceof EntityEnergyDome ? 0 : 1;
}
// ==================== SYNC ====================
public void syncClient() {
if (entity.addedToChunk) {
entity.sendClientSync();
}
}
}
@@ -353,12 +353,20 @@ public class ScriptEnergyProjectile<T extends EntityEnergyProjectile> extends Sc
}
}
public void syncClient() {
if (entity.addedToChunk) {
entity.sendClientSync();
}
}
protected void ensureSpawned() {
if (!entity.addedToChunk && entity.worldObj != null) {
entity.worldObj.spawnEntityInWorld(entity);
if (!entity.worldObj.isRemote) {
EventHooks.onEnergyProjectileFired(entity);
}
} else if (entity.addedToChunk) {
entity.sendClientSync();
}
}