mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-22 21:51:17 -09:00
fix entity keygen on 1.12
This commit is contained in:
parent
0e0733926a
commit
0cc8f52921
@ -1210,8 +1210,18 @@ const modapi_postinit = "(" + (() => {
|
||||
return qhash(block, values, 4095);
|
||||
}
|
||||
ModAPI.keygen.entity = function (entity) {
|
||||
var values = [];
|
||||
if (ModAPI.is_1_12) {
|
||||
var arrayList = ModAPI.util.wrap(ModAPI.reflect.getClassById("net.minecraft.entity.EntityList").staticVariables.field_191311_g).getCorrective().array;
|
||||
arrayList.forEach((x, i) => {
|
||||
if (x) {
|
||||
values.push(i);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var hashMap = ModAPI.util.wrap(ModAPI.reflect.getClassById("net.minecraft.entity.EntityList").staticVariables.idToClassMapping).getCorrective();
|
||||
var values = hashMap.keys.getRef().data.filter(x => hashMap.get(x));
|
||||
values = hashMap.keys.getRef().data.filter(x => hashMap.get(x));
|
||||
}
|
||||
return qhash(entity, values, 127);
|
||||
}
|
||||
}).toString() + ")();";
|
||||
|
Loading…
x
Reference in New Issue
Block a user