Package net.minecraftforge.debug.chat
Class EntitySelectorTest.ExampleCustomSelector
- java.lang.Object
-
- net.minecraftforge.debug.chat.EntitySelectorTest.ExampleCustomSelector
-
- All Implemented Interfaces:
IEntitySelectorType
- Enclosing class:
- EntitySelectorTest
private class EntitySelectorTest.ExampleCustomSelector extends java.lang.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.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateExampleCustomSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntitySelectorbuild(EntitySelectorParser parser)Returns anEntitySelectorbased on the givenEntitySelectorParser.ITextComponentgetSuggestionTooltip()Returns anITextComponentcontaining a short description for this selector type.
-
-
-
Method Detail
-
build
public EntitySelector build(EntitySelectorParser parser) throws com.mojang.brigadier.exceptions.CommandSyntaxException
Description copied from interface:IEntitySelectorTypeReturns anEntitySelectorbased on the givenEntitySelectorParser.
UseEntitySelectorParser.getReader()to read extra arguments andEntitySelectorParser#addFilterto add the corresponding filters.
If the token being parsed does not match the syntax of this selector, this method should throw an appropriateCommandSyntaxException.- Specified by:
buildin interfaceIEntitySelectorType- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getSuggestionTooltip
public ITextComponent getSuggestionTooltip()
Description copied from interface:IEntitySelectorTypeReturns anITextComponentcontaining a short description for this selector type.- Specified by:
getSuggestionTooltipin interfaceIEntitySelectorType
-
-