Class ResourceLookupRule<C,V>
java.lang.Object
net.minecraft.util.parsing.packrat.commands.ResourceLookupRule<C,V>
- All Implemented Interfaces:
ResourceSuggestion, Rule<com.mojang.brigadier.StringReader, V>, SuggestionSupplier<com.mojang.brigadier.StringReader>
- Direct Known Subclasses:
ComponentPredicateParser.ComponentLookupRule, ComponentPredicateParser.ElementLookupRule, ComponentPredicateParser.PredicateLookupRule, ComponentPredicateParser.TagLookupRule
public abstract class ResourceLookupRule<C,V>
extends Object
implements Rule<com.mojang.brigadier.StringReader, V>, ResourceSuggestion
-
Nested Class Summary
Nested classes/interfaces inherited from interface Rule
Rule.RuleAction<S,T>, Rule.SimpleRuleAction<S, T>, Rule.WrappedTerm<S, T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Cprivate final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private final NamedRule<com.mojang.brigadier.StringReader, Identifier> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedResourceLookupRule(NamedRule<com.mojang.brigadier.StringReader, Identifier> idParser, C context) -
Method Summary
Modifier and TypeMethodDescription@Nullable Vparse(ParseState<com.mojang.brigadier.StringReader> state) protected abstract VvalidateElement(com.mojang.brigadier.ImmutableStringReader reader, Identifier id) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ResourceSuggestion
possibleResources, possibleValues
-
Field Details
-
idParser
-
context
-
error
-
-
Constructor Details
-
ResourceLookupRule
protected ResourceLookupRule(NamedRule<com.mojang.brigadier.StringReader, Identifier> idParser, C context)
-
-
Method Details
-
parse
-
validateElement
protected abstract V validateElement(com.mojang.brigadier.ImmutableStringReader reader, Identifier id) throws Exception - Throws:
Exception
-