mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-27 03:52:55 +00:00
Scripting Ability Handling Improvement and Copy Data
This commit is contained in:
1 parent
50fd3c1856
commit
90735e6866
14 files changed
+71
-30
No files matched your search
@@ -50,10 +50,11 @@ public class EntityAbilityDome extends EntityAbilityBarrier {
|
||||
this.stepHeight = 0.0F;
|
||||
this.ownerEntityId = owner.getEntityId();
|
||||
this.setDomeRadius(domeRadius);
|
||||
this.displayData = display;
|
||||
this.lightningData = lightning;
|
||||
this.barrierData = barrier;
|
||||
this.currentHealth = barrier.maxHealth;
|
||||
// Defensive copy: entities must never share data objects with the source ability.
|
||||
this.displayData = display != null ? display.copy() : new EnergyDisplayData();
|
||||
this.lightningData = lightning != null ? lightning.copy() : new EnergyLightningData();
|
||||
this.barrierData = barrier != null ? barrier.copy() : new EnergyBarrierData();
|
||||
this.currentHealth = this.barrierData.maxHealth;
|
||||
this.setPosition(x, y, z);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user