mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 12:15:11 +00:00
Add ranged invincibility toggle for NPC projectiles
This commit is contained in:
1 parent
aaa07eeec6
commit
58437e0bbf
7 files changed
+51
-6
No files matched your search
@@ -53,6 +53,7 @@ public class DataStats {
|
||||
public boolean playBurstSound = true; // Internal Only
|
||||
public byte aimType = 0;
|
||||
public boolean projectilesKeepTerrain = false;
|
||||
public boolean projectileInvincibility = true;
|
||||
|
||||
|
||||
public EnumCreatureAttribute creatureType = EnumCreatureAttribute.UNDEFINED;
|
||||
@@ -116,6 +117,7 @@ public class DataStats {
|
||||
compound.setBoolean("FiringSoundBegin", onSoundBegin);
|
||||
compound.setByte("AimType", aimType);
|
||||
compound.setBoolean("ProjectilesKeepTerrain", projectilesKeepTerrain);
|
||||
compound.setBoolean("ProjectileInvincibility", projectileInvincibility);
|
||||
if (pTrail == EnumParticleType.Custom)
|
||||
compound.setTag("pCustom", pCustom.writeToNBT());
|
||||
if (pEffect == EnumPotionType.Fire)
|
||||
@@ -185,6 +187,10 @@ public class DataStats {
|
||||
onSoundBegin = compound.getBoolean("FiringSoundBegin");
|
||||
aimType = compound.getByte("AimType");
|
||||
projectilesKeepTerrain = compound.getBoolean("ProjectilesKeepTerrain");
|
||||
if (compound.hasKey("ProjectileInvincibility"))
|
||||
projectileInvincibility = compound.getBoolean("ProjectileInvincibility");
|
||||
else
|
||||
projectileInvincibility = true;
|
||||
if (pTrail == EnumParticleType.Custom)
|
||||
pCustom = ScriptParticle.fromNBT(compound.getCompoundTag("pCustom"));
|
||||
if (pEffect == EnumPotionType.Fire)
|
||||
|
||||
Reference in new issue
Block a user