mirror of
https://github.com/barkeser2002/JMT-MCMT.git
synced 2026-09-25 01:49:52 +03:00
Also fixed a bug with worldparallel which resulted in the world postTick event being fired before the world had finished ticking Also Also found a bug where one mod's worldgen broke to a hardlockup despite the error not occuring in any parallelised code
64 lines
2.3 KiB
JavaScript
64 lines
2.3 KiB
JavaScript
// Was used to poke sorted arrayset; shouldn't be needed
|
|
return {
|
|
'SortedArraySetAdd': {
|
|
'target': {
|
|
'type': 'METHOD',
|
|
'class': 'net.minecraft.util.SortedArraySet',
|
|
"methodName": "add",
|
|
"methodDesc": "(Ljava/lang/Object;)Z"
|
|
},
|
|
"transformer": synchronizeMethod("SortedArraySetAdd")
|
|
},
|
|
'SortedArraySetClear': {
|
|
'target': {
|
|
'type': 'METHOD',
|
|
'class': 'net.minecraft.util.SortedArraySet',
|
|
"methodName": "clear",
|
|
"methodDesc": "()V"
|
|
},
|
|
"transformer": synchronizeMethod("SortedArraySetClear")
|
|
},
|
|
'SortedArraySetContains': {
|
|
'target': {
|
|
'type': 'METHOD',
|
|
'class': 'net.minecraft.util.SortedArraySet',
|
|
"methodName": "contains",
|
|
"methodDesc": "(Ljava/lang/Object;)Z"
|
|
},
|
|
"transformer": synchronizeMethod("SortedArraySetContains")
|
|
},
|
|
'SortedArraySet_func_226175_a_': {
|
|
'target': {
|
|
'type': 'METHOD',
|
|
'class': 'net.minecraft.util.SortedArraySet',
|
|
"methodName": "func_226175_a_",
|
|
"methodDesc": "(Ljava/lang/Object;)Ljava/lang/Object;"
|
|
},
|
|
"transformer": synchronizeMethod("SortedArraySet_func_226175_a_")
|
|
},
|
|
'SortedArraySetNewSet': {
|
|
'target': {
|
|
'type': 'METHOD',
|
|
'class': 'net.minecraft.util.SortedArraySet',
|
|
'methodName': "func_226172_a_",
|
|
'methodDesc': "(I)Lnet/minecraft/util/SortedArraySet"
|
|
},
|
|
"transformer": function(methodNode) {
|
|
print("[JMTSUPERTRANS] SortedArraySetNewSet Transformer Called");
|
|
|
|
//java.util.Comparator.nullsFirst(Comparator<? super T>)
|
|
var asmapi = Java.type('net.minecraftforge.coremod.api.ASMAPI');
|
|
var MethodType = asmapi.MethodType;
|
|
|
|
var callTarget = asmapi.findFirstMethodCallAfter(methodNode, MethodType.STATIC,
|
|
"java/util/Comparator", "naturalOrder", "()Ljava/util/Comparator;", 0);
|
|
|
|
var insn = asmapi.buildMethodCall("java/util/Comparator", "nullsLast", "(Ljava/util/Comparator;)Ljava/util/Comparator;", MethodType.STATIC);
|
|
instructions.insert(callTarget, insn);
|
|
|
|
print("[JMTSUPERTRANS] SortedArraySetNewSet Transformer Complete");
|
|
|
|
return methodNode
|
|
}
|
|
}
|
|
} |