Included content
| Name | |
|---|---|
User Changes:
arrayFindAny and arrayFindFirst functions to expressions. As the name suggests, those functions will try to find an element of an array or return null if the array is empty.chain function to expressions. This function operates on the results of the first one and allows chaining multiple function calls together like so://`it` is the result of the previous function, unless there's a lower level lamda.
chain(arrayOf(2, 3, 6), arrayMap(it, sqrt(it)), arrayFindFirst(it));
//this is the same as:
arrayFindFirst(arrayMap(arrayOf(2, 3, 6), sqrt(it)))
remove to cmd:data.cmd:operate to the scoreboard players command.Registry and DynamicRegistry functions.
this_entity.getHandSlots[0].getItem == Registry('item').access.chest
Item, Block.this_entity.getHandSlots[0].getItem == Item('chest')
Biome and DimensionType are available dynamic registry shortcuts.Dev Changes:
There's a handful new experimental APIs, which allow you to extend the expression system.
Object getValue() and Result convert(Object o) in Expression.Result.Expression eval(LootContext context, Map<String, Object> parameters) in Expression.ProxyMap, ObjectConverter and CustomDataAccessor (which is now a valid data type).CustomFields. One of the more interesting APIs. Allows adding new 'virtual' fields to reflective expression objects.static {
CustomFields.addVirtualField(Entity.class, "nbt", NbtPredicate::entityToNbt);
}
Other Changes:
| Name | |
|---|---|
| File | Type | Size | |
|---|---|---|---|
| commander-0.7.0-1.20.1-build.17-sources.jar | Unknown | 96.23 KiB |
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.
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:86bUtxWv:DCvJJQTQ"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:86bUtxWv:DCvJJQTQ"
}