mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 21:20:04 +00:00
Add Ignore I-Frames to Abilities
This commit is contained in:
1 parent
f6a8edfef1
commit
a077c7b32f
14 files changed
+175
-160
No files matched your search
@@ -43,6 +43,7 @@ public abstract class EntityEnergyAbility extends Entity implements IEntityAddit
|
||||
* The ability that spawned this entity. Transient, not saved to NBT.
|
||||
*/
|
||||
protected transient Ability sourceAbility = null;
|
||||
protected boolean ignoreIFrames = false;
|
||||
protected boolean previewMode = false;
|
||||
protected EntityLivingBase previewOwner = null;
|
||||
|
||||
@@ -140,6 +141,14 @@ public abstract class EntityEnergyAbility extends Entity implements IEntityAddit
|
||||
this.sourceAbility = ability;
|
||||
}
|
||||
|
||||
public boolean isIgnoreIFrames() {
|
||||
return ignoreIFrames;
|
||||
}
|
||||
|
||||
public void setIgnoreIFrames(boolean ignoreIFrames) {
|
||||
this.ignoreIFrames = ignoreIFrames;
|
||||
}
|
||||
|
||||
// ==================== PREVIEW MODE ====================
|
||||
|
||||
public boolean isPreviewMode() {
|
||||
@@ -313,6 +322,7 @@ public abstract class EntityEnergyAbility extends Entity implements IEntityAddit
|
||||
*/
|
||||
protected void writeEnergyBaseNBT(NBTTagCompound nbt) {
|
||||
nbt.setInteger("OwnerId", ownerEntityId);
|
||||
nbt.setBoolean("IgnoreIFrames", ignoreIFrames);
|
||||
displayData.writeNBT(nbt);
|
||||
lightningData.writeNBT(nbt);
|
||||
}
|
||||
@@ -323,6 +333,7 @@ public abstract class EntityEnergyAbility extends Entity implements IEntityAddit
|
||||
*/
|
||||
protected void readEnergyBaseNBT(NBTTagCompound nbt) {
|
||||
this.ownerEntityId = nbt.getInteger("OwnerId");
|
||||
this.ignoreIFrames = nbt.getBoolean("IgnoreIFrames");
|
||||
displayData.readNBT(nbt);
|
||||
lightningData.readNBT(nbt);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user