类 EntitySelectorTest.ExampleCustomSelector
java.lang.Object
net.neoforged.neoforge.oldtest.chat.EntitySelectorTest.ExampleCustomSelector
- 所有已实现的接口:
IEntitySelectorType
- 封闭类:
EntitySelectorTest
private class EntitySelectorTest.ExampleCustomSelector
extends Object
implements IEntitySelectorType
Example for a custom selector type, works like @r but for entities.
Basically does exactly what @e[sorter=random, limit=1, ...] does.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build
(EntitySelectorParser parser) Returns anEntitySelector
based on the givenEntitySelectorParser
.Returns anComponent
containing a short description for this selector type.
-
构造器详细资料
-
ExampleCustomSelector
private ExampleCustomSelector()
-
-
方法详细资料
-
build
public EntitySelector build(EntitySelectorParser parser) throws com.mojang.brigadier.exceptions.CommandSyntaxException 从接口复制的说明:IEntitySelectorType
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
.- 指定者:
build
在接口中IEntitySelectorType
- 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getSuggestionTooltip
从接口复制的说明:IEntitySelectorType
Returns anComponent
containing a short description for this selector type.- 指定者:
getSuggestionTooltip
在接口中IEntitySelectorType
-