Class ParticleArgument
java.lang.Object
net.minecraft.commands.arguments.ParticleArgument
- All Implemented Interfaces:
ArgumentType<ParticleOptions>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DynamicCommandExceptionTypestatic final DynamicCommandExceptionTypeprivate static final Collection<String> private final HolderLookup.Providerprivate static final TagParser<?> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ParticleOptionsgetParticle(CommandContext<CommandSourceStack> context, String name) listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) parse(StringReader reader) static ParticleArgumentparticle(CommandBuildContext context) static ParticleOptionsreadParticle(StringReader reader, HolderLookup.Provider registries) private static <T extends ParticleOptions, O>
TreadParticle(TagParser<O> parser, StringReader reader, ParticleType<T> type, HolderLookup.Provider registries) private static ParticleType<?> readParticleType(StringReader reader, HolderLookup<ParticleType<?>> particles) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ArgumentType
parse
-
Field Details
-
EXAMPLES
-
ERROR_UNKNOWN_PARTICLE
-
ERROR_INVALID_OPTIONS
-
registries
-
VALUE_PARSER
-
-
Constructor Details
-
ParticleArgument
-
-
Method Details
-
particle
-
getParticle
-
parse
- Specified by:
parsein interfaceArgumentType<ParticleOptions>- Throws:
CommandSyntaxException
-
getExamples
- Specified by:
getExamplesin interfaceArgumentType<ParticleOptions>
-
readParticle
public static ParticleOptions readParticle(StringReader reader, HolderLookup.Provider registries) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
readParticleType
private static ParticleType<?> readParticleType(StringReader reader, HolderLookup<ParticleType<?>> particles) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
readParticle
private static <T extends ParticleOptions, O> T readParticle(TagParser<O> parser, StringReader reader, ParticleType<T> type, HolderLookup.Provider registries) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) - Specified by:
listSuggestionsin interfaceArgumentType<ParticleOptions>
-