Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document and improve mod compatibility #3

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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