Record Class ResolutionContext
java.lang.Object
java.lang.Record
net.minecraft.network.chat.ResolutionContext
public record ResolutionContext(@Nullable CommandSourceStack source, @Nullable Entity defaultScoreboardEntity, Predicate<ObjectInfo> objectInfoValidator, int depthLimit, ResolutionContext.LimitBehavior depthLimitBehavior, int resolvedComponentLimit, org.apache.commons.lang3.mutable.MutableInt resolvedComponentCount)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intThe field for thedefaultScoreboardEntityrecord component.private final intThe field for thedepthLimitrecord component.private final ResolutionContext.LimitBehaviorThe field for thedepthLimitBehaviorrecord component.private final Predicate<ObjectInfo> The field for theobjectInfoValidatorrecord component.private final org.apache.commons.lang3.mutable.MutableIntThe field for theresolvedComponentCountrecord component.private final intThe field for theresolvedComponentLimitrecord component.private final @Nullable CommandSourceStackThe field for thesourcerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionResolutionContext(@Nullable CommandSourceStack source, @Nullable Entity defaultScoreboardEntity, Predicate<ObjectInfo> objectInfoValidator, int depthLimit, ResolutionContext.LimitBehavior depthLimitBehavior, int resolvedComponentLimit, org.apache.commons.lang3.mutable.MutableInt resolvedComponentCount) Creates an instance of aResolutionContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResolutionContext.Builderbuilder()static ResolutionContextcreate(CommandSourceStack source) Returns the value of thedefaultScoreboardEntityrecord component.intReturns the value of thedepthLimitrecord component.Returns the value of thedepthLimitBehaviorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theobjectInfoValidatorrecord component.org.apache.commons.lang3.mutable.MutableIntReturns the value of theresolvedComponentCountrecord component.intReturns the value of theresolvedComponentLimitrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.validate(ObjectInfo description)
-
Field Details
-
source
The field for thesourcerecord component. -
defaultScoreboardEntity
-
objectInfoValidator
The field for theobjectInfoValidatorrecord component. -
depthLimit
private final int depthLimitThe field for thedepthLimitrecord component. -
depthLimitBehavior
The field for thedepthLimitBehaviorrecord component. -
resolvedComponentLimit
private final int resolvedComponentLimitThe field for theresolvedComponentLimitrecord component. -
resolvedComponentCount
private final org.apache.commons.lang3.mutable.MutableInt resolvedComponentCountThe field for theresolvedComponentCountrecord component. -
DEFAULT_RESOLVED_COMPONENT_LIMIT
private static final int DEFAULT_RESOLVED_COMPONENT_LIMIT- See Also:
-
-
Constructor Details
-
ResolutionContext
public ResolutionContext(@Nullable CommandSourceStack source, @Nullable Entity defaultScoreboardEntity, Predicate<ObjectInfo> objectInfoValidator, int depthLimit, ResolutionContext.LimitBehavior depthLimitBehavior, int resolvedComponentLimit, org.apache.commons.lang3.mutable.MutableInt resolvedComponentCount) Creates an instance of aResolutionContextrecord class.- Parameters:
source- the value for thesourcerecord componentdefaultScoreboardEntity- the value for thedefaultScoreboardEntityrecord componentobjectInfoValidator- the value for theobjectInfoValidatorrecord componentdepthLimit- the value for thedepthLimitrecord componentdepthLimitBehavior- the value for thedepthLimitBehaviorrecord componentresolvedComponentLimit- the value for theresolvedComponentLimitrecord componentresolvedComponentCount- the value for theresolvedComponentCountrecord component
-
-
Method Details
-
validate
-
create
-
builder
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
defaultScoreboardEntity
-
objectInfoValidator
Returns the value of theobjectInfoValidatorrecord component.- Returns:
- the value of the
objectInfoValidatorrecord component
-
depthLimit
public int depthLimit()Returns the value of thedepthLimitrecord component.- Returns:
- the value of the
depthLimitrecord component
-
depthLimitBehavior
Returns the value of thedepthLimitBehaviorrecord component.- Returns:
- the value of the
depthLimitBehaviorrecord component
-
resolvedComponentLimit
public int resolvedComponentLimit()Returns the value of theresolvedComponentLimitrecord component.- Returns:
- the value of the
resolvedComponentLimitrecord component
-
resolvedComponentCount
public org.apache.commons.lang3.mutable.MutableInt resolvedComponentCount()Returns the value of theresolvedComponentCountrecord component.- Returns:
- the value of the
resolvedComponentCountrecord component
-