mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-12 04:57:31 +00:00
MoreFunQuicksandMod
This commit is contained in:
7 files changed
+62
-29
No files matched your search
@@ -2,7 +2,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.FmlRegistry;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -28,7 +27,7 @@ public enum ClassEdit
|
||||
//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" }),
|
||||
//MFQM(new MFQM(), new String[] { "MoreFunQuicksandMod.main.MFQM" }),
|
||||
WorldEditBaseBlock(new WorldEditBaseBlock(), new String[] { "com.sk89q.worldedit.blocks.BaseBlock" });
|
||||
|
||||
private static final Map<String, ClassEdit> editMap;
|
||||
|
||||
@@ -1,25 +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 com.falsepattern.endlessids.asm.Name;
|
||||
import com.falsepattern.endlessids.IEConfig;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import com.falsepattern.endlessids.asm.IClassNodeTransformer;
|
||||
|
||||
public class MFQM implements IClassNodeTransformer
|
||||
{
|
||||
public MFQM() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transform(final ClassNode cn, final boolean obfuscated) {
|
||||
if (IEConfig.extendDataWatcher) {
|
||||
final MethodNode method = AsmUtil.findMethod(cn, Name.MFQM_preInit);
|
||||
AsmUtil.transformInlinedSizeMethod(cn, method, VanillaConstants.watchableMask, ExtendedConstants.watchableMask);
|
||||
}
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.mfqm;
|
||||
|
||||
import MoreFunQuicksandMod.main.MFQM;
|
||||
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(value = MFQM.class, remap = false)
|
||||
public abstract class MFQMDataWatcherMixin {
|
||||
@ModifyConstant(method = "preInit",
|
||||
constant = {
|
||||
@Constant(intValue = VanillaConstants.maxWatchableID, ordinal = 0),
|
||||
@Constant(intValue = VanillaConstants.maxWatchableID, ordinal = 1),
|
||||
@Constant(intValue = VanillaConstants.maxWatchableID, ordinal = 2)
|
||||
},
|
||||
require = 3)
|
||||
private int extendWatchableIDLimit(int constant) {
|
||||
return ExtendedConstants.maxWatchableID;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.mfqm;
|
||||
|
||||
import MoreFunQuicksandMod.main.MFQM;
|
||||
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(value = MFQM.class, remap = false)
|
||||
public abstract class MFQMMixin {
|
||||
@ModifyConstant(method = "preInit",
|
||||
constant = {
|
||||
@Constant(intValue = VanillaConstants.maxBlockID),
|
||||
@Constant(intValue = 31999)
|
||||
},
|
||||
require = 2)
|
||||
private int extendWatchableIDLimit(int constant) {
|
||||
return ExtendedConstants.maxBlockID;
|
||||
}
|
||||
|
||||
@ModifyConstant(method = "preInit",
|
||||
constant = @Constant(stringValue = "Must be different in range between 20 and 31"),
|
||||
require = 1)
|
||||
private String changeConfigText(String constant) {
|
||||
return constant + " (Notice from EndlessIDs: If you enable the ExtendDataWatcher config option in the endlessids config file, the maximum value will be 127 instead, same for the other datawatcher ids in this file)";
|
||||
}
|
||||
}
|
||||
@@ -46,8 +46,12 @@ public enum Mixin {
|
||||
CofhBlockHelperMixin(builder(Side.COMMON).target(TargetedMod.COFHLIB).mixin("cofhlib.BlockHelperMixin")),
|
||||
//END CoFHLib->common
|
||||
//BEGIN DragonAPI->common
|
||||
BlockPropertiesMixin(builder(Side.COMMON).target(TargetedMod.DRAGONAPI).mixin("dragonapi.BlockPropertiesMixin"))
|
||||
BlockPropertiesMixin(builder(Side.COMMON).target(TargetedMod.DRAGONAPI).mixin("dragonapi.BlockPropertiesMixin")),
|
||||
//END DragonAPI->common
|
||||
//BEGIN MFQM->common
|
||||
MFQMMixin(builder(Side.COMMON).target(TargetedMod.MFQM).mixin("mfqm.MFQMMixin")),
|
||||
MFQMDataWatcherMixin(builder(Side.COMMON).target(TargetedMod.MFQM).condition(() -> IEConfig.extendDataWatcher).mixin("mfqm.MFQMDataWatcherMixin"))
|
||||
//END MFQM->common
|
||||
;
|
||||
|
||||
public final String mixin;
|
||||
|
||||
@@ -10,7 +10,8 @@ public enum TargetedMod {
|
||||
VANILLA("Minecraft", "", "", true),
|
||||
UBC("Underground Biomes Constructs", "undergroundbiomesconstructs-", "", false),
|
||||
COFHLIB("CoFH Lib", "cofhlib-", "", false),
|
||||
DRAGONAPI("DragonAPI", "dragonapi", "", false);
|
||||
DRAGONAPI("DragonAPI", "dragonapi", "", false),
|
||||
MFQM("More Fun Quicksand Mod", "morefunquicksandmod-", "", false);
|
||||
|
||||
public final String modName;
|
||||
public final String jarNamePrefixLowercase;
|
||||
|
||||
Reference in new issue
Block a user