Thaumcraft compat

This commit is contained in:
FalsePattern committed 2022-07-11 00:02:17 +02:00
1 parent 42c59a668f
commit ef52fa6e51
5 files changed
+46

No files matched your search

+1
View File
@@ -26,6 +26,7 @@ This mod also contains patches for the following mods:
- More Fun Quicksand Mod
- Nature's Compass
- Realistic Terrain Generation
- Thaumcraft
- Twilight Forest
- Underground Biomes Constructs
- WorldEdit
+2
View File
@@ -21,6 +21,8 @@ dependencies {
compile(deobfMaven(curseMaven, "curse.maven:dynamicsurrounding-238891:2642381")) // 1.0.6.4
compile(deobfMaven(curseMaven, "curse.maven:immersivecavegen-521557:3649411")) // 1.2g
compile(deobfMaven(curseMaven, "curse.maven:twilightforest-227639:3039937")) // 2.3.8
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("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"))
}
@@ -0,0 +1,39 @@
package com.falsepattern.endlessids.mixin.mixins.common.thaumcraft;
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import thaumcraft.common.lib.network.PacketHandler;
import thaumcraft.common.lib.network.misc.PacketBiomeChange;
import thaumcraft.common.lib.utils.Utils;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
import cpw.mods.fml.common.network.NetworkRegistry;
@Mixin(value = Utils.class,
remap = false)
public abstract class UtilsMixin {
/**
* @author FalsePattern
* @reason Biome ID Extension
*/
@Overwrite
public static void setBiomeAt(World world, int x, int z, BiomeGenBase biome) {
if (biome != null) {
Chunk chunk = world.getChunkFromBlockCoords(x, z);
short[] array = ((IChunkMixin)chunk).getBiomeShortArray();
array[(z & 15) << 4 | x & 15] = (short)(biome.biomeID);
if (!world.isRemote) {
PacketHandler.INSTANCE.sendToAllAround(new PacketBiomeChange(x, z, (short)biome.biomeID),
new NetworkRegistry.TargetPoint(world.provider.dimensionId,
x,
world.getHeightValue(x, z),
z,
32.0));
}
}
}
}
@@ -118,6 +118,9 @@ public enum Mixin implements IMixin {
RTGLandscapeGeneratorMixin(Side.COMMON, require(TargetedMod.RTG), "rtg.LandscapeGeneratorMixin"),
RTGRealisticBiomeBaseMixin(Side.COMMON, require(TargetedMod.RTG), "rtg.RealisticBiomeBaseMixin"),
//endregion RTG->common
//region Thaumcraft->common
ThaumcraftUtilsMixin(Side.COMMON, require(TargetedMod.THAUMCRAFT), "thaumcraft.UtilsMixin"),
//endregion Thaumcraft->common
//region TwilightForest->common
ChunkProviderTwilightForestMixin(Side.COMMON, require(TargetedMod.TWILIGHTFOREST),
"twilightforest.ChunkProviderTwilightForestMixin"),
@@ -21,6 +21,7 @@ public enum TargetedMod implements ITargetedMod {
MFQM("More Fun Quicksand Mod", false, startsWith("morefunquicksandmod-")),
NATURESCOMPASS("Nature's Compass", true, startsWith("naturescompass")),
RTG("Realistic Terrain Generation", true, startsWith("rtg-")),
THAUMCRAFT("Thaumcraft", true, startsWith("thaumcraft")),
TWILIGHTFOREST("Twilight Forest", true, startsWith("twilightforest")),
UBC("Underground Biomes Constructs", false, startsWith("undergroundbiomesconstructs-")),
WORLDEDIT("WorldEdit", false, startsWith("worldedit-")),