This commit is contained in:
FalsePattern committed 2022-03-22 11:42:57 +01:00
1 parent 1a8aa60577
commit 918e880155
6 files changed
+35 -29

No files matched your search

@@ -3,7 +3,6 @@ package com.falsepattern.endlessids.asm;
import java.util.HashMap;
import com.falsepattern.endlessids.asm.transformer.WorldEditBaseBlock;
import com.falsepattern.endlessids.asm.transformer.MFQM;
import com.falsepattern.endlessids.asm.transformer.CofhBlockHelper;
import com.falsepattern.endlessids.asm.transformer.FmlRegistry;
import java.util.Map;
@@ -26,7 +25,7 @@ public enum ClassEdit
//VanillaItemInWorldManager(new VanillaItemInWorldManager(), new String[] { "net.minecraft.server.management.ItemInWorldManager" }),
//VanillaWorld(new VanillaWorld(), new String[] { "net.minecraft.world.World" }),
FmlRegistry(new FmlRegistry(), new String[] { "cpw.mods.fml.common.registry.GameData", "cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry" }),
CofhBlockHelper(new CofhBlockHelper(), new String[] { "cofh.lib.util.helpers.BlockHelper" }),
//CofhBlockHelper(new CofhBlockHelper(), new String[] { "cofh.lib.util.helpers.BlockHelper" }),
//UndergroundBiomesOreUBifier(new UndergroundBiomesOreUBifier(), new String[] { "exterminatorJeff.undergroundBiomes.worldGen.OreUBifier" }),
//UndergroundBiomesBiomeUndergroundDecorator(new UndergroundBiomesBiomeUndergroundDecorator(), new String[] { "exterminatorJeff.undergroundBiomes.worldGen.BiomeUndergroundDecorator" }),
MFQM(new MFQM(), new String[] { "MoreFunQuicksandMod.main.MFQM" }),
@@ -1,23 +0,0 @@
package com.falsepattern.endlessids.asm.transformer;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.objectweb.asm.tree.MethodNode;
import com.falsepattern.endlessids.asm.AsmUtil;
import org.objectweb.asm.tree.ClassNode;
import com.falsepattern.endlessids.asm.IClassNodeTransformer;
public class CofhBlockHelper implements IClassNodeTransformer
{
public CofhBlockHelper() {
super();
}
@Override
public void transform(final ClassNode cn, final boolean obfuscated) {
final MethodNode method = AsmUtil.findMethod(cn, "<clinit>");
if (!AsmUtil.transformInlinedSizeMethod(cn, method, VanillaConstants.blockIDCount, ExtendedConstants.blockIDCount, true)) {
AsmUtil.transformInlinedSizeMethod(cn, method, VanillaConstants.blockIDCount / 4, ExtendedConstants.blockIDCount);
}
}
}