类 EntitySelectorManager
java.lang.Object
net.neoforged.neoforge.common.command.EntitySelectorManager
Allows modders to register custom entity selectors by assigning an
The token "test", for example, corresponds to @test[...] in a command.
IEntitySelectorType
to a String token. The token "test", for example, corresponds to @test[...] in a command.
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static void
fillSelectorSuggestions
(com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionBuilder) This method is called inEntitySelectorParser#fillSelectorSuggestions(SuggestionsBuilder)
static EntitySelector
parseSelector
(EntitySelectorParser parser) This method is called inEntitySelectorParser.parse()
If the REGISTRY does not contain a custom selector for the command being parsed, this method returnsnull
and the vanilla logic inEntitySelectorParser#parseSelector()
is used.static void
register
(String token, IEntitySelectorType type)
-
字段详细资料
-
REGISTRY
-
-
构造器详细资料
-
EntitySelectorManager
public EntitySelectorManager()
-
-
方法详细资料
-
register
- 参数:
token
- Defines the name of the selector
-
parseSelector
public static EntitySelector parseSelector(EntitySelectorParser parser) throws com.mojang.brigadier.exceptions.CommandSyntaxException This method is called inEntitySelectorParser.parse()
If the REGISTRY does not contain a custom selector for the command being parsed, this method returnsnull
and the vanilla logic inEntitySelectorParser#parseSelector()
is used.- 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
fillSelectorSuggestions
public static void fillSelectorSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionBuilder) This method is called inEntitySelectorParser#fillSelectorSuggestions(SuggestionsBuilder)
-