Extended Planets compat

#234
This commit is contained in:
FalsePattern committed 2025-06-04 12:53:43 +02:00
1 parent 3af6751f3c
commit 9a8a38a4a5
5 files changed
+56

No files matched your search

@@ -0,0 +1,47 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.extendedplanets;
import ExtendedPlanets.dimension.other.ChunkProviderOcean;
import com.falsepattern.endlessids.mixin.helpers.BiomePatchHelper;
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(ChunkProviderOcean.class)
public abstract class ChunkProviderOceanMixin {
@Shadow(remap = false) private BiomeGenBase[] biomesForGeneration;
@Redirect(method = "provideChunk",
at = @At(value = "INVOKE",
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B"),
require = 1)
private byte[] setBiomesTweaked(Chunk instance) {
return BiomePatchHelper.getBiomeArrayTweaked(instance, biomesForGeneration);
}
}
@@ -135,6 +135,9 @@ public enum Mixin implements IMixin {
//region Erebus
ErebusModBiomesMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.EREBUS)), "biome.erebus.ModBiomesMixin"),
//endregion Erebus
//region Extended Planets
ChunkProviderOceanMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.EXTENDEDPLANETS)), "biome.extendedplanets.ChunkProviderOceanMixin"),
//endregion
//region ExtraPlanets
ExtraPlanetsConfigMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.EXTRAPLANETS)), "biome.extraplanets.ConfigMixin"),
//endregion ExtraPlanets
@@ -52,6 +52,7 @@ public enum TargetedMod implements ITargetedMod {
EB("Enhanced Biomes", false, contains("Enhanced Biomes").or(contains("enhancedbiomes"))),
ENDERLICIOUS("Enderlicious", false, contains("enderlicious-")),
EREBUS("The Erebus", false, contains("theerebus")),
EXTENDEDPLANETS("Extended Planets", false, contains("extendedplanets-")),
EXTRAPLANETS("Extra Planets", false, contains("extraplanets-")),
EXTRAUTILITIES("Extra Utilities", false, contains("extrautilities-")),
FACTORIZATION("Factorization", false, contains("factorization-")),