mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-16 21:05:01 +00:00
CoFH Lib
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.cofhlib;
|
||||
|
||||
import cofh.lib.util.helpers.BlockHelper;
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
|
||||
@Mixin(BlockHelper.class)
|
||||
public abstract class BlockHelperMixin {
|
||||
@ModifyConstant(method = "<clinit>",
|
||||
constant = {@Constant(intValue = VanillaConstants.blockIDCount), @Constant(intValue = VanillaConstants.blockIDCount / 4)},
|
||||
require = 1)
|
||||
private static int extend(int constant) {
|
||||
return ExtendedConstants.blockIDCount;
|
||||
}
|
||||
}
|
||||
@@ -41,9 +41,14 @@ public enum Mixin {
|
||||
//BEGIN UBC
|
||||
//BEGIN common
|
||||
OreUBifierMixin(builder(Side.COMMON).target(TargetedMod.UBC).mixin("ubc.OreUBifierMixin")),
|
||||
BiomeUndergroundDecoratorMixin(builder(Side.COMMON).target(TargetedMod.UBC).mixin("ubc.BiomeUndergroundDecoratorMixin"))
|
||||
BiomeUndergroundDecoratorMixin(builder(Side.COMMON).target(TargetedMod.UBC).mixin("ubc.BiomeUndergroundDecoratorMixin")),
|
||||
//END common
|
||||
//END ubc
|
||||
//END UBC
|
||||
//BEGIN CoFHLib
|
||||
//BEGIN common
|
||||
CofhBlockHelperMixin(builder(Side.COMMON).target(TargetedMod.COFHLIB).mixin("cofhlib.BlockHelperMixin"))
|
||||
//END common
|
||||
//END CoFHLib
|
||||
;
|
||||
|
||||
public final String mixin;
|
||||
|
||||
@@ -8,7 +8,8 @@ import java.nio.file.Path;
|
||||
public enum TargetedMod {
|
||||
|
||||
VANILLA("Minecraft", "", "", true),
|
||||
UBC("UndergroundBiomesConstructs", "undergroundbiomesconstructs-1.7.10", "", false);
|
||||
UBC("Underground Biomes Constructs", "undergroundbiomesconstructs-", "", false),
|
||||
COFHLIB("CoFH Lib", "cofhlib-", "", false);
|
||||
|
||||
public final String modName;
|
||||
public final String jarNamePrefixLowercase;
|
||||
|
||||
Reference in new issue
Block a user