[Fix] Handling of vanilla/fabric End Biomes
This commit is contained in:
parent
aaba0cec25
commit
c5c61a11fd
4 changed files with 22 additions and 18 deletions
|
@ -125,7 +125,10 @@ public class BCLibEndBiomeSource extends BCLBiomeSource implements BiomeSourceWi
|
|||
if (bclBiome != BiomeAPI.EMPTY_BIOME) {
|
||||
if (bclBiome.getParentBiome() == null) {
|
||||
if (config.withVoidBiomes) {
|
||||
if (BiomeAPI.wasRegisteredAsEndVoidBiome(biomeID)
|
||||
if (biomeID.equals(Biomes.THE_END.location())) {
|
||||
//we discard those Biomes
|
||||
} else if (BiomeAPI.wasRegisteredAsEndVoidBiome(biomeID)
|
||||
|| biomeID.equals(Biomes.SMALL_END_ISLANDS.location())
|
||||
|| TheEndBiomesHelper.isIntendedForEndBarrens(key)
|
||||
|| includeVoid.contains(biomeID.toString())
|
||||
) {
|
||||
|
@ -137,16 +140,17 @@ public class BCLibEndBiomeSource extends BCLBiomeSource implements BiomeSourceWi
|
|||
endLandBiomePicker.addBiome(bclBiome);
|
||||
}
|
||||
} else {
|
||||
if (BiomeAPI.wasRegisteredAsEndLandBiome(biomeID)
|
||||
if (biomeID.equals(Biomes.SMALL_END_ISLANDS.location())
|
||||
|| biomeID.equals(Biomes.THE_END.location())
|
||||
) {
|
||||
//we discard those Biomes
|
||||
} else if (BiomeAPI.wasRegisteredAsEndLandBiome(biomeID)
|
||||
|| TheEndBiomesHelper.isIntendedForEndLand(key)
|
||||
|| includeLand.contains(biomeID.toString())
|
||||
) {
|
||||
endLandBiomePicker.addBiome(bclBiome);
|
||||
endVoidBiomePicker.addBiome(bclBiome);
|
||||
}
|
||||
if (!biomeID.equals(Biomes.SMALL_END_ISLANDS.location()) && !biomeID.equals(Biomes.THE_END.location())
|
||||
&& (BiomeAPI.wasRegisteredAsEndVoidBiome(biomeID) || includeVoid.contains(biomeID.toString()))
|
||||
) {
|
||||
} else if (BiomeAPI.wasRegisteredAsEndVoidBiome(biomeID) || includeVoid.contains(biomeID.toString())) {
|
||||
endVoidBiomePicker.addBiome(bclBiome);
|
||||
}
|
||||
|
||||
|
@ -272,7 +276,6 @@ public class BCLibEndBiomeSource extends BCLBiomeSource implements BiomeSourceWi
|
|||
mapLand.clearCache();
|
||||
mapVoid.clearCache();
|
||||
}
|
||||
|
||||
if (config.generatorVersion == BCLEndBiomeSourceConfig.EndBiomeGeneratorType.VANILLA || endLandFunction == null) {
|
||||
if (dist <= (long) config.innerVoidRadiusSquared) {
|
||||
return this.centerBiome;
|
||||
|
|
|
@ -75,7 +75,7 @@ public class TheEndBiomesHelper {
|
|||
* and any biomes added to the End as midland biome by mods.
|
||||
*/
|
||||
public static boolean isIntendedForEndMidlands(ResourceKey<Biome> biome) {
|
||||
return get().bcl_canGenerateAsEndMidlandBiome(biome);
|
||||
return get().bcl_canGenerateAsEndMidlandBiome(biome) && !get().bcl_canGenerateAsEndBiome(biome);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -83,7 +83,8 @@ public class TheEndBiomesHelper {
|
|||
* and any biomes added to the End as barrens biome by mods.
|
||||
*/
|
||||
public static boolean isIntendedForEndBarrens(ResourceKey<Biome> biome) {
|
||||
return get().bcl_canGenerateAsEndBarrensBiome(biome);
|
||||
return get().bcl_canGenerateAsEndBarrensBiome(biome) && !get().bcl_canGenerateAsEndBiome(biome) && !get().bcl_canGenerateAsEndMidlandBiome(
|
||||
biome);
|
||||
}
|
||||
|
||||
public static boolean isIntendedForEndLand(ResourceKey<Biome> biome) {
|
||||
|
|
|
@ -31,7 +31,7 @@ public class BCLEndBiomeSourceConfig implements BiomeSourceConfig<BCLibEndBiomeS
|
|||
public static final BCLEndBiomeSourceConfig MINECRAFT_18 = new BCLEndBiomeSourceConfig(
|
||||
EndBiomeMapType.HEX,
|
||||
EndBiomeGeneratorType.PAULEVS,
|
||||
false,
|
||||
true,
|
||||
MINECRAFT_17.innerVoidRadiusSquared
|
||||
);
|
||||
public static final BCLEndBiomeSourceConfig DEFAULT = MINECRAFT_18;
|
||||
|
|
|
@ -117,14 +117,14 @@ public class BiomeAPI {
|
|||
|
||||
|
||||
public static final BCLBiome THE_END = registerCenterBiome(getFromRegistry(Biomes.THE_END));
|
||||
public static final BCLBiome END_MIDLANDS = registerSubBiome(
|
||||
THE_END,
|
||||
getFromRegistry(Biomes.END_MIDLANDS).value(),
|
||||
|
||||
public static final BCLBiome END_HIGHLANDS = registerEndLandBiome(
|
||||
getFromRegistry(Biomes.END_HIGHLANDS),
|
||||
0.5F
|
||||
);
|
||||
public static final BCLBiome END_HIGHLANDS = registerSubBiome(
|
||||
THE_END,
|
||||
getFromRegistry(Biomes.END_HIGHLANDS).value(),
|
||||
public static final BCLBiome END_MIDLANDS = registerSubBiome(
|
||||
END_HIGHLANDS,
|
||||
getFromRegistry(Biomes.END_MIDLANDS).value(),
|
||||
0.5F
|
||||
);
|
||||
|
||||
|
@ -302,7 +302,7 @@ public class BiomeAPI {
|
|||
public static BCLBiome registerEndVoidBiome(Holder<Biome> biome) {
|
||||
BCLBiome bclBiome = new BCLBiome(biome.value(), null);
|
||||
|
||||
registerBiome(bclBiome, BiomeType.END_VOID);
|
||||
registerBiome(bclBiome, BiomeType.OTHER_END_VOID);
|
||||
return bclBiome;
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ public class BiomeAPI {
|
|||
VanillaBiomeSettings.createVanilla().setGenChance(genChance).build()
|
||||
);
|
||||
|
||||
registerBiome(bclBiome, BiomeType.END_VOID);
|
||||
registerBiome(bclBiome, BiomeType.OTHER_END_VOID);
|
||||
return bclBiome;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue