Fix Persistent Ability Entities

This commit is contained in:
Kam committed 2026-02-21 04:11:28 -05:00
1 parent ef276b8145
commit 4dde214f94
5 files changed
+10 -186

No files matched your search

@@ -599,17 +599,11 @@ public class EntityEnergyDome extends EntityEnergyBarrier {
@Override
protected void readEntityFromNBT(NBTTagCompound nbt) {
readBarrierBaseNBT(nbt);
this.setDomeRadius(sanitize(nbt.getFloat("DomeRadius"), 5.0f, MAX_ENTITY_RADIUS));
this.targetDomeRadius = sanitize(nbt.hasKey("TargetDomeRadius") ? nbt.getFloat("TargetDomeRadius") : domeRadius, 5.0f, MAX_ENTITY_RADIUS);
this.followCaster = nbt.hasKey("FollowCaster") && nbt.getBoolean("FollowCaster");
// Intentionally empty — ability entities are transient (not saved to world)
}
@Override
protected void writeEntityToNBT(NBTTagCompound nbt) {
writeBarrierBaseNBT(nbt);
nbt.setFloat("DomeRadius", domeRadius);
nbt.setFloat("TargetDomeRadius", targetDomeRadius);
nbt.setBoolean("FollowCaster", followCaster);
// Intentionally empty — ability entities are transient (not saved to world)
}
}