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

@@ -865,6 +865,28 @@ public class EntityAbilityLaser extends EntityEnergyProjectile {
if (nbt.hasKey("MaxLength")) maxLength = nbt.getFloat("MaxLength");
}
// ==================== PROPERTY SYNC ====================
@Override
protected void writeProjectileClientSyncData(NBTTagCompound nbt) {
nbt.setFloat("LaserWidth", laserWidth);
nbt.setFloat("ExpansionSpeed", expansionSpeed);
nbt.setFloat("MaxLength", maxLength);
nbt.setDouble("DirX", dirX);
nbt.setDouble("DirY", dirY);
nbt.setDouble("DirZ", dirZ);
}
@Override
protected void applyProjectileClientSyncData(NBTTagCompound nbt) {
laserWidth = nbt.getFloat("LaserWidth");
expansionSpeed = nbt.getFloat("ExpansionSpeed");
maxLength = nbt.getFloat("MaxLength");
dirX = nbt.getDouble("DirX");
dirY = nbt.getDouble("DirY");
dirZ = nbt.getDouble("DirZ");
}
// ==================== NBT ====================
@Override