Tags
Creators
Details
1.2.0
Compatibility
Required content
Changes
Constant fields
This update adds const fields, along with some bug fixes from the last update.
public const myField: integer
public static const myField: integer = 5
Constant fields can only be set as default values, or in the new instance section. Meaning they can't be changed after creation.
Changes included in this release
- added
constkeyword for fields - the variable toString for class instances no longer uses it's field contents for the hash code, meaning
{var::%{_myClass}%}should produce consistent results - registered a comparator for typed and untyped instances so now
%typedinstance% is %classinstance%should consistently be true - the typed wrapper of a specific instance is now only created once so that comparing typed instances works as intended
- reworded access errors to be more helpful and specific
- changed pattern to support
new ClassNameas a shortened version ofnew instance of ClassName - fixed nested sections in the new instance expression to properly get the source expression before checking if it can be a section
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:DL6BwgfK:vzDzwiTG"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:DL6BwgfK:vzDzwiTG"
}
