mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 00:09:41 +00:00
Fix Persistent Ability Entities
This commit is contained in:
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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user