Make sure we have access to certain biome Keys

This commit is contained in:
Frank 2022-12-09 17:03:38 +01:00
parent f2c87a6eb2
commit 26cd2e6c19
18 changed files with 143 additions and 107 deletions

View file

@ -51,7 +51,8 @@ public class CubozoaEntity extends AbstractSchoolingFish {
) { ) {
SpawnGroupData data = super.finalizeSpawn(world, difficulty, spawnReason, entityData, entityTag); SpawnGroupData data = super.finalizeSpawn(world, difficulty, spawnReason, entityData, entityTag);
if (BiomeAPI.getBiome(world.getBiome(blockPosition())).equals(EndBiomes.SULPHUR_SPRINGS)) { if (BiomeAPI.getBiome(world.getBiome(blockPosition())).is(EndBiomes.SULPHUR_SPRINGS)) {
//TODO: 1.19.3 test if this still works
this.entityData.set(VARIANT, (byte) 1); this.entityData.set(VARIANT, (byte) 1);
} }

View file

@ -13,6 +13,8 @@ import org.betterx.betterend.world.biome.cave.*;
import org.betterx.betterend.world.generator.GeneratorOptions; import org.betterx.betterend.world.generator.GeneratorOptions;
import net.minecraft.core.Registry; import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.Biome;
@ -23,6 +25,24 @@ public class EndBiomes {
private static HexBiomeMap caveBiomeMap; private static HexBiomeMap caveBiomeMap;
private static long lastSeed; private static long lastSeed;
public static final ResourceKey<Biome> AMBER_LAND = cKey("amber_land");
public static final ResourceKey<Biome> BLOSSOMING_SPIRES = cKey("blossoming_spires");
public static final ResourceKey<Biome> CHORUS_FOREST = cKey("chorus_forest");
public static final ResourceKey<Biome> FOGGY_MUSHROOMLAND = cKey("foggy_mushroomland");
public static final ResourceKey<Biome> GLOWING_GRASSLANDS = cKey("glowing_grasslands");
public static final ResourceKey<Biome> LANTERN_WOODS = cKey("lantern_woods");
public static final ResourceKey<Biome> MEGALAKE = cKey("megalake");
public static final ResourceKey<Biome> MEGALAKE_GROVE = cKey("megalake_grove");
public static final ResourceKey<Biome> NEON_OASIS = cKey("neon_oasis");
public static final ResourceKey<Biome> SHADOW_FOREST = cKey("shadow_forest");
public static final ResourceKey<Biome> SULPHUR_SPRINGS = cKey("sulphur_springs");
public static final ResourceKey<Biome> UMBRELLA_JUNGLE = cKey("umbrella_jungle");
private static ResourceKey<Biome> cKey(String path) {
return ResourceKey.create(Registries.BIOME, BetterEnd.makeID(path));
}
public static void register() { public static void register() {
BCLBiomeRegistry.registerBiomeCodec(BetterEnd.makeID("biome"), EndBiome.KEY_CODEC); BCLBiomeRegistry.registerBiomeCodec(BetterEnd.makeID("biome"), EndBiome.KEY_CODEC);
BCLBiomeRegistry.registerBiomeCodec(BetterEnd.makeID("cave_biome"), EndCaveBiome.KEY_CODEC); BCLBiomeRegistry.registerBiomeCodec(BetterEnd.makeID("cave_biome"), EndCaveBiome.KEY_CODEC);

View file

@ -26,6 +26,7 @@ import org.betterx.worlds.together.world.event.WorldBootstrap;
import net.minecraft.core.Holder; import net.minecraft.core.Holder;
import net.minecraft.core.Registry; import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries; import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.Biome;
@ -1072,7 +1073,7 @@ public class EndFeatures {
BCLFeature.CONDITION BCLFeature.CONDITION
) )
.configuration(new ConditionFeatureConfig( .configuration(new ConditionFeatureConfig(
InBiome.matchingID(EndBiomes.GLOWING_GRASSLANDS.getID()), InBiome.matchingID(EndBiomes.GLOWING_GRASSLANDS.location()),
BONEMEAL_END_MOSS_GLOWING_GRASSLANDS, BONEMEAL_END_MOSS_GLOWING_GRASSLANDS,
BONEMEAL_END_MOSS_NOT_GLOWING_GRASSLANDS BONEMEAL_END_MOSS_NOT_GLOWING_GRASSLANDS
)) ))
@ -1101,7 +1102,7 @@ public class EndFeatures {
BCLFeature.CONDITION BCLFeature.CONDITION
) )
.configuration(new ConditionFeatureConfig( .configuration(new ConditionFeatureConfig(
InBiome.matchingID(EndBiomes.LANTERN_WOODS.getID()), InBiome.matchingID(EndBiomes.LANTERN_WOODS.location()),
BONEMEAL_RUTISCUS_LANTERN_WOODS, BONEMEAL_RUTISCUS_LANTERN_WOODS,
BONEMEAL_RUTISCUS_NOT_LANTERN_WOODS BONEMEAL_RUTISCUS_NOT_LANTERN_WOODS
)) ))
@ -1175,12 +1176,17 @@ public class EndFeatures {
public static <F extends Feature<FC>, FC extends FeatureConfiguration> F inlineBuild(String name, F feature) { public static <F extends Feature<FC>, FC extends FeatureConfiguration> F inlineBuild(String name, F feature) {
ResourceLocation l = BetterEnd.makeID(name); ResourceLocation l = BetterEnd.makeID(name);
final Registry<Feature<?>> features;
if (WorldBootstrap.getLastRegistryAccess() != null) { if (WorldBootstrap.getLastRegistryAccess() != null) {
Registry<Feature<?>> features = WorldBootstrap.getLastRegistryAccess().registryOrThrow(Registries.FEATURE); features = WorldBootstrap.getLastRegistryAccess().registryOrThrow(Registries.FEATURE);
} else {
features = BuiltInRegistries.FEATURE;
}
if (features.containsKey(l)) { if (features.containsKey(l)) {
return (F) features.get(l); return (F) features.get(l);
} }
}
return BCLFeature.register(l, feature); return BCLFeature.register(l, feature);
} }

View file

@ -12,21 +12,21 @@ import net.minecraft.advancements.critereon.LocationPredicate;
import net.minecraft.core.Holder; import net.minecraft.core.Holder;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Items; import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.Level; import net.minecraft.world.level.storage.loot.BuiltInLootTables;
import net.minecraft.world.level.storage.loot.LootPool; import net.minecraft.world.level.storage.loot.LootPool;
import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.level.storage.loot.LootTable;
import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition;
import net.minecraft.world.level.storage.loot.providers.number.ConstantValue;
import net.minecraft.world.level.storage.loot.providers.number.UniformGenerator;
import net.minecraft.world.level.storage.loot.BuiltInLootTables;
import net.minecraft.world.level.storage.loot.entries.LootItem; import net.minecraft.world.level.storage.loot.entries.LootItem;
import net.minecraft.world.level.storage.loot.entries.LootTableReference; import net.minecraft.world.level.storage.loot.entries.LootTableReference;
import net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction; import net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction;
import net.minecraft.world.level.storage.loot.functions.SetItemDamageFunction; import net.minecraft.world.level.storage.loot.functions.SetItemDamageFunction;
import net.minecraft.world.level.storage.loot.predicates.LocationCheck; import net.minecraft.world.level.storage.loot.predicates.LocationCheck;
import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; import net.minecraft.world.level.storage.loot.predicates.LootItemCondition;
import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition;
import net.minecraft.world.level.storage.loot.providers.number.ConstantValue;
import net.minecraft.world.level.storage.loot.providers.number.UniformGenerator;
import net.fabricmc.fabric.api.loot.v2.LootTableEvents; import net.fabricmc.fabric.api.loot.v2.LootTableEvents;
@ -44,27 +44,27 @@ public class LootTableUtil {
private static final LootItemCondition.Builder IN_END private static final LootItemCondition.Builder IN_END
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setDimension(Level.END)); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setDimension(Level.END));
private static final LootItemCondition.Builder IN_FOGGY_MUSHROOMLAND private static final LootItemCondition.Builder IN_FOGGY_MUSHROOMLAND
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.FOGGY_MUSHROOMLAND.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.FOGGY_MUSHROOMLAND));
private static final LootItemCondition.Builder IN_CHORUS_FOREST private static final LootItemCondition.Builder IN_CHORUS_FOREST
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.CHORUS_FOREST.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.CHORUS_FOREST));
private static final LootItemCondition.Builder IN_AMBER_LAND private static final LootItemCondition.Builder IN_AMBER_LAND
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.AMBER_LAND.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.AMBER_LAND));
private static final LootItemCondition.Builder IN_GLOWING_GRASSLANDS private static final LootItemCondition.Builder IN_GLOWING_GRASSLANDS
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.GLOWING_GRASSLANDS.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.GLOWING_GRASSLANDS));
private static final LootItemCondition.Builder IN_LANTERN_WOODS private static final LootItemCondition.Builder IN_LANTERN_WOODS
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.LANTERN_WOODS.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.LANTERN_WOODS));
private static final LootItemCondition.Builder IN_MEGALAKE private static final LootItemCondition.Builder IN_MEGALAKE
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.MEGALAKE.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.MEGALAKE));
private static final LootItemCondition.Builder IN_MEGALAKE_GROVE private static final LootItemCondition.Builder IN_MEGALAKE_GROVE
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.MEGALAKE_GROVE.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.MEGALAKE_GROVE));
private static final LootItemCondition.Builder IN_NEON_OASIS private static final LootItemCondition.Builder IN_NEON_OASIS
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.NEON_OASIS.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.NEON_OASIS));
private static final LootItemCondition.Builder IN_SHADOW_FOREST private static final LootItemCondition.Builder IN_SHADOW_FOREST
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.SHADOW_FOREST.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.SHADOW_FOREST));
private static final LootItemCondition.Builder IN_SULPHUR_SPRINGS private static final LootItemCondition.Builder IN_SULPHUR_SPRINGS
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.SULPHUR_SPRINGS.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.SULPHUR_SPRINGS));
private static final LootItemCondition.Builder IN_UMBRELLA_JUNGLE private static final LootItemCondition.Builder IN_UMBRELLA_JUNGLE
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.UMBRELLA_JUNGLE.getBiomeKey())); = LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.UMBRELLA_JUNGLE));
public static void init() { public static void init() {
LootTableEvents.MODIFY.register((resourceManager, lootManager, id, table, setter) -> { LootTableEvents.MODIFY.register((resourceManager, lootManager, id, table, setter) -> {
@ -85,9 +85,15 @@ public class LootTableUtil {
} else if (BuiltInLootTables.FISHING.equals(id)) { } else if (BuiltInLootTables.FISHING.equals(id)) {
table.modifyPools((modifier) -> modifier.when(IN_END.invert())); table.modifyPools((modifier) -> modifier.when(IN_END.invert()));
table.withPool(LootPool.lootPool().when(IN_END).setRolls(ConstantValue.exactly(1.0F)) table.withPool(LootPool.lootPool().when(IN_END).setRolls(ConstantValue.exactly(1.0F))
.add(LootTableReference.lootTableReference(FISHING_FISH).setWeight(85).setQuality(-1)) .add(LootTableReference.lootTableReference(FISHING_FISH)
.add(LootTableReference.lootTableReference(FISHING_TREASURE).setWeight(5).setQuality(2)) .setWeight(85)
.add(LootTableReference.lootTableReference(FISHING_JUNK).setWeight(10).setQuality(-2))); .setQuality(-1))
.add(LootTableReference.lootTableReference(FISHING_TREASURE)
.setWeight(5)
.setQuality(2))
.add(LootTableReference.lootTableReference(FISHING_JUNK)
.setWeight(10)
.setQuality(-2)));
} else if (id.getNamespace().equals(BetterEnd.MOD_ID)) { } else if (id.getNamespace().equals(BetterEnd.MOD_ID)) {
if (FISHING_FISH.equals(id)) { if (FISHING_FISH.equals(id)) {
LootPool.Builder builder = LootPool.lootPool() LootPool.Builder builder = LootPool.lootPool()
@ -101,7 +107,8 @@ public class LootTableUtil {
.add(LootItem.lootTableItem(Items.CHORUS_FRUIT)) .add(LootItem.lootTableItem(Items.CHORUS_FRUIT))
.add(LootItem.lootTableItem(EndItems.GELATINE)) .add(LootItem.lootTableItem(EndItems.GELATINE))
.add(LootItem.lootTableItem(EndItems.CRYSTAL_SHARDS)) .add(LootItem.lootTableItem(EndItems.CRYSTAL_SHARDS))
.add(LootItem.lootTableItem(EndItems.HYDRALUX_PETAL).when(IN_SULPHUR_SPRINGS)); .add(LootItem.lootTableItem(EndItems.HYDRALUX_PETAL)
.when(IN_SULPHUR_SPRINGS));
addCharnia(builder); addCharnia(builder);
table.withPool(builder); table.withPool(builder);
return; return;
@ -111,13 +118,21 @@ public class LootTableUtil {
.add(LootItem.lootTableItem(EndBlocks.TERMINITE.forgedPlate)) .add(LootItem.lootTableItem(EndBlocks.TERMINITE.forgedPlate))
.add(LootItem.lootTableItem(EndBlocks.MENGER_SPONGE)) .add(LootItem.lootTableItem(EndBlocks.MENGER_SPONGE))
.add(LootItem.lootTableItem(Items.BOW) .add(LootItem.lootTableItem(Items.BOW)
.apply(SetItemDamageFunction.setDamage(UniformGenerator.between(0.0F, 0.25F))) .apply(SetItemDamageFunction.setDamage(
.apply(EnchantWithLevelsFunction.enchantWithLevels(ConstantValue.exactly(30.0F)).allowTreasure())) UniformGenerator.between(0.0F, 0.25F)))
.apply(EnchantWithLevelsFunction.enchantWithLevels(
ConstantValue.exactly(30.0F))
.allowTreasure()))
.add(LootItem.lootTableItem(Items.FISHING_ROD) .add(LootItem.lootTableItem(Items.FISHING_ROD)
.apply(SetItemDamageFunction.setDamage(UniformGenerator.between(0.0F, 0.25F))) .apply(SetItemDamageFunction.setDamage(
.apply(EnchantWithLevelsFunction.enchantWithLevels(ConstantValue.exactly(30.0F)).allowTreasure())) UniformGenerator.between(0.0F, 0.25F)))
.apply(EnchantWithLevelsFunction.enchantWithLevels(
ConstantValue.exactly(30.0F))
.allowTreasure()))
.add(LootItem.lootTableItem(Items.BOOK) .add(LootItem.lootTableItem(Items.BOOK)
.apply(EnchantWithLevelsFunction.enchantWithLevels(ConstantValue.exactly(30.0F)).allowTreasure())); .apply(EnchantWithLevelsFunction.enchantWithLevels(
ConstantValue.exactly(30.0F))
.allowTreasure()));
table.withPool(builder); table.withPool(builder);
return; return;
} }
@ -183,7 +198,10 @@ public class LootTableUtil {
pool.add(LootItem.lootTableItem(EndBlocks.CHARNIA_CYAN) pool.add(LootItem.lootTableItem(EndBlocks.CHARNIA_CYAN)
.when(IN_GLOWING_GRASSLANDS.or(IN_MEGALAKE).or(IN_MEGALAKE_GROVE).or(IN_NEON_OASIS))); .when(IN_GLOWING_GRASSLANDS.or(IN_MEGALAKE).or(IN_MEGALAKE_GROVE).or(IN_NEON_OASIS)));
pool.add(LootItem.lootTableItem(EndBlocks.CHARNIA_LIGHT_BLUE) pool.add(LootItem.lootTableItem(EndBlocks.CHARNIA_LIGHT_BLUE)
.when(IN_FOGGY_MUSHROOMLAND.or(IN_GLOWING_GRASSLANDS).or(IN_MEGALAKE).or(IN_MEGALAKE_GROVE).or(IN_UMBRELLA_JUNGLE))); .when(IN_FOGGY_MUSHROOMLAND.or(IN_GLOWING_GRASSLANDS)
.or(IN_MEGALAKE)
.or(IN_MEGALAKE_GROVE)
.or(IN_UMBRELLA_JUNGLE)));
pool.add(LootItem.lootTableItem(EndBlocks.CHARNIA_GREEN) pool.add(LootItem.lootTableItem(EndBlocks.CHARNIA_GREEN)
.when(IN_GLOWING_GRASSLANDS.or(IN_NEON_OASIS).or(IN_SULPHUR_SPRINGS).or(IN_UMBRELLA_JUNGLE))); .when(IN_GLOWING_GRASSLANDS.or(IN_NEON_OASIS).or(IN_SULPHUR_SPRINGS).or(IN_UMBRELLA_JUNGLE)));
pool.add(LootItem.lootTableItem(EndBlocks.CHARNIA_RED) pool.add(LootItem.lootTableItem(EndBlocks.CHARNIA_RED)

View file

@ -150,6 +150,10 @@ public class EndBiome extends BCLBiome implements SurfaceMaterialProvider {
this.ID = BetterEnd.makeID(name); this.ID = BetterEnd.makeID(name);
} }
protected Config(ResourceLocation ID) {
this.ID = ID;
}
protected abstract void addCustomBuildData(BCLBiomeBuilder builder); protected abstract void addCustomBuildData(BCLBiomeBuilder builder);
public BiomeSupplier<EndBiome> getSupplier() { public BiomeSupplier<EndBiome> getSupplier() {

View file

@ -11,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
public class AmberLandBiome extends EndBiome.Config { public class AmberLandBiome extends EndBiome.Config {
public AmberLandBiome() { public AmberLandBiome() {
super("amber_land"); super(EndBiomes.AMBER_LAND.location());
} }
@Override @Override

View file

@ -2,10 +2,7 @@ package org.betterx.betterend.world.biome.land;
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder; import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
import org.betterx.bclib.interfaces.SurfaceMaterialProvider; import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
import org.betterx.betterend.registry.EndBlocks; import org.betterx.betterend.registry.*;
import org.betterx.betterend.registry.EndEntities;
import org.betterx.betterend.registry.EndFeatures;
import org.betterx.betterend.registry.EndSounds;
import org.betterx.betterend.world.biome.EndBiome; import org.betterx.betterend.world.biome.EndBiome;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
@ -17,7 +14,7 @@ import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
public class ChorusForestBiome extends EndBiome.Config { public class ChorusForestBiome extends EndBiome.Config {
public ChorusForestBiome() { public ChorusForestBiome() {
super("chorus_forest"); super(EndBiomes.CHORUS_FOREST.location());
} }
@Override @Override

View file

@ -11,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
public class FoggyMushroomlandBiome extends EndBiome.Config { public class FoggyMushroomlandBiome extends EndBiome.Config {
public FoggyMushroomlandBiome() { public FoggyMushroomlandBiome() {
super("foggy_mushroomland"); super(EndBiomes.FOGGY_MUSHROOMLAND.location());
} }
@Override @Override

View file

@ -2,10 +2,7 @@ package org.betterx.betterend.world.biome.land;
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder; import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
import org.betterx.bclib.interfaces.SurfaceMaterialProvider; import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
import org.betterx.betterend.registry.EndBlocks; import org.betterx.betterend.registry.*;
import org.betterx.betterend.registry.EndFeatures;
import org.betterx.betterend.registry.EndParticles;
import org.betterx.betterend.registry.EndSounds;
import org.betterx.betterend.world.biome.EndBiome; import org.betterx.betterend.world.biome.EndBiome;
import net.minecraft.tags.BiomeTags; import net.minecraft.tags.BiomeTags;
@ -14,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
public class GlowingGrasslandsBiome extends EndBiome.Config { public class GlowingGrasslandsBiome extends EndBiome.Config {
public GlowingGrasslandsBiome() { public GlowingGrasslandsBiome() {
super("glowing_grasslands"); super(EndBiomes.GLOWING_GRASSLANDS.location());
} }
@Override @Override

View file

@ -2,10 +2,7 @@ package org.betterx.betterend.world.biome.land;
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder; import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
import org.betterx.bclib.interfaces.SurfaceMaterialProvider; import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
import org.betterx.betterend.registry.EndBlocks; import org.betterx.betterend.registry.*;
import org.betterx.betterend.registry.EndFeatures;
import org.betterx.betterend.registry.EndParticles;
import org.betterx.betterend.registry.EndSounds;
import org.betterx.betterend.world.biome.EndBiome; import org.betterx.betterend.world.biome.EndBiome;
import net.minecraft.tags.BiomeTags; import net.minecraft.tags.BiomeTags;
@ -14,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
public class LanternWoodsBiome extends EndBiome.Config { public class LanternWoodsBiome extends EndBiome.Config {
public LanternWoodsBiome() { public LanternWoodsBiome() {
super("lantern_woods"); super(EndBiomes.LANTERN_WOODS.location());
} }
@Override @Override

View file

@ -10,7 +10,7 @@ import net.minecraft.world.level.block.state.BlockState;
public class MegalakeBiome extends EndBiome.Config { public class MegalakeBiome extends EndBiome.Config {
public MegalakeBiome() { public MegalakeBiome() {
super("megalake"); super(EndBiomes.MEGALAKE.location());
} }
@Override @Override

View file

@ -10,7 +10,7 @@ import net.minecraft.world.level.block.state.BlockState;
public class MegalakeGroveBiome extends EndBiome.Config { public class MegalakeGroveBiome extends EndBiome.Config {
public MegalakeGroveBiome() { public MegalakeGroveBiome() {
super("megalake_grove"); super(EndBiomes.MEGALAKE_GROVE.location());
} }
@Override @Override

View file

@ -4,6 +4,7 @@ import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder; import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder;
import org.betterx.bclib.api.v2.levelgen.surface.rules.SwitchRuleSource; import org.betterx.bclib.api.v2.levelgen.surface.rules.SwitchRuleSource;
import org.betterx.bclib.interfaces.SurfaceMaterialProvider; import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
import org.betterx.betterend.registry.EndBiomes;
import org.betterx.betterend.registry.EndBlocks; import org.betterx.betterend.registry.EndBlocks;
import org.betterx.betterend.registry.EndFeatures; import org.betterx.betterend.registry.EndFeatures;
import org.betterx.betterend.registry.EndSounds; import org.betterx.betterend.registry.EndSounds;
@ -23,7 +24,7 @@ import java.util.List;
public class NeonOasisBiome extends EndBiome.Config { public class NeonOasisBiome extends EndBiome.Config {
public NeonOasisBiome() { public NeonOasisBiome() {
super("neon_oasis"); super(EndBiomes.NEON_OASIS.location());
} }
@Override @Override

View file

@ -2,10 +2,7 @@ package org.betterx.betterend.world.biome.land;
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder; import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
import org.betterx.bclib.interfaces.SurfaceMaterialProvider; import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
import org.betterx.betterend.registry.EndBlocks; import org.betterx.betterend.registry.*;
import org.betterx.betterend.registry.EndEntities;
import org.betterx.betterend.registry.EndFeatures;
import org.betterx.betterend.registry.EndSounds;
import org.betterx.betterend.world.biome.EndBiome; import org.betterx.betterend.world.biome.EndBiome;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
@ -15,7 +12,7 @@ import net.minecraft.world.level.block.state.BlockState;
public class ShadowForestBiome extends EndBiome.Config { public class ShadowForestBiome extends EndBiome.Config {
public ShadowForestBiome() { public ShadowForestBiome() {
super("shadow_forest"); super(EndBiomes.SHADOW_FOREST.location());
} }
@Override @Override

View file

@ -18,8 +18,9 @@ import net.minecraft.world.level.levelgen.placement.CaveSurface;
import java.util.List; import java.util.List;
public class SulphurSpringsBiome extends EndBiome.Config { public class SulphurSpringsBiome extends EndBiome.Config {
public SulphurSpringsBiome() { public SulphurSpringsBiome() {
super("sulphur_springs"); super(EndBiomes.SULPHUR_SPRINGS.location());
} }
@Override @Override

View file

@ -2,10 +2,7 @@ package org.betterx.betterend.world.biome.land;
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder; import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
import org.betterx.bclib.interfaces.SurfaceMaterialProvider; import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
import org.betterx.betterend.registry.EndBlocks; import org.betterx.betterend.registry.*;
import org.betterx.betterend.registry.EndFeatures;
import org.betterx.betterend.registry.EndParticles;
import org.betterx.betterend.registry.EndSounds;
import org.betterx.betterend.world.biome.EndBiome; import org.betterx.betterend.world.biome.EndBiome;
import net.minecraft.tags.BiomeTags; import net.minecraft.tags.BiomeTags;
@ -14,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
public class UmbrellaJungleBiome extends EndBiome.Config { public class UmbrellaJungleBiome extends EndBiome.Config {
public UmbrellaJungleBiome() { public UmbrellaJungleBiome() {
super("umbrella_jungle"); super(EndBiomes.UMBRELLA_JUNGLE.location());
} }
@Override @Override

View file

@ -86,7 +86,7 @@ public class FloatingSpireFeature extends SpireFeature {
sdf.fillRecursive(world, center); sdf.fillRecursive(world, center);
support.forEach((bpos) -> { support.forEach((bpos) -> {
if (BiomeAPI.getBiome(world.getBiome(bpos)).equals(EndBiomes.BLOSSOMING_SPIRES)) { if (BiomeAPI.getBiome(world.getBiome(bpos)).is(EndBiomes.BLOSSOMING_SPIRES)) {
EndFeatures.TENANEA_BUSH.getFeature() EndFeatures.TENANEA_BUSH.getFeature()
.place(new FeaturePlaceContext<NoneFeatureConfiguration>( .place(new FeaturePlaceContext<NoneFeatureConfiguration>(
Optional.empty(), Optional.empty(),

View file

@ -22,33 +22,33 @@ import java.util.concurrent.CompletableFuture;
public class EndBiomesDataProvider extends TagDataProvider<Biome> { public class EndBiomesDataProvider extends TagDataProvider<Biome> {
// Better End Land // Better End Land
public static final EndBiome FOGGY_MUSHROOMLAND = registerBiome(new FoggyMushroomlandBiome(), BiomeType.END_LAND); private static final EndBiome FOGGY_MUSHROOMLAND = registerBiome(new FoggyMushroomlandBiome(), BiomeType.END_LAND);
public static final EndBiome CHORUS_FOREST = registerBiome(new ChorusForestBiome(), BiomeType.END_LAND); private static final EndBiome CHORUS_FOREST = registerBiome(new ChorusForestBiome(), BiomeType.END_LAND);
public static final EndBiome DUST_WASTELANDS = registerBiome(new DustWastelandsBiome(), BiomeType.END_LAND); private static final EndBiome DUST_WASTELANDS = registerBiome(new DustWastelandsBiome(), BiomeType.END_LAND);
public static final EndBiome NEON_OASIS = registerSubBiome(new NeonOasisBiome(), DUST_WASTELANDS); private static final EndBiome NEON_OASIS = registerSubBiome(new NeonOasisBiome(), DUST_WASTELANDS);
public static final EndBiome PAINTED_MOUNTAINS = registerSubBiome(new PaintedMountainsBiome(), DUST_WASTELANDS); private static final EndBiome PAINTED_MOUNTAINS = registerSubBiome(new PaintedMountainsBiome(), DUST_WASTELANDS);
public static final EndBiome MEGALAKE = registerBiome(new MegalakeBiome(), BiomeType.END_LAND); private static final EndBiome MEGALAKE = registerBiome(new MegalakeBiome(), BiomeType.END_LAND);
public static final EndBiome MEGALAKE_GROVE = registerSubBiome(new MegalakeGroveBiome(), MEGALAKE); private static final EndBiome MEGALAKE_GROVE = registerSubBiome(new MegalakeGroveBiome(), MEGALAKE);
public static final EndBiome CRYSTAL_MOUNTAINS = registerBiome(new CrystalMountainsBiome(), BiomeType.END_LAND); private static final EndBiome CRYSTAL_MOUNTAINS = registerBiome(new CrystalMountainsBiome(), BiomeType.END_LAND);
public static final EndBiome SHADOW_FOREST = registerBiome(new ShadowForestBiome(), BiomeType.END_LAND); private static final EndBiome SHADOW_FOREST = registerBiome(new ShadowForestBiome(), BiomeType.END_LAND);
public static final EndBiome AMBER_LAND = registerBiome(new AmberLandBiome(), BiomeType.END_LAND); private static final EndBiome AMBER_LAND = registerBiome(new AmberLandBiome(), BiomeType.END_LAND);
public static final EndBiome BLOSSOMING_SPIRES = registerBiome(new BlossomingSpiresBiome(), BiomeType.END_LAND); private static final EndBiome BLOSSOMING_SPIRES = registerBiome(new BlossomingSpiresBiome(), BiomeType.END_LAND);
public static final EndBiome SULPHUR_SPRINGS = registerBiome(new SulphurSpringsBiome(), BiomeType.END_LAND); private static final EndBiome SULPHUR_SPRINGS = registerBiome(new SulphurSpringsBiome(), BiomeType.END_LAND);
public static final EndBiome UMBRELLA_JUNGLE = registerBiome(new UmbrellaJungleBiome(), BiomeType.END_LAND); private static final EndBiome UMBRELLA_JUNGLE = registerBiome(new UmbrellaJungleBiome(), BiomeType.END_LAND);
public static final EndBiome GLOWING_GRASSLANDS = registerBiome(new GlowingGrasslandsBiome(), BiomeType.END_LAND); private static final EndBiome GLOWING_GRASSLANDS = registerBiome(new GlowingGrasslandsBiome(), BiomeType.END_LAND);
public static final EndBiome DRAGON_GRAVEYARDS = registerBiome(new DragonGraveyardsBiome(), BiomeType.END_LAND); private static final EndBiome DRAGON_GRAVEYARDS = registerBiome(new DragonGraveyardsBiome(), BiomeType.END_LAND);
public static final EndBiome DRY_SHRUBLAND = registerBiome(new DryShrublandBiome(), BiomeType.END_LAND); private static final EndBiome DRY_SHRUBLAND = registerBiome(new DryShrublandBiome(), BiomeType.END_LAND);
public static final EndBiome LANTERN_WOODS = registerBiome(new LanternWoodsBiome(), BiomeType.END_LAND); private static final EndBiome LANTERN_WOODS = registerBiome(new LanternWoodsBiome(), BiomeType.END_LAND);
public static final EndBiome UMBRA_VALLEY = registerBiome(new UmbraValleyBiome(), BiomeType.END_LAND); private static final EndBiome UMBRA_VALLEY = registerBiome(new UmbraValleyBiome(), BiomeType.END_LAND);
// Better End Void // Better End Void
public static final EndBiome ICE_STARFIELD = registerBiome(new BiomeIceStarfield(), BiomeType.END_VOID); private static final EndBiome ICE_STARFIELD = registerBiome(new BiomeIceStarfield(), BiomeType.END_VOID);
// Better End Caves // Better End Caves
public static final EndCaveBiome EMPTY_END_CAVE = registerCaveBiome(new EmptyEndCaveBiome()); private static final EndCaveBiome EMPTY_END_CAVE = registerCaveBiome(new EmptyEndCaveBiome());
public static final EndCaveBiome EMPTY_SMARAGDANT_CAVE = registerCaveBiome(new EmptySmaragdantCaveBiome()); private static final EndCaveBiome EMPTY_SMARAGDANT_CAVE = registerCaveBiome(new EmptySmaragdantCaveBiome());
public static final EndCaveBiome LUSH_SMARAGDANT_CAVE = registerCaveBiome(new LushSmaragdantCaveBiome()); private static final EndCaveBiome LUSH_SMARAGDANT_CAVE = registerCaveBiome(new LushSmaragdantCaveBiome());
public static final EndCaveBiome EMPTY_AURORA_CAVE = registerCaveBiome(new EmptyAuroraCaveBiome()); private static final EndCaveBiome EMPTY_AURORA_CAVE = registerCaveBiome(new EmptyAuroraCaveBiome());
public static final EndCaveBiome LUSH_AURORA_CAVE = registerCaveBiome(new LushAuroraCaveBiome()); private static final EndCaveBiome LUSH_AURORA_CAVE = registerCaveBiome(new LushAuroraCaveBiome());
public static final EndCaveBiome JADE_CAVE = registerCaveBiome(new JadeCaveBiome()); private static final EndCaveBiome JADE_CAVE = registerCaveBiome(new JadeCaveBiome());
/** /**
* Constructs a new {@link FabricTagProvider} with the default computed path. * Constructs a new {@link FabricTagProvider} with the default computed path.