mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 01:32:19 +00:00
Added Scripting Projectile and Barrier Syncing
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user