mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-11 23:07:29 +00:00
Extra Utilities compat
This commit is contained in:
6 files changed
+109
No files matched your search
@@ -22,6 +22,7 @@ This mod also contains patches for the following mods:
|
||||
- Biomes O' Plenty
|
||||
- CoFH Lib
|
||||
- DragonAPI
|
||||
- Extra Utilities
|
||||
- GalactiCraft
|
||||
- Immersive Cavegen
|
||||
- More Fun Quicksand Mod
|
||||
|
||||
@@ -24,6 +24,7 @@ dependencies {
|
||||
compile(deobfMaven(curseMaven, "curse.maven:thaumcraft-223628:2227552")) // 4.2.3.5
|
||||
compile(deobfMaven(curseMaven, "curse.maven:baubles-227083:2224857")) // 1.0.1.10, dependency of thaumcraft
|
||||
compile(deobfMaven(curseMaven, "curse.maven:antiqueatlas-227795:2454232")) // 4.4.4
|
||||
compile("curse.maven:extrautilities-225561:2264384") // 1.2.12
|
||||
compile("com.github.embeddedt:ArchaicFix:be8666cb2dbf2e0a8b799e88cef3c0d12e5d4911:dev")
|
||||
compileOnly(deobf("https://micdoodle8.com/new-builds/GC-1.7/504/GalacticraftCore-1.7-3.0.12.504.jar"))
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.extrautilities;
|
||||
|
||||
import com.falsepattern.endlessids.EndlessIDs;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.rwtema.extrautils.worldgen.endoftime.ChunkProviderEndOfTime;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
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;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Mixin(value = ChunkProviderEndOfTime.class,
|
||||
remap = false)
|
||||
public abstract class ChunkProviderEndOfTimeMixin {
|
||||
private int id;
|
||||
private Chunk chunk;
|
||||
|
||||
@Redirect(method = "provideChunk",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B",
|
||||
remap = true),
|
||||
remap = true,
|
||||
require = 1)
|
||||
private byte[] setBiomesTweaked1(Chunk instance) {
|
||||
chunk = instance;
|
||||
return EndlessIDs.BIOME_ARRAY_PLACEHOLDER;
|
||||
}
|
||||
|
||||
@Redirect(method = "provideChunk",
|
||||
at = @At(value = "FIELD",
|
||||
target = "Lnet/minecraft/world/biome/BiomeGenBase;biomeID:I",
|
||||
remap = true),
|
||||
remap = true)
|
||||
private int setBiomesTweaked2(BiomeGenBase instance) {
|
||||
return id = instance.biomeID;
|
||||
}
|
||||
|
||||
@Redirect(method = "provideChunk",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Ljava/util/Arrays;fill([BB)V"),
|
||||
remap = true,
|
||||
require = 1)
|
||||
private void setBiomesTweaked3(byte[] bytes, byte b) {
|
||||
try {
|
||||
Arrays.fill(((IChunkMixin) chunk).getBiomeShortArray(), (short) id);
|
||||
} finally {
|
||||
chunk = null;
|
||||
id = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.extrautilities;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.BiomePatchHelper;
|
||||
import com.rwtema.extrautils.worldgen.Underdark.ChunkProviderUnderdark;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
@Mixin(value = ChunkProviderUnderdark.class,
|
||||
remap = false)
|
||||
public abstract class ChunkProviderUnderdarkMixin {
|
||||
private BiomeGenBase[] bgb;
|
||||
|
||||
@SuppressWarnings("InvalidInjectorMethodSignature")
|
||||
@Inject(method = "provideChunk",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B",
|
||||
shift = At.Shift.BEFORE,
|
||||
remap = true),
|
||||
locals = LocalCapture.CAPTURE_FAILHARD,
|
||||
remap = true,
|
||||
require = 1)
|
||||
private void setBiomesTweaked1(int par1, int par2, CallbackInfoReturnable<Chunk> cir, Chunk chunk, Block[] arr, int spire_x, int spire_z, Block stone_type, BiomeGenBase[] abiomegenbase) {
|
||||
bgb = abiomegenbase;
|
||||
|
||||
}
|
||||
|
||||
@Redirect(method = "provideChunk",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B",
|
||||
remap = true),
|
||||
remap = true,
|
||||
require = 1)
|
||||
private byte[] setBiomesTweaked2(Chunk chunk) {
|
||||
try {
|
||||
return BiomePatchHelper.getBiomeArrayTweaked(chunk, bgb);
|
||||
} finally {
|
||||
bgb = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,6 +98,10 @@ public enum Mixin implements IMixin {
|
||||
DragonAPIBlockPropertiesMixin(Side.COMMON, require(TargetedMod.DRAGONAPI), "dragonapi.BlockPropertiesMixin"),
|
||||
DragonAPIIDTypeMixin(Side.COMMON, require(TargetedMod.DRAGONAPI), "dragonapi.IDTypeMixin"),
|
||||
//endregion DragonAPI->common
|
||||
//region ExtraUtilities->common
|
||||
ChunkProviderEndOfTimeMixin(Side.COMMON, require(TargetedMod.EXTRAUTILITIES), "extrautilities.ChunkProviderEndOfTimeMixin"),
|
||||
ChunkProviderUnderdarkMixin(Side.COMMON, require(TargetedMod.EXTRAUTILITIES), "extrautilities.ChunkProviderUnderdarkMixin"),
|
||||
//endregion ExtraUtilities->common
|
||||
//region GalactiCraftCore->common
|
||||
GalactiCraftCoreConfigManagerCoreMixin(Side.COMMON, require(TargetedMod.GALACTICRAFTCORE),
|
||||
"galacticraft.ConfigManagerCoreMixin"),
|
||||
|
||||
@@ -17,6 +17,7 @@ public enum TargetedMod implements ITargetedMod {
|
||||
BOP("Biomes O' Plenty", true, startsWith("biomesoplenty-")),
|
||||
COFHLIB("CoFH Lib", true, startsWith("cofhlib-")),
|
||||
DRAGONAPI("DragonAPI", false, startsWith("dragonapi")),
|
||||
EXTRAUTILITIES("Extra Utilities", true, startsWith("extrautilities-")),
|
||||
GALACTICRAFTCORE("GalactiCraftCore", false, startsWith("galacticraftcore")),
|
||||
ICG("Immersive Cavegen", true, startsWith("immersivecavegen")),
|
||||
MFQM("More Fun Quicksand Mod", false, startsWith("morefunquicksandmod-")),
|
||||
|
||||
Reference in new issue
Block a user