mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-12 06:07:31 +00:00
Futurepack compat (fixes #16)
This commit is contained in:
7 files changed
+53
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.futurepack;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.BiomePatchHelper;
|
||||
import futurepack.common.dim.ChunkProviderSpace;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
@Mixin(value = ChunkProviderSpace.class,
|
||||
remap = false)
|
||||
public abstract class ChunkProviderSpaceMixin {
|
||||
@Shadow
|
||||
private BiomeGenBase[] biomesForGeneration;
|
||||
|
||||
@Redirect(method = "provideChunk",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B",
|
||||
remap = true),
|
||||
remap = true,
|
||||
require = 1)
|
||||
private byte[] setBiomesTweaked(Chunk chunk) {
|
||||
return BiomePatchHelper.getBiomeArrayTweaked(chunk, biomesForGeneration);
|
||||
}
|
||||
}
|
||||
@@ -126,6 +126,9 @@ public enum Mixin implements IMixin {
|
||||
ChunkProviderEndOfTimeMixin(Side.COMMON, require(TargetedMod.EXTRAUTILITIES), "extrautilities.ChunkProviderEndOfTimeMixin"),
|
||||
ChunkProviderUnderdarkMixin(Side.COMMON, require(TargetedMod.EXTRAUTILITIES), "extrautilities.ChunkProviderUnderdarkMixin"),
|
||||
//endregion ExtraUtilities->common
|
||||
//region Futurepack->common
|
||||
FuturepackChunkProviderSpaceMixin(Side.COMMON, require(TargetedMod.FUTUREPACK), "futurepack.ChunkProviderSpaceMixin"),
|
||||
//endregion Futurepack->common
|
||||
//region GalactiCraftCore->common
|
||||
GalactiCraftCoreConfigManagerCoreMixin(Side.COMMON, require(TargetedMod.GALACTICRAFTCORE),
|
||||
"galacticraft.ConfigManagerCoreMixin"),
|
||||
|
||||
@@ -22,6 +22,7 @@ public enum TargetedMod implements ITargetedMod {
|
||||
DRAGONAPI("DragonAPI", false, startsWith("dragonapi")),
|
||||
EREBUS("The Erebus", true, startsWith("theerebus")),
|
||||
EXTRAUTILITIES("Extra Utilities", true, startsWith("extrautilities-")),
|
||||
FUTUREPACK("Futurepack", true, startsWith("[1.7.10]futurepack").or(startsWith("futurepack-"))),
|
||||
GALACTICRAFTCORE("GalactiCraftCore", false, startsWith("galacticraftcore")),
|
||||
ICG("Immersive Cavegen", true, startsWith("immersivecavegen")),
|
||||
MFQM("More Fun Quicksand Mod", false, startsWith("morefunquicksandmod-")),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.falsepattern.endlessids.patching;
|
||||
|
||||
import com.falsepattern.endlessids.EndlessIDs;
|
||||
import com.falsepattern.endlessids.patching.patches.common.Futurepack;
|
||||
import com.falsepattern.endlessids.patching.patches.common.Tropicraft;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.val;
|
||||
@@ -15,6 +16,7 @@ public class CommonManager {
|
||||
|
||||
public CommonManager() {
|
||||
patches.add(new Tropicraft());
|
||||
patches.add(new Futurepack());
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.falsepattern.endlessids.patching.patches.common;
|
||||
|
||||
import com.falsepattern.endlessids.patching.Patch;
|
||||
|
||||
public class Futurepack extends Patch {
|
||||
public Futurepack() {
|
||||
super("fp");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean init() throws Exception {
|
||||
Class.forName("futurepack.common.dim.BiomeGenSpace");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user