[Change] Added old End Biome-tag

This commit is contained in:
Frank 2022-07-03 12:54:42 +02:00
parent 3e81071b96
commit 102db44595
3 changed files with 4 additions and 9 deletions

View file

@ -1,7 +1,6 @@
package org.betterx.bclib.api.v2.levelgen.biomes; package org.betterx.bclib.api.v2.levelgen.biomes;
import org.betterx.bclib.util.WeightedList; import org.betterx.bclib.util.WeightedList;
import org.betterx.worlds.together.tag.v3.TagManager;
import net.minecraft.core.Registry; import net.minecraft.core.Registry;
import net.minecraft.data.BuiltinRegistries; import net.minecraft.data.BuiltinRegistries;
@ -255,7 +254,7 @@ public class BCLBiome extends BCLBiomeSettings {
* For internal use from BiomeAPI only * For internal use from BiomeAPI only
*/ */
void afterRegistration() { void afterRegistration() {
this.biomeTags.forEach(tagKey -> TagManager.BIOMES.add(tagKey, this));
} }
@ -327,13 +326,6 @@ public class BCLBiome extends BCLBiomeSettings {
return biomeID.toString(); return biomeID.toString();
} }
/**
* Adds structures to this biome. For internal use only.
* Used inside {@link BCLBiomeBuilder}.
*/
void addBiomeTags(Set<TagKey<Biome>> tags) {
biomeTags.addAll(tags);
}
/** /**
* Adds structures to this biome. For internal use only. * Adds structures to this biome. For internal use only.

View file

@ -196,6 +196,7 @@ public class BiomeAPI {
TagManager.BIOMES.add(CommonBiomeTags.IN_NETHER, bclbiome); TagManager.BIOMES.add(CommonBiomeTags.IN_NETHER, bclbiome);
} else if (dim != null && dim.is(BiomeType.END)) { } else if (dim != null && dim.is(BiomeType.END)) {
TagManager.BIOMES.add(BiomeTags.IS_END, bclbiome); TagManager.BIOMES.add(BiomeTags.IS_END, bclbiome);
TagManager.BIOMES.add(CommonBiomeTags.IN_END, bclbiome);
} }
bclbiome.afterRegistration(); bclbiome.afterRegistration();
@ -335,6 +336,7 @@ public class BiomeAPI {
* @param biome - {@link Holder<Biome>} from world. * @param biome - {@link Holder<Biome>} from world.
* @return {@link BCLBiome} or {@code BiomeAPI.EMPTY_BIOME}. * @return {@link BCLBiome} or {@code BiomeAPI.EMPTY_BIOME}.
*/ */
@Deprecated(forRemoval = true)
public static BCLBiome getFromBiome(Holder<Biome> biome) { public static BCLBiome getFromBiome(Holder<Biome> biome) {
if (InternalBiomeAPI.biomeRegistry == null) { if (InternalBiomeAPI.biomeRegistry == null) {
return EMPTY_BIOME; return EMPTY_BIOME;

View file

@ -5,6 +5,7 @@ import net.minecraft.world.level.biome.Biome;
public class CommonBiomeTags { public class CommonBiomeTags {
public static final TagKey<Biome> IN_NETHER = TagManager.BIOMES.makeCommonTag("in_nether"); public static final TagKey<Biome> IN_NETHER = TagManager.BIOMES.makeCommonTag("in_nether");
public static final TagKey<Biome> IN_END = TagManager.BIOMES.makeCommonTag("in_end");
static void prepareTags() { static void prepareTags() {
} }