1.14.4pre1
This commit is contained in:
1 parent
0b6732fa93
commit
cd4ae14448
14 files changed
+59
-62
No files matched your search
@@ -18,7 +18,7 @@ public class DistanceCommand
|
||||
requires((player) -> CarpetSettings.commandDistance).
|
||||
then(literal("from").
|
||||
executes( (c) -> DistanceCalculator.setStart(c.getSource(), c.getSource().getPosition())).
|
||||
then(argument("from", Vec3ArgumentType.create()).
|
||||
then(argument("from", Vec3ArgumentType.vec3()).
|
||||
executes( (c) -> DistanceCalculator.setStart(
|
||||
c.getSource(),
|
||||
Vec3ArgumentType.getVec3(c, "from"))).
|
||||
@@ -27,7 +27,7 @@ public class DistanceCommand
|
||||
c.getSource(),
|
||||
Vec3ArgumentType.getVec3(c, "from"),
|
||||
c.getSource().getPosition())).
|
||||
then(argument("to", Vec3ArgumentType.create()).
|
||||
then(argument("to", Vec3ArgumentType.vec3()).
|
||||
executes( (c) -> DistanceCalculator.distance(
|
||||
c.getSource(),
|
||||
Vec3ArgumentType.getVec3(c, "from"),
|
||||
@@ -35,7 +35,7 @@ public class DistanceCommand
|
||||
)))))).
|
||||
then(literal("to").
|
||||
executes( (c) -> DistanceCalculator.setEnd(c.getSource(), c.getSource().getPosition()) ).
|
||||
then(argument("to", Vec3ArgumentType.create()).
|
||||
then(argument("to", Vec3ArgumentType.vec3()).
|
||||
executes( (c) -> DistanceCalculator.setEnd(c.getSource(), Vec3ArgumentType.getVec3(c, "to")))));
|
||||
dispatcher.register(command);
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ public class DrawCommand
|
||||
LiteralArgumentBuilder<ServerCommandSource> command = literal("draw").
|
||||
requires((player) -> CarpetSettings.commandDraw).
|
||||
then(literal("sphere").
|
||||
then(argument("center",BlockPosArgumentType.create()).
|
||||
then(argument("center",BlockPosArgumentType.blockPos()).
|
||||
then(argument("radius",IntegerArgumentType.integer(1)).
|
||||
then(argument("block",BlockStateArgumentType.create()).
|
||||
then(argument("block",BlockStateArgumentType.blockState()).
|
||||
executes((c)-> drawCircle(
|
||||
c.getSource(),
|
||||
BlockPosArgumentType.getBlockPos(c, "center"),
|
||||
@@ -43,7 +43,7 @@ public class DrawCommand
|
||||
)
|
||||
).
|
||||
then(literal("replace").
|
||||
then(argument("filter",BlockPredicateArgumentType.create())
|
||||
then(argument("filter",BlockPredicateArgumentType.blockPredicate())
|
||||
.executes((c)-> drawCircle(
|
||||
c.getSource(),
|
||||
BlockPosArgumentType.getBlockPos(c, "center"),
|
||||
|
||||
@@ -31,7 +31,7 @@ public class InfoCommand
|
||||
LiteralArgumentBuilder<ServerCommandSource> command = literal("info").
|
||||
requires((player) -> CarpetSettings.commandInfo).
|
||||
then(literal("block").
|
||||
then(argument("block position", BlockPosArgumentType.create()).
|
||||
then(argument("block position", BlockPosArgumentType.blockPos()).
|
||||
executes( (c) -> infoBlock(
|
||||
c.getSource(),
|
||||
BlockPosArgumentType.getBlockPos(c, "block position"), null)).
|
||||
|
||||
@@ -27,12 +27,12 @@ public class PerimeterInfoCommand
|
||||
c.getSource(),
|
||||
new BlockPos(c.getSource().getPosition()),
|
||||
null)).
|
||||
then(argument("center position", BlockPosArgumentType.create()).
|
||||
then(argument("center position", BlockPosArgumentType.blockPos()).
|
||||
executes( (c) -> perimeterDiagnose(
|
||||
c.getSource(),
|
||||
BlockPosArgumentType.getBlockPos(c, "center position"),
|
||||
null)).
|
||||
then(argument("mob",EntitySummonArgumentType.create()).
|
||||
then(argument("mob",EntitySummonArgumentType.entitySummon()).
|
||||
suggests(SuggestionProviders.SUMMONABLE_ENTITIES).
|
||||
executes( (c) -> perimeterDiagnose(
|
||||
c.getSource(),
|
||||
|
||||
@@ -99,7 +99,7 @@ public class PlayerCommand
|
||||
executes(PlayerCommand::lookUp)).
|
||||
then(literal("down").
|
||||
executes(PlayerCommand::lookDown)).
|
||||
then(argument("direction", RotationArgumentType.create()).
|
||||
then(argument("direction", RotationArgumentType.rotation()).
|
||||
executes(PlayerCommand::lookAround))).
|
||||
then(literal("turn").
|
||||
then(literal("left").
|
||||
@@ -108,7 +108,7 @@ public class PlayerCommand
|
||||
executes(PlayerCommand::turnRight)).
|
||||
then(literal("back").
|
||||
executes(PlayerCommand::turnBack)).
|
||||
then(argument("direction",RotationArgumentType.create()).
|
||||
then(argument("direction",RotationArgumentType.rotation()).
|
||||
executes(PlayerCommand::turn))).
|
||||
then(literal("move").
|
||||
then(literal("forward").
|
||||
@@ -122,13 +122,13 @@ public class PlayerCommand
|
||||
then(literal("spawn").
|
||||
executes(PlayerCommand::spawn).
|
||||
then(literal("at").
|
||||
then(argument("position", Vec3ArgumentType.create()).
|
||||
then(argument("position", Vec3ArgumentType.vec3()).
|
||||
executes(PlayerCommand::spawn).
|
||||
then(literal("facing").
|
||||
then(argument("direction",RotationArgumentType.create()).
|
||||
then(argument("direction",RotationArgumentType.rotation()).
|
||||
executes(PlayerCommand::spawn).
|
||||
then(literal("in").
|
||||
then(argument("dimension", DimensionArgumentType.create()).
|
||||
then(argument("dimension", DimensionArgumentType.dimension()).
|
||||
executes(PlayerCommand::spawn)))))))));
|
||||
|
||||
dispatcher.register(literalargumentbuilder);
|
||||
|
||||
@@ -99,7 +99,7 @@ public class ScriptCommand
|
||||
))));
|
||||
LiteralArgumentBuilder<ServerCommandSource> c = literal("invokepoint").
|
||||
then(argument("call", StringArgumentType.word()).suggests( (cc, bb)->suggestMatching(suggestFunctionCalls(cc),bb)).
|
||||
then(argument("origin", BlockPosArgumentType.create()).
|
||||
then(argument("origin", BlockPosArgumentType.blockPos()).
|
||||
executes( (cc) -> invoke(
|
||||
cc,
|
||||
StringArgumentType.getString(cc, "call"),
|
||||
@@ -117,8 +117,8 @@ public class ScriptCommand
|
||||
)))));
|
||||
LiteralArgumentBuilder<ServerCommandSource> h = literal("invokearea").
|
||||
then(argument("call", StringArgumentType.word()).suggests( (cc, bb)->suggestMatching(suggestFunctionCalls(cc),bb)).
|
||||
then(argument("from", BlockPosArgumentType.create()).
|
||||
then(argument("to", BlockPosArgumentType.create()).
|
||||
then(argument("from", BlockPosArgumentType.blockPos()).
|
||||
then(argument("to", BlockPosArgumentType.blockPos()).
|
||||
executes( (cc) -> invoke(
|
||||
cc,
|
||||
StringArgumentType.getString(cc, "call"),
|
||||
@@ -135,9 +135,9 @@ public class ScriptCommand
|
||||
StringArgumentType.getString(cc, "arguments")
|
||||
))))));
|
||||
LiteralArgumentBuilder<ServerCommandSource> i = literal("scan").requires((player) -> player.hasPermissionLevel(2)).
|
||||
then(argument("origin", BlockPosArgumentType.create()).
|
||||
then(argument("from", BlockPosArgumentType.create()).
|
||||
then(argument("to", BlockPosArgumentType.create()).
|
||||
then(argument("origin", BlockPosArgumentType.blockPos()).
|
||||
then(argument("from", BlockPosArgumentType.blockPos()).
|
||||
then(argument("to", BlockPosArgumentType.blockPos()).
|
||||
then(argument("expr", StringArgumentType.greedyString()).
|
||||
suggests((cc, bb) -> suggestCode(cc, bb)).
|
||||
executes( (cc) -> scriptScan(
|
||||
@@ -148,11 +148,11 @@ public class ScriptCommand
|
||||
StringArgumentType.getString(cc, "expr")
|
||||
))))));
|
||||
LiteralArgumentBuilder<ServerCommandSource> e = literal("fill").requires((player) -> player.hasPermissionLevel(2)).
|
||||
then(argument("origin", BlockPosArgumentType.create()).
|
||||
then(argument("from", BlockPosArgumentType.create()).
|
||||
then(argument("to", BlockPosArgumentType.create()).
|
||||
then(argument("origin", BlockPosArgumentType.blockPos()).
|
||||
then(argument("from", BlockPosArgumentType.blockPos()).
|
||||
then(argument("to", BlockPosArgumentType.blockPos()).
|
||||
then(argument("expr", StringArgumentType.string()).
|
||||
then(argument("block", BlockStateArgumentType.create()).
|
||||
then(argument("block", BlockStateArgumentType.blockState()).
|
||||
executes((cc) -> scriptFill(
|
||||
cc,
|
||||
BlockPosArgumentType.getBlockPos(cc, "origin"),
|
||||
@@ -163,7 +163,7 @@ public class ScriptCommand
|
||||
null, "solid"
|
||||
)).
|
||||
then(literal("replace").
|
||||
then(argument("filter", BlockPredicateArgumentType.create())
|
||||
then(argument("filter", BlockPredicateArgumentType.blockPredicate())
|
||||
.executes((cc) -> scriptFill(
|
||||
cc,
|
||||
BlockPosArgumentType.getBlockPos(cc, "origin"),
|
||||
@@ -175,11 +175,11 @@ public class ScriptCommand
|
||||
"solid"
|
||||
)))))))));
|
||||
LiteralArgumentBuilder<ServerCommandSource> t = literal("outline").requires((player) -> player.hasPermissionLevel(2)).
|
||||
then(argument("origin", BlockPosArgumentType.create()).
|
||||
then(argument("from", BlockPosArgumentType.create()).
|
||||
then(argument("to", BlockPosArgumentType.create()).
|
||||
then(argument("origin", BlockPosArgumentType.blockPos()).
|
||||
then(argument("from", BlockPosArgumentType.blockPos()).
|
||||
then(argument("to", BlockPosArgumentType.blockPos()).
|
||||
then(argument("expr", StringArgumentType.string()).
|
||||
then(argument("block", BlockStateArgumentType.create()).
|
||||
then(argument("block", BlockStateArgumentType.blockState()).
|
||||
executes((cc) -> scriptFill(
|
||||
cc,
|
||||
BlockPosArgumentType.getBlockPos(cc, "origin"),
|
||||
@@ -190,7 +190,7 @@ public class ScriptCommand
|
||||
null, "outline"
|
||||
)).
|
||||
then(literal("replace").
|
||||
then(argument("filter", BlockPredicateArgumentType.create())
|
||||
then(argument("filter", BlockPredicateArgumentType.blockPredicate())
|
||||
.executes((cc) -> scriptFill(
|
||||
cc,
|
||||
BlockPosArgumentType.getBlockPos(cc, "origin"),
|
||||
|
||||
@@ -41,14 +41,14 @@ public class SpawnCommand
|
||||
|
||||
literalargumentbuilder.
|
||||
then(literal("list").
|
||||
then(argument("pos", BlockPosArgumentType.create()).
|
||||
then(argument("pos", BlockPosArgumentType.blockPos()).
|
||||
executes( (c) -> listSpawns(c.getSource(), BlockPosArgumentType.getBlockPos(c, "pos"))))).
|
||||
then(literal("tracking").
|
||||
executes( (c) -> printTrackingReport(c.getSource())).
|
||||
then(literal("start").
|
||||
executes( (c) -> startTracking(c.getSource(), null, null)).
|
||||
then(argument("from", BlockPosArgumentType.create()).
|
||||
then(argument("to", BlockPosArgumentType.create()).
|
||||
then(argument("from", BlockPosArgumentType.blockPos()).
|
||||
then(argument("to", BlockPosArgumentType.blockPos()).
|
||||
executes( (c) -> startTracking(
|
||||
c.getSource(),
|
||||
BlockPosArgumentType.getBlockPos(c, "from"),
|
||||
@@ -91,7 +91,7 @@ public class SpawnCommand
|
||||
then(literal("set").
|
||||
then(argument("cap (hostile)", integer(1,1400)).
|
||||
executes( (c) -> setMobcaps(c.getSource(), getInteger(c, "cap (hostile)"))))).
|
||||
then(argument("dimension", DimensionArgumentType.create()).
|
||||
then(argument("dimension", DimensionArgumentType.dimension()).
|
||||
executes( (c)-> mobcapsForDimension(c.getSource(), DimensionArgumentType.getDimensionArgument(c, "dimension"))))).
|
||||
then(literal("entities").
|
||||
executes( (c) -> generalMobcaps(c.getSource()) ).
|
||||
|
||||
Reference in new issue
Block a user