Skip to content

Commit

Permalink
Initial lithium compatibility on Fabric (#9)
Browse files Browse the repository at this point in the history
* Initial lithium compatibility on Fabric

* Update readme

* Add lithium test run

* Revert editorconfig change
  • Loading branch information
jpenilla authored Sep 2, 2024
1 parent 9c92ec4 commit 55e6262
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ patches. Listed below are notable patches:
- [Starlight](https://github.com/PaperMC/Starlight/)

## Known Compatibility Issues
| Mod | Status |
|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| FerriteCore | <details><summary>📝 requires config changes</summary>In `config/ferritecore-mixin.toml`:<br/>Set `replaceNeighborLookup` and `replacePropertyMap` to `false`</details> |
| Lithium | ❌ incompatible |
| C2ME | ❌ incompatible |
| Mod | Status |
|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Lithium | <details><summary>✅ compatible</summary>Lithium optimises many of the same parts of the game as Moonrise, for example the chunk system. Moonrise will automatically disable conflicting parts of Lithium. This mechanism needs to be manually validated for each Moonrise and Lithium release.</details> |
| FerriteCore | <details><summary>📝 requires config changes</summary>In `config/ferritecore-mixin.toml`:<br/>Set `replaceNeighborLookup` and `replacePropertyMap` to `false`</details> |
| C2ME | <details><summary>❌ incompatible</summary>C2ME is based around modifications to the chunk system, which Moonrise replaces wholesale. This makes them fundamentally incompatible.</details> |

## Contact
[Discord](https://discord.gg/tuinity)
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ allprojects {
includeModule("ca.spottedleaf", "concurrentutil")
}
}
maven {
url "https://api.modrinth.com/maven"
mavenContent {
includeGroup("maven.modrinth")
}
}
maven { url "https://maven.shedaniel.me/" }
maven { url "https://maven.terraformersmc.com/releases/" }
}
Expand Down Expand Up @@ -89,6 +95,7 @@ subprojects {
}
loom.runs.all {
ideConfigGenerated true
// property "mixin.debug", "true"
}
}

Expand Down
19 changes: 19 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,22 @@ shadowJar {
relocate 'ca.spottedleaf.concurrentutil', 'ca.spottedleaf.moonrise.libs.ca.spottedleaf.concurrentutil'
relocate 'org.yaml.snakeyaml', 'ca.spottedleaf.moonrise.libs.org.yaml.snakeyaml'
}

// Setup a run with lithium for compatibility testing
sourceSets.create("lithium")
configurations.create("lithium")
loom {
createRemapConfigurations(sourceSets.lithium)
runs {
register("lithiumClient") {
client()
property "mixin.debug", "true"
}
}
}
tasks.named("runLithiumClient", net.fabricmc.loom.task.RunGameTask.class) {
getClasspath().from(configurations.modRuntimeClasspathLithiumMapped)
}
dependencies {
modLithiumRuntimeOnly "maven.modrinth:lithium:${rootProject.lithium_version}"
}
39 changes: 35 additions & 4 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,55 @@
"breaks": {
"notenoughcrashes": "*",
"starlight": "*",
"lithium": "*",
"c2me": "*"
},
"license": "GPL-3.0-only",
"icon": "assets/moonrise/icon.png",
"environment": "*",
"entrypoints": {
"modmenu": ["ca.spottedleaf.moonrise.fabric.MoonriseModMenuHook"],
"client": ["ca.spottedleaf.moonrise.fabric.MoonriseFabricClient"]
"modmenu": [
"ca.spottedleaf.moonrise.fabric.MoonriseModMenuHook"
],
"client": [
"ca.spottedleaf.moonrise.fabric.MoonriseFabricClient"
]
},
"mixins": [
"moonrise.mixins.json",
"moonrise-fabric.mixins.json"
],
"accessWidener" : "moonrise.accesswidener",
"accessWidener": "moonrise.accesswidener",
"depends": {
"fabricloader": ">=${loader_version}",
"minecraft": ">=1.21 <=1.21.1",
"fabric-command-api-v2": "*"
},
"custom": {
"lithium:options": {
"mixin.collections.chunk_tickets": false,
"mixin.world.temperature_cache": false,
"mixin.block.flatten_states": false,
"mixin.math.fast_util": false,
"mixin.minimal_nonvanilla.collisions.empty_space": false,
"mixin.alloc.deep_passengers": false,
"mixin.math.fast_blockpos": false,
"mixin.shapes.blockstate_cache": false,
"mixin.world.block_entity_ticking": false,
"mixin.collections.entity_ticking": false,
"mixin.world.chunk_access": false,
"mixin.ai.poi": false,
"mixin.chunk.no_validation": false,
"mixin.minimal_nonvanilla.world.expiring_chunk_tickets": false,
"mixin.world.tick_scheduler": false,
"mixin.alloc.chunk_ticking": false,
"mixin.entity.replace_entitytype_predicates": false,
"mixin.util.block_tracking": false,
"mixin.shapes.specialized_shapes": false,
"mixin.shapes.optimized_matching": false,
"mixin.entity.collisions.intersection": false,
"mixin.entity.collisions.movement": false,
"mixin.entity.collisions.unpushable_cramming": false,
"mixin.chunk.entity_class_groups": false
}
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ neoforge_version=21.1.20
snakeyaml_version=2.2
concurrentutil_version=0.0.2-SNAPSHOT
cloth_version=15.0.128
lithium_version=mc1.21.1-0.13.0
# Mod Properties
mod_version=0.1.0-SNAPSHOT
maven_group=ca.spottedleaf.moonrise
Expand Down

0 comments on commit 55e6262

Please sign in to comment.