mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-27 18:15:44 -05:00
Fixed end biome source injection (#2940)
(cherry picked from commit 348a9c6486
)
This commit is contained in:
parent
1b664772cf
commit
f1c68e5823
1 changed files with 9 additions and 2 deletions
|
@ -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<RegistryEntry<Biome>> biomes) {
|
||||
if (!biomeSetModified) {
|
||||
biomeSetModified = true;
|
||||
if (!hasCheckedForModifiedSet) {
|
||||
hasCheckedForModifiedSet = true;
|
||||
biomeSetModified = !overrides.get().customBiomes.isEmpty();
|
||||
}
|
||||
|
||||
if (biomeSetModified) {
|
||||
biomes.addAll(overrides.get().customBiomes);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue