Package net.neoforged.neoforge.event
Record Class ModMismatchEvent.MismatchResolutionResult
java.lang.Object
java.lang.Record
net.neoforged.neoforge.event.ModMismatchEvent.MismatchResolutionResult
- Enclosing class:
ModMismatchEvent
public static record ModMismatchEvent.MismatchResolutionResult(String modid, ModMismatchEvent.MismatchedVersionInfo versionDifference, @Nullable net.neoforged.fml.ModContainer resolver)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for themodidrecord component.private final @Nullable net.neoforged.fml.ModContainerThe field for theresolverrecord component.private final ModMismatchEvent.MismatchedVersionInfoThe field for theversionDifferencerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMismatchResolutionResult(String modid, ModMismatchEvent.MismatchedVersionInfo versionDifference, @Nullable net.neoforged.fml.ModContainer resolver) Creates an instance of aMismatchResolutionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modid()Returns the value of themodidrecord component.@Nullable net.neoforged.fml.ModContainerresolver()Returns the value of theresolverrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theversionDifferencerecord component.boolean
-
Field Details
-
modid
The field for themodidrecord component. -
versionDifference
The field for theversionDifferencerecord component. -
resolver
@Nullable private final @Nullable net.neoforged.fml.ModContainer resolverThe field for theresolverrecord component.
-
-
Constructor Details
-
MismatchResolutionResult
public MismatchResolutionResult(String modid, ModMismatchEvent.MismatchedVersionInfo versionDifference, @Nullable @Nullable net.neoforged.fml.ModContainer resolver) Creates an instance of aMismatchResolutionResultrecord class.- Parameters:
modid- the value for themodidrecord componentversionDifference- the value for theversionDifferencerecord componentresolver- the value for theresolverrecord component
-
-
Method Details
-
wasSelfResolved
public boolean wasSelfResolved() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
modid
Returns the value of themodidrecord component.- Returns:
- the value of the
modidrecord component
-
versionDifference
Returns the value of theversionDifferencerecord component.- Returns:
- the value of the
versionDifferencerecord component
-
resolver
@Nullable public @Nullable net.neoforged.fml.ModContainer resolver()Returns the value of theresolverrecord component.- Returns:
- the value of the
resolverrecord component
-