Skip to content

Commit

Permalink
Document and improve mod compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Aug 19, 2024
1 parent 58a51d9 commit 6274d77
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,13 @@ patches. Listed below are notable patches:
- Random ticking optimisations
- [Starlight](https://github.com/PaperMC/Starlight/)

## Mod Compatibility
| Mod | Compatibility |
|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| FerriteCore | <details><summary>📝 requires config changes</summary>In `config/ferritecore-mixin.toml`:<br/>Set `replaceNeighborLookup` and `replacePropertyMap` to `false`</details> |
| ModernFix | <details><summary>📝 requires config changes</summary>In `config/modernfix-mixins.properties`:<br/>Add `mixin.bugfix.paper_chunk_patches=false`</details> |
| Lithium | ❌ incompatible |
| C2ME | ❌ incompatible |

## Contact
[Discord](https://discord.gg/tuinity)
22 changes: 22 additions & 0 deletions neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,28 @@ versionRange = "[1.21,1.21.2)"
ordering = "NONE"
side = "BOTH"

[[dependencies.moonrise]]
modId = "starlight"
type = "incompatible"

[[dependencies.moonrise]]
modId = "lithium"
type = "incompatible"

[[dependencies.moonrise]]
# unofficial lithium port
modId = "canary"
type = "incompatible"

[[dependencies.moonrise]]
# unofficial lithium port
modId = "radium"
type = "incompatible"

[[dependencies.moonrise]]
modId = "c2me"
type = "incompatible"

[[mixins]]
config = "moonrise.mixins.json"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,17 @@ private void init(final CallbackInfo ci) {
)
)
private void loadTable(final Map<Map<Property<?>, Comparable<?>>, S> map, final CallbackInfo ci) {
// Uses #entrySet() instead of #values() for ModernFix compat (until when/if they implement #values() on their map) (also in ZCRST#loadInTable)

if (this.optimisedTable.isLoaded()) {
ci.cancel();
return;
}
this.optimisedTable.loadInTable(map);

// de-duplicate the tables
for (final S value : map.values()) {
for (final Map.Entry<Map<Property<?>, Comparable<?>>, S> entry : map.entrySet()) {
final S value = entry.getValue();
((StateHolderMixin<O, S>)(Object)(StateHolder<O, S>)value).optimisedTable = this.optimisedTable;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public void loadInTable(final Map<Map<Property<?>, Comparable<?>>, S> universe)

this.lookup = (S[])new StateHolder[universe.size()];

for (final S value : universe.values()) {
for (final Map.Entry<Map<Property<?>, Comparable<?>>, S> entry : universe.entrySet()) {
final S value = entry.getValue();
if (value == null) {
continue;
}
Expand Down

0 comments on commit 6274d77

Please sign in to comment.