mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 02:12:19 +00:00
Refactor ability management: enhance deep copy functionality, streamline custom ability handling, and update versioning logic
This commit is contained in:
1 parent
e1eda3ce19
commit
da4ee2e20d
3 files changed
+211
-347
No files matched your search
@@ -1139,7 +1139,7 @@ public abstract class Ability implements IAbility {
|
||||
nbt.setBoolean("showTelegraph", showTelegraph);
|
||||
nbt.setString("telegraphType", telegraphType.name());
|
||||
nbt.setFloat("telegraphHeightOffset", telegraphHeightOffset);
|
||||
nbt.setTag("customData", customData);
|
||||
nbt.setTag("customData", (NBTTagCompound) customData.copy());
|
||||
nbt.setInteger("allowedBy", allowedBy.ordinal());
|
||||
nbt.setBoolean("ignoreCooldown", ignoreCooldown);
|
||||
|
||||
@@ -1264,6 +1264,10 @@ public abstract class Ability implements IAbility {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Ability deepCopy() {
|
||||
return AbilityController.Instance.fromNBT(this.writeNBT());
|
||||
}
|
||||
|
||||
public boolean isNpcInlineEdit() {
|
||||
return npcInlineEdit;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user