mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 20:25:13 +00:00
moved projectilesKeepTerrain to DataStats
This commit is contained in:
1 parent
422dd3fc90
commit
84973a025a
4 files changed
+6
-7
No files matched your search
@@ -47,6 +47,7 @@ public class DataStats {
|
||||
public int pEffAmp = 0;
|
||||
public String fireSound = "random.bow";
|
||||
public boolean aimWhileShooting = false;
|
||||
public boolean projectilesKeepTerrain = false;
|
||||
|
||||
public EnumCreatureAttribute creatureType = EnumCreatureAttribute.UNDEFINED;
|
||||
|
||||
@@ -102,6 +103,7 @@ public class DataStats {
|
||||
compound.setInteger("pEffAmp", pEffAmp);
|
||||
compound.setString("FiringSound", fireSound);
|
||||
compound.setBoolean("AimWhileShooting", aimWhileShooting);
|
||||
compound.setBoolean("ProjectilesKeepTerrain", projectilesKeepTerrain);
|
||||
|
||||
compound.setBoolean("ImmuneToFire", immuneToFire);
|
||||
compound.setBoolean("PotionImmune", potionImmune);
|
||||
@@ -160,6 +162,7 @@ public class DataStats {
|
||||
pEffAmp = compound.getInteger("pEffAmp");
|
||||
fireSound = compound.getString("FiringSound");
|
||||
aimWhileShooting = compound.getBoolean("AimWhileShooting");
|
||||
projectilesKeepTerrain = compound.getBoolean("ProjectilesKeepTerrain");
|
||||
|
||||
immuneToFire = compound.getBoolean("ImmuneToFire");
|
||||
potionImmune = compound.getBoolean("PotionImmune");
|
||||
|
||||
@@ -139,7 +139,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
|
||||
public boolean updateClient = false;
|
||||
public boolean updateAI = false;
|
||||
public boolean projectilesKeepTerrain = false;
|
||||
|
||||
public FlyingMoveHelper flyMoveHelper = new FlyingMoveHelper(this);
|
||||
public PathNavigate flyNavigator = new PathNavigateFlying(this, worldObj);
|
||||
@@ -958,8 +957,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
|
||||
linkedName = compound.getString("LinkedNpcName");
|
||||
|
||||
projectilesKeepTerrain = compound.getBoolean("ProjectilesKeepTerrain");
|
||||
|
||||
if(!isRemote())
|
||||
LinkedNpcController.Instance.loadNpcData(this);
|
||||
|
||||
@@ -991,7 +988,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
compound.setLong("TotalTicksAlive", totalTicksAlive);
|
||||
compound.setInteger("ModRev", npcVersion);
|
||||
compound.setString("LinkedNpcName", linkedName);
|
||||
compound.setBoolean("ProjectilesKeepTerrain", projectilesKeepTerrain);
|
||||
}
|
||||
|
||||
public void updateHitbox() {
|
||||
|
||||
@@ -139,7 +139,7 @@ public class EntityProjectile extends EntityThrowable {
|
||||
if (isNPC) {
|
||||
this.npc = (EntityNPCInterface) this.thrower;
|
||||
this.getStatProperties(this.npc.stats);
|
||||
this.destroyTerrain = !this.npc.projectilesKeepTerrain;
|
||||
this.destroyTerrain = !this.npc.stats.projectilesKeepTerrain;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -270,11 +270,11 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
}
|
||||
|
||||
public void setProjectilesKeepTerrain(boolean t) {
|
||||
npc.projectilesKeepTerrain = t;
|
||||
npc.stats.projectilesKeepTerrain = t;
|
||||
}
|
||||
|
||||
public boolean getProjectilesKeepTerrain() {
|
||||
return npc.projectilesKeepTerrain;
|
||||
return npc.stats.projectilesKeepTerrain;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user