Make sure we have access to certain biome Keys
This commit is contained in:
parent
f2c87a6eb2
commit
26cd2e6c19
18 changed files with 143 additions and 107 deletions
|
@ -51,7 +51,8 @@ public class CubozoaEntity extends AbstractSchoolingFish {
|
|||
) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ import org.betterx.betterend.world.biome.cave.*;
|
|||
import org.betterx.betterend.world.generator.GeneratorOptions;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
|
@ -23,6 +25,24 @@ public class EndBiomes {
|
|||
private static HexBiomeMap caveBiomeMap;
|
||||
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() {
|
||||
BCLBiomeRegistry.registerBiomeCodec(BetterEnd.makeID("biome"), EndBiome.KEY_CODEC);
|
||||
BCLBiomeRegistry.registerBiomeCodec(BetterEnd.makeID("cave_biome"), EndCaveBiome.KEY_CODEC);
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.betterx.worlds.together.world.event.WorldBootstrap;
|
|||
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
|
@ -1072,7 +1073,7 @@ public class EndFeatures {
|
|||
BCLFeature.CONDITION
|
||||
)
|
||||
.configuration(new ConditionFeatureConfig(
|
||||
InBiome.matchingID(EndBiomes.GLOWING_GRASSLANDS.getID()),
|
||||
InBiome.matchingID(EndBiomes.GLOWING_GRASSLANDS.location()),
|
||||
BONEMEAL_END_MOSS_GLOWING_GRASSLANDS,
|
||||
BONEMEAL_END_MOSS_NOT_GLOWING_GRASSLANDS
|
||||
))
|
||||
|
@ -1101,7 +1102,7 @@ public class EndFeatures {
|
|||
BCLFeature.CONDITION
|
||||
)
|
||||
.configuration(new ConditionFeatureConfig(
|
||||
InBiome.matchingID(EndBiomes.LANTERN_WOODS.getID()),
|
||||
InBiome.matchingID(EndBiomes.LANTERN_WOODS.location()),
|
||||
BONEMEAL_RUTISCUS_LANTERN_WOODS,
|
||||
BONEMEAL_RUTISCUS_NOT_LANTERN_WOODS
|
||||
))
|
||||
|
@ -1175,13 +1176,18 @@ public class EndFeatures {
|
|||
public static <F extends Feature<FC>, FC extends FeatureConfiguration> F inlineBuild(String name, F feature) {
|
||||
ResourceLocation l = BetterEnd.makeID(name);
|
||||
|
||||
final Registry<Feature<?>> features;
|
||||
if (WorldBootstrap.getLastRegistryAccess() != null) {
|
||||
Registry<Feature<?>> features = WorldBootstrap.getLastRegistryAccess().registryOrThrow(Registries.FEATURE);
|
||||
if (features.containsKey(l)) {
|
||||
return (F) features.get(l);
|
||||
}
|
||||
features = WorldBootstrap.getLastRegistryAccess().registryOrThrow(Registries.FEATURE);
|
||||
} else {
|
||||
features = BuiltInRegistries.FEATURE;
|
||||
}
|
||||
|
||||
if (features.containsKey(l)) {
|
||||
return (F) features.get(l);
|
||||
}
|
||||
|
||||
|
||||
return BCLFeature.register(l, feature);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,21 +12,21 @@ import net.minecraft.advancements.critereon.LocationPredicate;
|
|||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
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.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.LootTableReference;
|
||||
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.predicates.LocationCheck;
|
||||
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;
|
||||
|
||||
|
@ -44,27 +44,27 @@ public class LootTableUtil {
|
|||
private static final LootItemCondition.Builder IN_END
|
||||
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setDimension(Level.END));
|
||||
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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.UMBRELLA_JUNGLE.getBiomeKey()));
|
||||
= LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiome(EndBiomes.UMBRELLA_JUNGLE));
|
||||
|
||||
public static void init() {
|
||||
LootTableEvents.MODIFY.register((resourceManager, lootManager, id, table, setter) -> {
|
||||
|
@ -85,39 +85,54 @@ public class LootTableUtil {
|
|||
} else if (BuiltInLootTables.FISHING.equals(id)) {
|
||||
table.modifyPools((modifier) -> modifier.when(IN_END.invert()));
|
||||
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_TREASURE).setWeight(5).setQuality(2))
|
||||
.add(LootTableReference.lootTableReference(FISHING_JUNK).setWeight(10).setQuality(-2)));
|
||||
.add(LootTableReference.lootTableReference(FISHING_FISH)
|
||||
.setWeight(85)
|
||||
.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)) {
|
||||
if (FISHING_FISH.equals(id)) {
|
||||
LootPool.Builder builder = LootPool.lootPool()
|
||||
.add(LootItem.lootTableItem(EndItems.END_FISH_RAW));
|
||||
.add(LootItem.lootTableItem(EndItems.END_FISH_RAW));
|
||||
table.withPool(builder);
|
||||
return;
|
||||
} else if (FISHING_JUNK.equals(id)) {
|
||||
LootPool.Builder builder = LootPool.lootPool()
|
||||
.add(LootItem.lootTableItem(EndItems.END_LILY_LEAF))
|
||||
.add(LootItem.lootTableItem(Items.ENDER_PEARL))
|
||||
.add(LootItem.lootTableItem(Items.CHORUS_FRUIT))
|
||||
.add(LootItem.lootTableItem(EndItems.GELATINE))
|
||||
.add(LootItem.lootTableItem(EndItems.CRYSTAL_SHARDS))
|
||||
.add(LootItem.lootTableItem(EndItems.HYDRALUX_PETAL).when(IN_SULPHUR_SPRINGS));
|
||||
.add(LootItem.lootTableItem(EndItems.END_LILY_LEAF))
|
||||
.add(LootItem.lootTableItem(Items.ENDER_PEARL))
|
||||
.add(LootItem.lootTableItem(Items.CHORUS_FRUIT))
|
||||
.add(LootItem.lootTableItem(EndItems.GELATINE))
|
||||
.add(LootItem.lootTableItem(EndItems.CRYSTAL_SHARDS))
|
||||
.add(LootItem.lootTableItem(EndItems.HYDRALUX_PETAL)
|
||||
.when(IN_SULPHUR_SPRINGS));
|
||||
addCharnia(builder);
|
||||
table.withPool(builder);
|
||||
return;
|
||||
} else if (FISHING_TREASURE.equals(id)) {
|
||||
LootPool.Builder builder = LootPool.lootPool()
|
||||
.add(LootItem.lootTableItem(EndBlocks.TERMINITE.swordBlade))
|
||||
.add(LootItem.lootTableItem(EndBlocks.TERMINITE.forgedPlate))
|
||||
.add(LootItem.lootTableItem(EndBlocks.MENGER_SPONGE))
|
||||
.add(LootItem.lootTableItem(Items.BOW)
|
||||
.apply(SetItemDamageFunction.setDamage(UniformGenerator.between(0.0F, 0.25F)))
|
||||
.apply(EnchantWithLevelsFunction.enchantWithLevels(ConstantValue.exactly(30.0F)).allowTreasure()))
|
||||
.add(LootItem.lootTableItem(Items.FISHING_ROD)
|
||||
.apply(SetItemDamageFunction.setDamage(UniformGenerator.between(0.0F, 0.25F)))
|
||||
.apply(EnchantWithLevelsFunction.enchantWithLevels(ConstantValue.exactly(30.0F)).allowTreasure()))
|
||||
.add(LootItem.lootTableItem(Items.BOOK)
|
||||
.apply(EnchantWithLevelsFunction.enchantWithLevels(ConstantValue.exactly(30.0F)).allowTreasure()));
|
||||
.add(LootItem.lootTableItem(EndBlocks.TERMINITE.swordBlade))
|
||||
.add(LootItem.lootTableItem(EndBlocks.TERMINITE.forgedPlate))
|
||||
.add(LootItem.lootTableItem(EndBlocks.MENGER_SPONGE))
|
||||
.add(LootItem.lootTableItem(Items.BOW)
|
||||
.apply(SetItemDamageFunction.setDamage(
|
||||
UniformGenerator.between(0.0F, 0.25F)))
|
||||
.apply(EnchantWithLevelsFunction.enchantWithLevels(
|
||||
ConstantValue.exactly(30.0F))
|
||||
.allowTreasure()))
|
||||
.add(LootItem.lootTableItem(Items.FISHING_ROD)
|
||||
.apply(SetItemDamageFunction.setDamage(
|
||||
UniformGenerator.between(0.0F, 0.25F)))
|
||||
.apply(EnchantWithLevelsFunction.enchantWithLevels(
|
||||
ConstantValue.exactly(30.0F))
|
||||
.allowTreasure()))
|
||||
.add(LootItem.lootTableItem(Items.BOOK)
|
||||
.apply(EnchantWithLevelsFunction.enchantWithLevels(
|
||||
ConstantValue.exactly(30.0F))
|
||||
.allowTreasure()));
|
||||
table.withPool(builder);
|
||||
return;
|
||||
}
|
||||
|
@ -181,17 +196,20 @@ public class LootTableUtil {
|
|||
|
||||
private static void addCharnia(LootPool.Builder pool) {
|
||||
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)
|
||||
.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)
|
||||
.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)
|
||||
.when(IN_AMBER_LAND.or(IN_LANTERN_WOODS).or(IN_NEON_OASIS)));
|
||||
.when(IN_AMBER_LAND.or(IN_LANTERN_WOODS).or(IN_NEON_OASIS)));
|
||||
pool.add(LootItem.lootTableItem(EndBlocks.CHARNIA_ORANGE)
|
||||
.when(IN_AMBER_LAND.or(IN_LANTERN_WOODS).or(IN_SULPHUR_SPRINGS)));
|
||||
.when(IN_AMBER_LAND.or(IN_LANTERN_WOODS).or(IN_SULPHUR_SPRINGS)));
|
||||
pool.add(LootItem.lootTableItem(EndBlocks.CHARNIA_PURPLE)
|
||||
.when(IN_CHORUS_FOREST.or(IN_SHADOW_FOREST)));
|
||||
.when(IN_CHORUS_FOREST.or(IN_SHADOW_FOREST)));
|
||||
}
|
||||
|
||||
private static void addCommonItems(LootTable.Builder table) {
|
||||
|
|
|
@ -150,6 +150,10 @@ public class EndBiome extends BCLBiome implements SurfaceMaterialProvider {
|
|||
this.ID = BetterEnd.makeID(name);
|
||||
}
|
||||
|
||||
protected Config(ResourceLocation ID) {
|
||||
this.ID = ID;
|
||||
}
|
||||
|
||||
protected abstract void addCustomBuildData(BCLBiomeBuilder builder);
|
||||
|
||||
public BiomeSupplier<EndBiome> getSupplier() {
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
|
||||
public class AmberLandBiome extends EndBiome.Config {
|
||||
public AmberLandBiome() {
|
||||
super("amber_land");
|
||||
super(EndBiomes.AMBER_LAND.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,10 +2,7 @@ package org.betterx.betterend.world.biome.land;
|
|||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndEntities;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.registry.*;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
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 ChorusForestBiome() {
|
||||
super("chorus_forest");
|
||||
super(EndBiomes.CHORUS_FOREST.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
|
||||
public class FoggyMushroomlandBiome extends EndBiome.Config {
|
||||
public FoggyMushroomlandBiome() {
|
||||
super("foggy_mushroomland");
|
||||
super(EndBiomes.FOGGY_MUSHROOMLAND.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,10 +2,7 @@ package org.betterx.betterend.world.biome.land;
|
|||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.registry.*;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
|
@ -14,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
|
||||
public class GlowingGrasslandsBiome extends EndBiome.Config {
|
||||
public GlowingGrasslandsBiome() {
|
||||
super("glowing_grasslands");
|
||||
super(EndBiomes.GLOWING_GRASSLANDS.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,10 +2,7 @@ package org.betterx.betterend.world.biome.land;
|
|||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.registry.*;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
|
@ -14,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
|
||||
public class LanternWoodsBiome extends EndBiome.Config {
|
||||
public LanternWoodsBiome() {
|
||||
super("lantern_woods");
|
||||
super(EndBiomes.LANTERN_WOODS.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
|
||||
public class MegalakeBiome extends EndBiome.Config {
|
||||
public MegalakeBiome() {
|
||||
super("megalake");
|
||||
super(EndBiomes.MEGALAKE.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
|
||||
public class MegalakeGroveBiome extends EndBiome.Config {
|
||||
public MegalakeGroveBiome() {
|
||||
super("megalake_grove");
|
||||
super(EndBiomes.MEGALAKE_GROVE.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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.rules.SwitchRuleSource;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.registry.EndSounds;
|
||||
|
@ -23,7 +24,7 @@ import java.util.List;
|
|||
|
||||
public class NeonOasisBiome extends EndBiome.Config {
|
||||
public NeonOasisBiome() {
|
||||
super("neon_oasis");
|
||||
super(EndBiomes.NEON_OASIS.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,10 +2,7 @@ package org.betterx.betterend.world.biome.land;
|
|||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndEntities;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.registry.*;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
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 ShadowForestBiome() {
|
||||
super("shadow_forest");
|
||||
super(EndBiomes.SHADOW_FOREST.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,8 +18,9 @@ import net.minecraft.world.level.levelgen.placement.CaveSurface;
|
|||
import java.util.List;
|
||||
|
||||
public class SulphurSpringsBiome extends EndBiome.Config {
|
||||
|
||||
public SulphurSpringsBiome() {
|
||||
super("sulphur_springs");
|
||||
super(EndBiomes.SULPHUR_SPRINGS.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,10 +2,7 @@ package org.betterx.betterend.world.biome.land;
|
|||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.registry.*;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
|
@ -14,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
|
||||
public class UmbrellaJungleBiome extends EndBiome.Config {
|
||||
public UmbrellaJungleBiome() {
|
||||
super("umbrella_jungle");
|
||||
super(EndBiomes.UMBRELLA_JUNGLE.location());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -86,7 +86,7 @@ public class FloatingSpireFeature extends SpireFeature {
|
|||
sdf.fillRecursive(world, center);
|
||||
|
||||
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()
|
||||
.place(new FeaturePlaceContext<NoneFeatureConfiguration>(
|
||||
Optional.empty(),
|
||||
|
|
|
@ -22,33 +22,33 @@ import java.util.concurrent.CompletableFuture;
|
|||
|
||||
public class EndBiomesDataProvider extends TagDataProvider<Biome> {
|
||||
// Better End Land
|
||||
public static final EndBiome FOGGY_MUSHROOMLAND = registerBiome(new FoggyMushroomlandBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome CHORUS_FOREST = registerBiome(new ChorusForestBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome DUST_WASTELANDS = registerBiome(new DustWastelandsBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome NEON_OASIS = registerSubBiome(new NeonOasisBiome(), DUST_WASTELANDS);
|
||||
public static final EndBiome PAINTED_MOUNTAINS = registerSubBiome(new PaintedMountainsBiome(), DUST_WASTELANDS);
|
||||
public static final EndBiome MEGALAKE = registerBiome(new MegalakeBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome MEGALAKE_GROVE = registerSubBiome(new MegalakeGroveBiome(), MEGALAKE);
|
||||
public static final EndBiome CRYSTAL_MOUNTAINS = registerBiome(new CrystalMountainsBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome SHADOW_FOREST = registerBiome(new ShadowForestBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome AMBER_LAND = registerBiome(new AmberLandBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome BLOSSOMING_SPIRES = registerBiome(new BlossomingSpiresBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome SULPHUR_SPRINGS = registerBiome(new SulphurSpringsBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome UMBRELLA_JUNGLE = registerBiome(new UmbrellaJungleBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome GLOWING_GRASSLANDS = registerBiome(new GlowingGrasslandsBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome DRAGON_GRAVEYARDS = registerBiome(new DragonGraveyardsBiome(), BiomeType.END_LAND);
|
||||
public static final EndBiome DRY_SHRUBLAND = registerBiome(new DryShrublandBiome(), BiomeType.END_LAND);
|
||||
public 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 FOGGY_MUSHROOMLAND = registerBiome(new FoggyMushroomlandBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome CHORUS_FOREST = registerBiome(new ChorusForestBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome DUST_WASTELANDS = registerBiome(new DustWastelandsBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome NEON_OASIS = registerSubBiome(new NeonOasisBiome(), DUST_WASTELANDS);
|
||||
private static final EndBiome PAINTED_MOUNTAINS = registerSubBiome(new PaintedMountainsBiome(), DUST_WASTELANDS);
|
||||
private static final EndBiome MEGALAKE = registerBiome(new MegalakeBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome MEGALAKE_GROVE = registerSubBiome(new MegalakeGroveBiome(), MEGALAKE);
|
||||
private static final EndBiome CRYSTAL_MOUNTAINS = registerBiome(new CrystalMountainsBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome SHADOW_FOREST = registerBiome(new ShadowForestBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome AMBER_LAND = registerBiome(new AmberLandBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome BLOSSOMING_SPIRES = registerBiome(new BlossomingSpiresBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome SULPHUR_SPRINGS = registerBiome(new SulphurSpringsBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome UMBRELLA_JUNGLE = registerBiome(new UmbrellaJungleBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome GLOWING_GRASSLANDS = registerBiome(new GlowingGrasslandsBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome DRAGON_GRAVEYARDS = registerBiome(new DragonGraveyardsBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome DRY_SHRUBLAND = registerBiome(new DryShrublandBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome LANTERN_WOODS = registerBiome(new LanternWoodsBiome(), BiomeType.END_LAND);
|
||||
private static final EndBiome UMBRA_VALLEY = registerBiome(new UmbraValleyBiome(), BiomeType.END_LAND);
|
||||
// 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
|
||||
public static final EndCaveBiome EMPTY_END_CAVE = registerCaveBiome(new EmptyEndCaveBiome());
|
||||
public static final EndCaveBiome EMPTY_SMARAGDANT_CAVE = registerCaveBiome(new EmptySmaragdantCaveBiome());
|
||||
public static final EndCaveBiome LUSH_SMARAGDANT_CAVE = registerCaveBiome(new LushSmaragdantCaveBiome());
|
||||
public static final EndCaveBiome EMPTY_AURORA_CAVE = registerCaveBiome(new EmptyAuroraCaveBiome());
|
||||
public static final EndCaveBiome LUSH_AURORA_CAVE = registerCaveBiome(new LushAuroraCaveBiome());
|
||||
public static final EndCaveBiome JADE_CAVE = registerCaveBiome(new JadeCaveBiome());
|
||||
private static final EndCaveBiome EMPTY_END_CAVE = registerCaveBiome(new EmptyEndCaveBiome());
|
||||
private static final EndCaveBiome EMPTY_SMARAGDANT_CAVE = registerCaveBiome(new EmptySmaragdantCaveBiome());
|
||||
private static final EndCaveBiome LUSH_SMARAGDANT_CAVE = registerCaveBiome(new LushSmaragdantCaveBiome());
|
||||
private static final EndCaveBiome EMPTY_AURORA_CAVE = registerCaveBiome(new EmptyAuroraCaveBiome());
|
||||
private static final EndCaveBiome LUSH_AURORA_CAVE = registerCaveBiome(new LushAuroraCaveBiome());
|
||||
private static final EndCaveBiome JADE_CAVE = registerCaveBiome(new JadeCaveBiome());
|
||||
|
||||
/**
|
||||
* Constructs a new {@link FabricTagProvider} with the default computed path.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue