Support decimals in the --xyz syntax for /npc moveto

This commit is contained in:
fullwall 2012-11-14 09:16:53 +08:00
parent 777a14d039
commit 9836775fcf

View File

@ -582,11 +582,11 @@ public class NPCCommands {
} else { } else {
to = current.clone(); to = current.clone();
if (args.hasValueFlag("x")) if (args.hasValueFlag("x"))
to.setX(args.getFlagInteger("x")); to.setX(args.getFlagDouble("x"));
if (args.hasValueFlag("y")) if (args.hasValueFlag("y"))
to.setY(args.getFlagInteger("y")); to.setY(args.getFlagDouble("y"));
if (args.hasValueFlag("z")) if (args.hasValueFlag("z"))
to.setZ(args.getFlagInteger("z")); to.setZ(args.getFlagDouble("z"));
if (args.hasValueFlag("yaw")) if (args.hasValueFlag("yaw"))
to.setYaw((float) args.getFlagDouble("yaw")); to.setYaw((float) args.getFlagDouble("yaw"));
if (args.hasValueFlag("pitch")) if (args.hasValueFlag("pitch"))