From f1c68e5823942c9ceee6d5c519f4a92b99a6c395 Mon Sep 17 00:00:00 2001 From: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com> Date: Wed, 15 Mar 2023 05:13:42 -0400 Subject: [PATCH] Fixed end biome source injection (#2940) (cherry picked from commit 348a9c64868dc3aee365d4ecd9831d5ab2d7d656) --- .../fabric/mixin/biome/TheEndBiomeSourceMixin.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/mixin/biome/TheEndBiomeSourceMixin.java b/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/mixin/biome/TheEndBiomeSourceMixin.java index 8bf055bb0..3d156f4c6 100644 --- a/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/mixin/biome/TheEndBiomeSourceMixin.java +++ b/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/mixin/biome/TheEndBiomeSourceMixin.java @@ -55,6 +55,9 @@ public class TheEndBiomeSourceMixin extends BiomeSourceMixin { @Unique private boolean biomeSetModified = false; + @Unique + private boolean hasCheckedForModifiedSet = false; + /** * Modifies the codec, so it calls the static factory method that gives us access to the * full biome registry instead of just the pre-defined biomes that vanilla uses. @@ -106,8 +109,12 @@ public class TheEndBiomeSourceMixin extends BiomeSourceMixin { @Override protected void fabric_modifyBiomeSet(Set> biomes) { - if (!biomeSetModified) { - biomeSetModified = true; + if (!hasCheckedForModifiedSet) { + hasCheckedForModifiedSet = true; + biomeSetModified = !overrides.get().customBiomes.isEmpty(); + } + + if (biomeSetModified) { biomes.addAll(overrides.get().customBiomes); } }