Class BlockPredicateArgument
java.lang.Object
net.minecraft.commands.arguments.blocks.BlockPredicateArgument
- All Implemented Interfaces:
ArgumentType<BlockPredicateArgument.Result>
public class BlockPredicateArgument
extends Object
implements ArgumentType<BlockPredicateArgument.Result>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic interfaceprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HolderLookup<Block> private static final Collection<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockPredicateArgumentblockPredicate(CommandBuildContext context) static Predicate<BlockInWorld> getBlockPredicate(CommandContext<CommandSourceStack> context, String name) listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) parse(StringReader reader) parse(HolderLookup<Block> blocks, StringReader reader) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ArgumentType
parse
-
Field Details
-
EXAMPLES
-
blocks
-
-
Constructor Details
-
BlockPredicateArgument
-
-
Method Details
-
blockPredicate
-
parse
- Specified by:
parsein interfaceArgumentType<BlockPredicateArgument.Result>- Throws:
CommandSyntaxException
-
parse
public static BlockPredicateArgument.Result parse(HolderLookup<Block> blocks, StringReader reader) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getBlockPredicate
public static Predicate<BlockInWorld> getBlockPredicate(CommandContext<CommandSourceStack> context, String name) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) - Specified by:
listSuggestionsin interfaceArgumentType<BlockPredicateArgument.Result>
-
getExamples
- Specified by:
getExamplesin interfaceArgumentType<BlockPredicateArgument.Result>
-