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

Fix Language Reload >=1.5.0 #1023

Open
wants to merge 1 commit into
base: llama
Choose a base branch
from

Conversation

XXMA16
Copy link

@XXMA16 XXMA16 commented Mar 31, 2023

The ClassFixer is only active in 1.18.2 and up since Language Reload 1.5.0+ only exists for these versions. Optifine does something like this:

// added by optfine
private boolean loadOptions;

// vanilla method
public void load() {
    // body changed by optifine
    // only called here
    load(false);
}

// added by optifine
public void load(boolean limited) {
    this.loadOptions = true;
    // vanilla behavior
    ... // lambda is called somewhere here
    this.loadOptions = false;
    this.loadOfOptions();
}

public void loadOfOptions() {
    // optifine stuff
}

// name changed from method_24230
private static synthetic void lambda$load$105(NbtCompound nbt, String string) {
    // vanilla stuff
}

I tested the following versions:

  • 1.18.2 (FAPI 0.76.0 + LR 1.5.4)
  • 1.19 (FAPI 0.58.0)
  • 1.19.2 (FAPI 0.75.1)
  • 1.19.3 (FAPI 0.76.0 + LR 1.5.6)
  • 1.19.4 (FAPI 0.76.0 + LR 1.5.5)
  • 1.16.5 the patch shouldn't even be applied

fixed #1014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mod compatibility: Language Reload versions from 1.5 onwards no longer work correctly with OptiFabric.
1 participant