mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-22 23:39:40 +00:00
16 million item IDs
This commit is contained in:
13 files changed
+260
-139
No files matched your search
@@ -2,6 +2,7 @@ package com.falsepattern.endlessids.asm.transformer;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
import lombok.var;
|
||||
import org.objectweb.asm.tree.FieldNode;
|
||||
import com.falsepattern.endlessids.asm.AsmTransformException;
|
||||
import org.objectweb.asm.tree.MethodNode;
|
||||
@@ -17,7 +18,11 @@ public class FmlRegistry implements IClassNodeTransformer
|
||||
|
||||
@Override
|
||||
public void transform(final ClassNode cn, final boolean obfuscated) {
|
||||
final FieldNode field = AsmUtil.findField(cn, "MAX_BLOCK_ID", true);
|
||||
var field = AsmUtil.findField(cn, "MAX_BLOCK_ID", true);
|
||||
if (field != null) {
|
||||
field.value = ExtendedConstants.maxBlockID;
|
||||
}
|
||||
field = AsmUtil.findField(cn, "MAX_ITEM_ID", true);
|
||||
if (field != null) {
|
||||
field.value = ExtendedConstants.maxBlockID;
|
||||
}
|
||||
@@ -26,6 +31,7 @@ public class FmlRegistry implements IClassNodeTransformer
|
||||
if (AsmUtil.transformInlinedSizeMethod(cn, method, VanillaConstants.maxBlockID, ExtendedConstants.maxBlockID, true)) {
|
||||
found = true;
|
||||
}
|
||||
AsmUtil.transformInlinedSizeMethod(cn, method, 31999, ExtendedConstants.maxBlockID, true);
|
||||
}
|
||||
if (!found) {
|
||||
throw new AsmTransformException("can't find 4095 constant in any method");
|
||||
|
||||
Reference in new issue
Block a user