Interface IEntitySelectorType
- All Known Implementing Classes:
EntitySelectorTest.ExampleCustomSelector
public interface IEntitySelectorType
Implementations of this interface can be registered using
EntitySelectorManager.register(java.lang.String, net.neoforged.neoforge.common.command.IEntitySelectorType)
-
Method Summary
Modifier and TypeMethodDescriptionbuild
(EntitySelectorParser parser) Returns anEntitySelector
based on the givenEntitySelectorParser
.Returns anComponent
containing a short description for this selector type.
-
Method Details
-
build
EntitySelector build(EntitySelectorParser parser) throws com.mojang.brigadier.exceptions.CommandSyntaxException Returns anEntitySelector
based on the givenEntitySelectorParser
.
UseEntitySelectorParser.getReader()
to read extra arguments andEntitySelectorParser.addPredicate(Predicate)
to add the corresponding filters.
If the token being parsed does not match the syntax of this selector, this method should throw an appropriateCommandSyntaxException
.- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getSuggestionTooltip
Component getSuggestionTooltip()Returns anComponent
containing a short description for this selector type.
-