mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-28 15:56:09 +00:00
Fix some version checks to properly respect *major* class version
This commit is contained in:
1 parent
33c1d2ee0d
commit
0dc21a78ee
3 files changed
+32
-6
No files matched your search
@@ -671,9 +671,9 @@ public final class MixinEnvironment implements ITokenProvider {
|
||||
|
||||
private CompatibilityLevel maxCompatibleLevel;
|
||||
|
||||
private CompatibilityLevel(int ver, int classMajorVersion, int languageFeatures) {
|
||||
private CompatibilityLevel(int ver, int classVersion, int languageFeatures) {
|
||||
this.ver = ver;
|
||||
this.classVersion = classMajorVersion & 0xFF;
|
||||
this.classVersion = classVersion;
|
||||
this.languageFeatures = languageFeatures;
|
||||
}
|
||||
|
||||
@@ -702,6 +702,13 @@ public final class MixinEnvironment implements ITokenProvider {
|
||||
return this.classVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the major class version expected at this compatibility level
|
||||
*/
|
||||
public int getClassMajorVersion() {
|
||||
return this.classVersion & 0xFFFF;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all supported language features
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user