mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-23 06:01:38 -09:00
1.12 method correction
1.8->1.12 method correction
This commit is contained in:
parent
a99ae8272f
commit
8c0d5765e9
@ -7,6 +7,13 @@ ModAPI.meta.credits("By ZXMushroom63");
|
|||||||
const ResourceLocation = ModAPI.reflect.getClassByName("ResourceLocation").constructors.find(x => x.length === 1);
|
const ResourceLocation = ModAPI.reflect.getClassByName("ResourceLocation").constructors.find(x => x.length === 1);
|
||||||
//AsyncSink is a plugin to debug and override asynchronous methods in EaglercraftX
|
//AsyncSink is a plugin to debug and override asynchronous methods in EaglercraftX
|
||||||
async function runtimeComponent() {
|
async function runtimeComponent() {
|
||||||
|
let booleanResult;
|
||||||
|
//jl_Boolean_valueOf-> 1.12, nlevit_BooleanResult__new-> 1.8
|
||||||
|
if (ModAPI.is_1_12) {
|
||||||
|
booleanResult = (b) => ModAPI.hooks.methods.jl_Boolean_valueOf(b * 1);
|
||||||
|
} else {
|
||||||
|
booleanResult = (b) => ModAPI.hooks.methods.nlevit_BooleanResult__new(b * 1);
|
||||||
|
}
|
||||||
const booleanResult = (b) => ModAPI.hooks.methods.nlevit_BooleanResult__new(b * 1);
|
const booleanResult = (b) => ModAPI.hooks.methods.nlevit_BooleanResult__new(b * 1);
|
||||||
const wrap = ModAPI.hooks.methods.otji_JSWrapper_wrap;
|
const wrap = ModAPI.hooks.methods.otji_JSWrapper_wrap;
|
||||||
const unwrap = ModAPI.hooks.methods.otji_JSWrapper_unwrap;
|
const unwrap = ModAPI.hooks.methods.otji_JSWrapper_unwrap;
|
||||||
@ -401,4 +408,4 @@ ModAPI.meta.credits("By ZXMushroom63");
|
|||||||
return soundPool;
|
return soundPool;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user