mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-17 14:35:06 +00:00
Realistic Terrain Generation compat
This commit is contained in:
7 files changed
+79
No files matched your search
+44
@@ -0,0 +1,44 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.rtg;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
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 rtg.world.gen.ChunkProviderRTG;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
@Mixin(value = ChunkProviderRTG.class,
|
||||
remap = false)
|
||||
public abstract class ChunkProviderRTGMixin {
|
||||
@Shadow private BiomeGenBase[] baseBiomesList;
|
||||
|
||||
@Shadow private int[] xyinverted;
|
||||
|
||||
@Redirect(method = "provideChunk",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B",
|
||||
remap = true),
|
||||
remap = true,
|
||||
require = 1)
|
||||
private byte[] redictBiomeArrayFillLogic(Chunk chunk) {
|
||||
short[] biomes = ((IChunkMixin)chunk).getBiomeShortArray();
|
||||
|
||||
for(int i = 0; i < biomes.length; ++i) {
|
||||
biomes[i] = (short) baseBiomesList[xyinverted[i]].biomeID;
|
||||
}
|
||||
return new byte[0];
|
||||
}
|
||||
|
||||
@Redirect(method = "provideChunk",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/chunk/Chunk;setBiomeArray([B)V",
|
||||
remap = true),
|
||||
remap = true,
|
||||
require = 1)
|
||||
private void removeUnnecessarySet(Chunk chunk, byte[] bytes) {
|
||||
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.rtg;
|
||||
|
||||
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;
|
||||
import rtg.world.gen.LandscapeGenerator;
|
||||
|
||||
@Mixin(value = LandscapeGenerator.class,
|
||||
remap = false)
|
||||
public abstract class LandscapeGeneratorMixin {
|
||||
@ModifyConstant(method = "getNewerNoise",
|
||||
constant = @Constant(intValue = VanillaConstants.biomeIDCount),
|
||||
require = 1)
|
||||
private int extendIDs(int constant) {
|
||||
return ExtendedConstants.biomeIDCount;
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.rtg;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import rtg.world.biome.realistic.RealisticBiomeBase;
|
||||
|
||||
@Mixin(RealisticBiomeBase.class)
|
||||
public abstract class RealisticBiomeBaseMixin {
|
||||
}
|
||||
@@ -94,6 +94,11 @@ public enum Mixin implements IMixin {
|
||||
MFQMDataWatcherMixin(Side.COMMON, require(TargetedMod.MFQM).and(condition(() -> IEConfig.extendDataWatcher)),
|
||||
"mfqm.MFQMDataWatcherMixin"),
|
||||
//endregion MFQM->common
|
||||
//region RTG->common
|
||||
RTGChunkProviderRTGMixin(Side.COMMON, require(TargetedMod.RTG), "rtg.ChunkProviderRTGMixin"),
|
||||
RTGLandscapeGeneratorMixin(Side.COMMON, require(TargetedMod.RTG), "rtg.LandscapeGeneratorMixin"),
|
||||
RTGRealisticBiomeBaseMixin(Side.COMMON, require(TargetedMod.RTG), "rtg.RealisticBiomeBaseMixin"),
|
||||
//endregion RTG->common
|
||||
//region UBC->common
|
||||
UBCOreUBifierMixin(Side.COMMON, require(TargetedMod.UBC), "ubc.OreUBifierMixin"),
|
||||
UBCBiomeUndergroundDecoratorMixin(Side.COMMON, require(TargetedMod.UBC), "ubc.BiomeUndergroundDecoratorMixin"),
|
||||
|
||||
@@ -18,6 +18,7 @@ public enum TargetedMod implements ITargetedMod {
|
||||
DRAGONAPI("DragonAPI", false, startsWith("dragonapi")),
|
||||
GALACTICRAFTCORE("GalactiCraftCore", false, startsWith("galacticraftcore")),
|
||||
MFQM("More Fun Quicksand Mod", false, startsWith("morefunquicksandmod-")),
|
||||
RTG("Realistic Terrain Generation", true, startsWith("rtg-")),
|
||||
UBC("Underground Biomes Constructs", false, startsWith("undergroundbiomesconstructs-")),
|
||||
WORLDEDIT("WorldEdit", false, startsWith("worldedit-")),
|
||||
;
|
||||
|
||||
Reference in new issue
Block a user