NPC speed should be more than zero.
Contributed by Index.
This commit is contained in:
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -296,14 +296,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -296,14 +296,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -296,14 +296,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -278,14 +278,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -278,14 +278,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -278,14 +278,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -278,14 +278,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -277,14 +277,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -279,14 +279,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -279,14 +279,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -279,14 +279,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
@@ -279,14 +279,16 @@ public class NpcData implements IXmlReader
|
|||||||
{
|
{
|
||||||
case "walk":
|
case "walk":
|
||||||
{
|
{
|
||||||
set.set("baseWalkSpd", parseDouble(attrs, "ground"));
|
final double groundWalk = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseWalkSpd", groundWalk <= 0d ? 0.1 : groundWalk);
|
||||||
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimWalkSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyWalkSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
{
|
{
|
||||||
set.set("baseRunSpd", parseDouble(attrs, "ground"));
|
final double runSpeed = parseDouble(attrs, "ground");
|
||||||
|
set.set("baseRunSpd", runSpeed <= 0d ? 0.1 : runSpeed);
|
||||||
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
set.set("baseSwimRunSpd", parseDouble(attrs, "swim"));
|
||||||
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
set.set("baseFlyRunSpd", parseDouble(attrs, "fly"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
_flying = set.getBoolean("flying", false);
|
_flying = set.getBoolean("flying", false);
|
||||||
_fakePlayer = set.getBoolean("fakePlayer", false);
|
_fakePlayer = set.getBoolean("fakePlayer", false);
|
||||||
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
_fakePlayerTalkable = set.getBoolean("fakePlayerTalkable", true);
|
||||||
_canMove = set.getBoolean("canMove", true);
|
_canMove = (set.getDouble("baseWalkSpd", 1d) <= 0.1) || set.getBoolean("canMove", true);
|
||||||
_noSleepMode = set.getBoolean("noSleepMode", false);
|
_noSleepMode = set.getBoolean("noSleepMode", false);
|
||||||
_passableDoor = set.getBoolean("passableDoor", false);
|
_passableDoor = set.getBoolean("passableDoor", false);
|
||||||
_hasSummoner = set.getBoolean("hasSummoner", false);
|
_hasSummoner = set.getBoolean("hasSummoner", false);
|
||||||
|
|||||||
Reference in New Issue
Block a user