Record Class LoadedModInfo
java.lang.Object
java.lang.Record
com.craftingdead.protect.client.integrity.LoadedModInfo
public record LoadedModInfo(String modId, String version, Path jarLocation, String sha256, boolean isCoremod, boolean hasMixins)
extends Record
Represents information about a loaded mod.
Used for integrity checking and mod validation.
-
Constructor Summary
ConstructorsConstructorDescriptionLoadedModInfo(String modId, String version, Path jarLocation, String sha256, boolean isCoremod, boolean hasMixins) Creates an instance of aLoadedModInforecord 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.booleanReturns the value of thehasMixinsrecord component.booleanReturns the value of theisCoremodrecord component.Returns the value of thejarLocationrecord component.modId()Returns the value of themodIdrecord component.sha256()Returns the value of thesha256record component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
LoadedModInfo
public LoadedModInfo(String modId, String version, Path jarLocation, String sha256, boolean isCoremod, boolean hasMixins) Creates an instance of aLoadedModInforecord class.- Parameters:
modId- the value for themodIdrecord componentversion- the value for theversionrecord componentjarLocation- the value for thejarLocationrecord componentsha256- the value for thesha256record componentisCoremod- the value for theisCoremodrecord componenthasMixins- the value for thehasMixinsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
modId
Returns the value of themodIdrecord component.- Returns:
- the value of the
modIdrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
jarLocation
Returns the value of thejarLocationrecord component.- Returns:
- the value of the
jarLocationrecord component
-
sha256
Returns the value of thesha256record component.- Returns:
- the value of the
sha256record component
-
isCoremod
public boolean isCoremod()Returns the value of theisCoremodrecord component.- Returns:
- the value of the
isCoremodrecord component
-
hasMixins
public boolean hasMixins()Returns the value of thehasMixinsrecord component.- Returns:
- the value of the
hasMixinsrecord component
-