Package net.minecraft.server.command
Class ExecuteCommand
java.lang.Object
net.minecraft.server.command.ExecuteCommand
public class ExecuteCommand extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
ExecuteCommand.Condition
(package private) static interface
ExecuteCommand.ExistsCondition
-
Field Summary
Fields Modifier and Type Field Description private static BinaryOperator<com.mojang.brigadier.ResultConsumer<ServerCommandSource>>
BINARY_RESULT_CONSUMER
private static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
BLOCKS_TOOBIG_EXCEPTION
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
CONDITIONAL_FAIL_COUNT_EXCEPTION
private static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
CONDITIONAL_FAIL_EXCEPTION
private static com.mojang.brigadier.suggestion.SuggestionProvider<ServerCommandSource>
LOOT_CONDITIONS
-
Constructor Summary
Constructors Constructor Description ExecuteCommand()
-
Method Summary
Modifier and Type Method Description private static com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?>
addBlocksConditionLogic(com.mojang.brigadier.tree.CommandNode<ServerCommandSource> root, com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?> builder, boolean positive, boolean masked)
private static com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?>
addConditionArguments(com.mojang.brigadier.tree.CommandNode<ServerCommandSource> root, com.mojang.brigadier.builder.LiteralArgumentBuilder<ServerCommandSource> argumentBuilder, boolean positive)
private static com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?>
addConditionLogic(com.mojang.brigadier.tree.CommandNode<ServerCommandSource> root, com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?> builder, boolean positive, ExecuteCommand.Condition condition)
private static com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?>
addStoreArguments(com.mojang.brigadier.tree.LiteralCommandNode<ServerCommandSource> node, com.mojang.brigadier.builder.LiteralArgumentBuilder<ServerCommandSource> builder, boolean requestResult)
private static int
countPathMatches(DataCommandObject object, NbtPathArgumentType.NbtPath path)
private static int
executeNegativeBlockCondition(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, boolean masked)
private static int
executePositiveBlockCondition(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, boolean masked)
private static ServerCommandSource
executeStoreBossbar(ServerCommandSource source, CommandBossBar bossBar, boolean storeInValue, boolean requestResult)
private static ServerCommandSource
executeStoreData(ServerCommandSource source, DataCommandObject object, NbtPathArgumentType.NbtPath path, IntFunction<Tag> tagSetter, boolean requestResult)
private static ServerCommandSource
executeStoreScore(ServerCommandSource source, Collection<String> targets, ScoreboardObjective objective, boolean requestResult)
private static com.mojang.brigadier.Command<ServerCommandSource>
getExistsConditionExecute(boolean positive, ExecuteCommand.ExistsCondition condition)
private static Collection<ServerCommandSource>
getSourceOrEmptyForConditionFork(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, boolean positive, boolean value)
static void
register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher)
private static OptionalInt
testBlocksCondition(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, boolean masked)
private static OptionalInt
testBlocksCondition(ServerWorld world, BlockPos start, BlockPos end, BlockPos destination, boolean masked)
private static boolean
testLootCondition(ServerCommandSource serverCommandSource, LootCondition lootCondition)
private static boolean
testScoreCondition(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, BiPredicate<Integer,Integer> condition)
private static boolean
testScoreMatch(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, NumberRange.IntRange range)
-
Field Details
-
BLOCKS_TOOBIG_EXCEPTION
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType BLOCKS_TOOBIG_EXCEPTION -
CONDITIONAL_FAIL_EXCEPTION
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType CONDITIONAL_FAIL_EXCEPTION -
CONDITIONAL_FAIL_COUNT_EXCEPTION
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType CONDITIONAL_FAIL_COUNT_EXCEPTION -
BINARY_RESULT_CONSUMER
private static final BinaryOperator<com.mojang.brigadier.ResultConsumer<ServerCommandSource>> BINARY_RESULT_CONSUMER -
LOOT_CONDITIONS
private static final com.mojang.brigadier.suggestion.SuggestionProvider<ServerCommandSource> LOOT_CONDITIONS
-
-
Constructor Details
-
ExecuteCommand
public ExecuteCommand()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher) -
addStoreArguments
private static com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?> addStoreArguments(com.mojang.brigadier.tree.LiteralCommandNode<ServerCommandSource> node, com.mojang.brigadier.builder.LiteralArgumentBuilder<ServerCommandSource> builder, boolean requestResult) -
executeStoreScore
private static ServerCommandSource executeStoreScore(ServerCommandSource source, Collection<String> targets, ScoreboardObjective objective, boolean requestResult) -
executeStoreBossbar
private static ServerCommandSource executeStoreBossbar(ServerCommandSource source, CommandBossBar bossBar, boolean storeInValue, boolean requestResult) -
executeStoreData
private static ServerCommandSource executeStoreData(ServerCommandSource source, DataCommandObject object, NbtPathArgumentType.NbtPath path, IntFunction<Tag> tagSetter, boolean requestResult) -
addConditionArguments
private static com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?> addConditionArguments(com.mojang.brigadier.tree.CommandNode<ServerCommandSource> root, com.mojang.brigadier.builder.LiteralArgumentBuilder<ServerCommandSource> argumentBuilder, boolean positive) -
getExistsConditionExecute
private static com.mojang.brigadier.Command<ServerCommandSource> getExistsConditionExecute(boolean positive, ExecuteCommand.ExistsCondition condition) -
countPathMatches
private static int countPathMatches(DataCommandObject object, NbtPathArgumentType.NbtPath path) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
testScoreCondition
private static boolean testScoreCondition(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, BiPredicate<Integer,Integer> condition) -
testScoreMatch
private static boolean testScoreMatch(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, NumberRange.IntRange range) -
testLootCondition
private static boolean testLootCondition(ServerCommandSource serverCommandSource, LootCondition lootCondition) -
getSourceOrEmptyForConditionFork
private static Collection<ServerCommandSource> getSourceOrEmptyForConditionFork(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, boolean positive, boolean value) -
addConditionLogic
private static com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?> addConditionLogic(com.mojang.brigadier.tree.CommandNode<ServerCommandSource> root, com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?> builder, boolean positive, ExecuteCommand.Condition condition) -
addBlocksConditionLogic
private static com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?> addBlocksConditionLogic(com.mojang.brigadier.tree.CommandNode<ServerCommandSource> root, com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,?> builder, boolean positive, boolean masked) -
executePositiveBlockCondition
private static int executePositiveBlockCondition(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, boolean masked) -
executeNegativeBlockCondition
private static int executeNegativeBlockCondition(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, boolean masked) -
testBlocksCondition
private static OptionalInt testBlocksCondition(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, boolean masked) -
testBlocksCondition
private static OptionalInt testBlocksCondition(ServerWorld world, BlockPos start, BlockPos end, BlockPos destination, boolean masked) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-