mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-12 04:57:31 +00:00
better biometweaker compat
This commit is contained in:
1 file changed
+16
@@ -55,6 +55,22 @@ public final class DevFixer {
|
||||
if (IETransformer.isObfuscated) {
|
||||
return;
|
||||
}
|
||||
remapBlocks(cn);
|
||||
if (cn.name.equals("net/minecraft/world/biome/BiomeGenBase")) {
|
||||
biomeTweakerCompat(cn);
|
||||
}
|
||||
}
|
||||
|
||||
private static void biomeTweakerCompat(final ClassNode cn) {
|
||||
for (val field: cn.fields) {
|
||||
if (field.name.startsWith("spawnable")) {
|
||||
field.access &= ~Opcodes.ACC_PROTECTED;
|
||||
field.access |= Opcodes.ACC_PUBLIC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void remapBlocks(final ClassNode cn) {
|
||||
for (val method: cn.methods) {
|
||||
val instructions = method.instructions;
|
||||
int insnCount = instructions.size();
|
||||
|
||||
Reference in new issue
Block a user