mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-12 22:27:36 +00:00
OreUBifier
This commit is contained in:
4 files changed
+24
-23
No files matched your search
@@ -4,7 +4,6 @@ import java.util.HashMap;
|
||||
import com.falsepattern.endlessids.asm.transformer.WorldEditBaseBlock;
|
||||
import com.falsepattern.endlessids.asm.transformer.MFQM;
|
||||
import com.falsepattern.endlessids.asm.transformer.UndergroundBiomesBiomeUndergroundDecorator;
|
||||
import com.falsepattern.endlessids.asm.transformer.UndergroundBiomesOreUBifier;
|
||||
import com.falsepattern.endlessids.asm.transformer.CofhBlockHelper;
|
||||
import com.falsepattern.endlessids.asm.transformer.FmlRegistry;
|
||||
import java.util.Map;
|
||||
@@ -29,7 +28,7 @@ public enum ClassEdit
|
||||
//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" }),
|
||||
UndergroundBiomesOreUBifier(new UndergroundBiomesOreUBifier(), new String[] { "exterminatorJeff.undergroundBiomes.worldGen.OreUBifier" }),
|
||||
//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" }),
|
||||
WorldEditBaseBlock(new WorldEditBaseBlock(), new String[] { "com.sk89q.worldedit.blocks.BaseBlock" });
|
||||
|
||||
-21
@@ -1,21 +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 UndergroundBiomesOreUBifier implements IClassNodeTransformer
|
||||
{
|
||||
public UndergroundBiomesOreUBifier() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transform(final ClassNode cn, final boolean obfuscated) {
|
||||
final MethodNode method = AsmUtil.findMethod(cn, "renewBlockReplacers");
|
||||
AsmUtil.transformInlinedSizeMethod(cn, method, VanillaConstants.blockIDCount, ExtendedConstants.blockIDCount, false);
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.ubc;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
import exterminatorJeff.undergroundBiomes.worldGen.OreUBifier;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
|
||||
@Mixin(value = OreUBifier.class, remap = false)
|
||||
public abstract class OreUBifierMixin {
|
||||
@ModifyConstant(method = "renewBlockReplacers",
|
||||
constant = @Constant(intValue = VanillaConstants.blockIDCount),
|
||||
require = 1)
|
||||
private int extendReplacerArraySize(int constant) {
|
||||
return ExtendedConstants.blockIDCount;
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,11 @@ public enum Mixin {
|
||||
RenderGlobalMixin(builder(Side.CLIENT).mixin("vanilla.RenderGlobalMixin")),
|
||||
//END client
|
||||
//END Minecraft
|
||||
//BEGIN UBC
|
||||
//BEGIN common
|
||||
OreUBifierMixin(builder(Side.COMMON).target(TargetedMod.UBC).mixin("ubc.OreUBifierMixin"))
|
||||
//END common
|
||||
//END ubc
|
||||
;
|
||||
|
||||
public final String mixin;
|
||||
|
||||
Reference in new issue
Block a user