Interface IEntitySelectorType
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 anEntitySelectorbased on the givenEntitySelectorParser.Returns anComponentcontaining a short description for this selector type.
-
Method Details
-
build
EntitySelector build(EntitySelectorParser parser) throws com.mojang.brigadier.exceptions.CommandSyntaxException Returns anEntitySelectorbased 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 anComponentcontaining a short description for this selector type.
-