From 6192523202aa3058d3cdf47af621643ffdfb52b5 Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Tue, 25 Jul 2023 21:34:39 +0200 Subject: [PATCH] Add back worldgen --- .../configured_feature/ancient_tree.json | 4 ++ .../configured_feature/aura_bloom.json | 4 ++ .../configured_feature/aura_cactus.json | 4 ++ .../configured_feature/aura_mushroom.json | 4 ++ .../crimson_aura_mushroom.json | 4 ++ .../nether_wart_mushroom.json | 4 ++ .../warped_aura_mushroom.json | 4 ++ .../worldgen/placed_feature/aura_bloom.json | 4 ++ .../worldgen/placed_feature/aura_cactus.json | 4 ++ .../placed_feature/aura_mushroom.json | 4 ++ .../placed_feature/crimson_aura_mushroom.json | 4 ++ .../placed_feature/warped_aura_mushroom.json | 4 ++ .../de/ellpeck/naturesaura/NaturesAura.java | 2 - .../blocks/BlockAncientSapling.java | 6 ++- .../de/ellpeck/naturesaura/data/ModData.java | 26 +++++++++ .../ellpeck/naturesaura/gen/ModFeatures.java | 53 ++++++++++++++----- .../naturesaura/items/ItemCrimsonMeal.java | 6 ++- .../ellpeck/naturesaura/reg/ModRegistry.java | 25 +++------ 18 files changed, 130 insertions(+), 36 deletions(-) create mode 100644 src/generated/resources/data/naturesaura/worldgen/configured_feature/ancient_tree.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_bloom.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_cactus.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_mushroom.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/configured_feature/crimson_aura_mushroom.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/configured_feature/nether_wart_mushroom.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/configured_feature/warped_aura_mushroom.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_bloom.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_cactus.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_mushroom.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/placed_feature/crimson_aura_mushroom.json create mode 100644 src/generated/resources/data/naturesaura/worldgen/placed_feature/warped_aura_mushroom.json diff --git a/src/generated/resources/data/naturesaura/worldgen/configured_feature/ancient_tree.json b/src/generated/resources/data/naturesaura/worldgen/configured_feature/ancient_tree.json new file mode 100644 index 00000000..244e3522 --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/configured_feature/ancient_tree.json @@ -0,0 +1,4 @@ +{ + "type": "naturesaura:ancient_tree", + "config": {} +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_bloom.json b/src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_bloom.json new file mode 100644 index 00000000..4263180d --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_bloom.json @@ -0,0 +1,4 @@ +{ + "type": "naturesaura:aura_bloom", + "config": {} +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_cactus.json b/src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_cactus.json new file mode 100644 index 00000000..7c576b08 --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_cactus.json @@ -0,0 +1,4 @@ +{ + "type": "naturesaura:aura_cactus", + "config": {} +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_mushroom.json b/src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_mushroom.json new file mode 100644 index 00000000..0f7c2c24 --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/configured_feature/aura_mushroom.json @@ -0,0 +1,4 @@ +{ + "type": "naturesaura:aura_mushroom", + "config": {} +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/configured_feature/crimson_aura_mushroom.json b/src/generated/resources/data/naturesaura/worldgen/configured_feature/crimson_aura_mushroom.json new file mode 100644 index 00000000..e60a20f2 --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/configured_feature/crimson_aura_mushroom.json @@ -0,0 +1,4 @@ +{ + "type": "naturesaura:crimson_aura_mushroom", + "config": {} +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/configured_feature/nether_wart_mushroom.json b/src/generated/resources/data/naturesaura/worldgen/configured_feature/nether_wart_mushroom.json new file mode 100644 index 00000000..394f197f --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/configured_feature/nether_wart_mushroom.json @@ -0,0 +1,4 @@ +{ + "type": "naturesaura:nether_wart_mushroom", + "config": {} +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/configured_feature/warped_aura_mushroom.json b/src/generated/resources/data/naturesaura/worldgen/configured_feature/warped_aura_mushroom.json new file mode 100644 index 00000000..89c28223 --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/configured_feature/warped_aura_mushroom.json @@ -0,0 +1,4 @@ +{ + "type": "naturesaura:warped_aura_mushroom", + "config": {} +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_bloom.json b/src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_bloom.json new file mode 100644 index 00000000..4892a560 --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_bloom.json @@ -0,0 +1,4 @@ +{ + "feature": "naturesaura:aura_bloom", + "placement": [] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_cactus.json b/src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_cactus.json new file mode 100644 index 00000000..c4bcaed3 --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_cactus.json @@ -0,0 +1,4 @@ +{ + "feature": "naturesaura:aura_cactus", + "placement": [] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_mushroom.json b/src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_mushroom.json new file mode 100644 index 00000000..a8c7168b --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/placed_feature/aura_mushroom.json @@ -0,0 +1,4 @@ +{ + "feature": "naturesaura:aura_mushroom", + "placement": [] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/placed_feature/crimson_aura_mushroom.json b/src/generated/resources/data/naturesaura/worldgen/placed_feature/crimson_aura_mushroom.json new file mode 100644 index 00000000..2fe5c073 --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/placed_feature/crimson_aura_mushroom.json @@ -0,0 +1,4 @@ +{ + "feature": "naturesaura:crimson_aura_mushroom", + "placement": [] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/worldgen/placed_feature/warped_aura_mushroom.json b/src/generated/resources/data/naturesaura/worldgen/placed_feature/warped_aura_mushroom.json new file mode 100644 index 00000000..3d898042 --- /dev/null +++ b/src/generated/resources/data/naturesaura/worldgen/placed_feature/warped_aura_mushroom.json @@ -0,0 +1,4 @@ +{ + "feature": "naturesaura:warped_aura_mushroom", + "placement": [] +} \ No newline at end of file diff --git a/src/main/java/de/ellpeck/naturesaura/NaturesAura.java b/src/main/java/de/ellpeck/naturesaura/NaturesAura.java index 0989a280..91ea3760 100644 --- a/src/main/java/de/ellpeck/naturesaura/NaturesAura.java +++ b/src/main/java/de/ellpeck/naturesaura/NaturesAura.java @@ -11,7 +11,6 @@ import de.ellpeck.naturesaura.proxy.ClientProxy; import de.ellpeck.naturesaura.proxy.IProxy; import de.ellpeck.naturesaura.proxy.ServerProxy; import de.ellpeck.naturesaura.recipes.ModRecipes; -import de.ellpeck.naturesaura.reg.ModRegistry; import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.DistExecutor; @@ -63,7 +62,6 @@ public final class NaturesAura { event.enqueueWork(ModConfig.instance::apply); ModRecipes.init(); - ModRegistry.init(); DrainSpotEffects.init(); NaturesAura.proxy.init(event); diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockAncientSapling.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockAncientSapling.java index 319c15c1..e06dfd4e 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockAncientSapling.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockAncientSapling.java @@ -8,6 +8,8 @@ import de.ellpeck.naturesaura.reg.ICustomItemModel; import de.ellpeck.naturesaura.reg.IModItem; import de.ellpeck.naturesaura.reg.ModRegistry; import net.minecraft.core.BlockPos; +import net.minecraft.core.Registry; +import net.minecraft.core.registries.Registries; import net.minecraft.server.level.ServerLevel; import net.minecraft.util.RandomSource; import net.minecraft.world.level.BlockGetter; @@ -16,6 +18,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.*; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.event.ForgeEventFactory; @@ -72,7 +75,8 @@ public class BlockAncientSapling extends BushBlock implements BonemealableBlock, if (state.getValue(SaplingBlock.STAGE) == 0) { level.setBlock(pos, state.cycle(SaplingBlock.STAGE), 4); } else if (!ForgeEventFactory.blockGrowFeature(level, rand, pos, null).getResult().equals(Event.Result.DENY)) { - ModFeatures.Configured.ANCIENT_TREE.value().place(level, level.getChunkSource().getGenerator(), rand, pos); + Registry> registry = level.registryAccess().registryOrThrow(Registries.CONFIGURED_FEATURE); + registry.getHolderOrThrow(ModFeatures.Configured.ANCIENT_TREE).value().place(level, level.getChunkSource().getGenerator(), rand, pos); } } diff --git a/src/main/java/de/ellpeck/naturesaura/data/ModData.java b/src/main/java/de/ellpeck/naturesaura/data/ModData.java index 9840fc2e..21edd0bc 100644 --- a/src/main/java/de/ellpeck/naturesaura/data/ModData.java +++ b/src/main/java/de/ellpeck/naturesaura/data/ModData.java @@ -1,13 +1,24 @@ package de.ellpeck.naturesaura.data; +import de.ellpeck.naturesaura.NaturesAura; +import de.ellpeck.naturesaura.gen.ModFeatures; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.RegistryAccess; +import net.minecraft.core.RegistrySetBuilder; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; import net.minecraft.data.loot.LootTableProvider; +import net.minecraft.data.registries.VanillaRegistries; import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; +import net.minecraftforge.common.data.DatapackBuiltinEntriesProvider; import net.minecraftforge.data.event.GatherDataEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.registries.ForgeRegistries; import java.util.List; import java.util.Set; +import java.util.concurrent.CompletableFuture; @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) public final class ModData { @@ -25,5 +36,20 @@ public final class ModData { gen.addProvider(event.includeServer(), new LootTableProvider(out, Set.of(), List.of(new LootTableProvider.SubProviderEntry(BlockLootProvider::new, LootContextParamSets.BLOCK)))); gen.addProvider(event.includeServer(), new BlockStateGenerator(out, existing)); gen.addProvider(event.includeServer(), new ItemModelGenerator(out, existing)); + gen.addProvider(event.includeServer(), new DatapackBuiltinEntriesProvider(out, CompletableFuture.supplyAsync(ModData::getProvider), Set.of(NaturesAura.MOD_ID))); + } + + private static HolderLookup.Provider getProvider() { + final RegistrySetBuilder registryBuilder = new RegistrySetBuilder(); + registryBuilder.add(Registries.CONFIGURED_FEATURE, ModFeatures.Configured::bootstrap); + registryBuilder.add(Registries.PLACED_FEATURE, ModFeatures.Placed::bootstrap); + registryBuilder.add(ForgeRegistries.Keys.BIOME_MODIFIERS, context -> { + + }); + // We need the BIOME registry to be present, so we can use a biome tag, doesn't matter that it's empty + registryBuilder.add(Registries.BIOME, context -> { + }); + RegistryAccess.Frozen regAccess = RegistryAccess.fromRegistryOfRegistries(BuiltInRegistries.REGISTRY); + return registryBuilder.buildPatch(regAccess, VanillaRegistries.createLookup()); } } diff --git a/src/main/java/de/ellpeck/naturesaura/gen/ModFeatures.java b/src/main/java/de/ellpeck/naturesaura/gen/ModFeatures.java index 82b85bee..6644366b 100644 --- a/src/main/java/de/ellpeck/naturesaura/gen/ModFeatures.java +++ b/src/main/java/de/ellpeck/naturesaura/gen/ModFeatures.java @@ -1,6 +1,12 @@ package de.ellpeck.naturesaura.gen; -import net.minecraft.core.Holder; +import de.ellpeck.naturesaura.NaturesAura; +import net.minecraft.core.HolderGetter; +import net.minecraft.core.registries.Registries; +import net.minecraft.data.worldgen.BootstapContext; +import net.minecraft.data.worldgen.features.FeatureUtils; +import net.minecraft.data.worldgen.placement.PlacementUtils; +import net.minecraft.resources.ResourceKey; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; @@ -20,23 +26,44 @@ public final class ModFeatures { public static final class Configured { - public static Holder> ANCIENT_TREE; - public static Holder> NETHER_WART_MUSHROOM; - public static Holder> AURA_BLOOM; - public static Holder> AURA_CACTUS; - public static Holder> WARPED_AURA_MUSHROOM; - public static Holder> CRIMSON_AURA_MUSHROOM; - public static Holder> AURA_MUSHROOM; + public static ResourceKey> ANCIENT_TREE = FeatureUtils.createKey(NaturesAura.MOD_ID + ":ancient_tree"); + public static ResourceKey> NETHER_WART_MUSHROOM = FeatureUtils.createKey(NaturesAura.MOD_ID + ":nether_wart_mushroom"); + public static ResourceKey> AURA_BLOOM = FeatureUtils.createKey(NaturesAura.MOD_ID + ":aura_bloom"); + public static ResourceKey> AURA_CACTUS = FeatureUtils.createKey(NaturesAura.MOD_ID + ":aura_cactus"); + public static ResourceKey> WARPED_AURA_MUSHROOM = FeatureUtils.createKey(NaturesAura.MOD_ID + ":warped_aura_mushroom"); + public static ResourceKey> CRIMSON_AURA_MUSHROOM = FeatureUtils.createKey(NaturesAura.MOD_ID + ":crimson_aura_mushroom"); + public static ResourceKey> AURA_MUSHROOM = FeatureUtils.createKey(NaturesAura.MOD_ID + ":aura_mushroom"); + + public static void bootstrap(BootstapContext> context) { + FeatureUtils.register(context, ModFeatures.Configured.AURA_BLOOM, ModFeatures.AURA_BLOOM, NoneFeatureConfiguration.INSTANCE); + FeatureUtils.register(context, ModFeatures.Configured.AURA_CACTUS, ModFeatures.AURA_CACTUS, NoneFeatureConfiguration.INSTANCE); + FeatureUtils.register(context, ModFeatures.Configured.WARPED_AURA_MUSHROOM, ModFeatures.WARPED_AURA_MUSHROOM, NoneFeatureConfiguration.INSTANCE); + FeatureUtils.register(context, ModFeatures.Configured.CRIMSON_AURA_MUSHROOM, ModFeatures.CRIMSON_AURA_MUSHROOM, NoneFeatureConfiguration.INSTANCE); + FeatureUtils.register(context, ModFeatures.Configured.AURA_MUSHROOM, ModFeatures.AURA_MUSHROOM, NoneFeatureConfiguration.INSTANCE); + FeatureUtils.register(context, ModFeatures.Configured.ANCIENT_TREE, ModFeatures.ANCIENT_TREE, new TreeConfiguration.TreeConfigurationBuilder(null, null, null, null, null).build()); + FeatureUtils.register(context, ModFeatures.Configured.NETHER_WART_MUSHROOM, ModFeatures.NETHER_WART_MUSHROOM, NoneFeatureConfiguration.INSTANCE); + + } } public static final class Placed { - public static Holder AURA_BLOOM; - public static Holder AURA_CACTUS; - public static Holder WARPED_AURA_MUSHROOM; - public static Holder CRIMSON_AURA_MUSHROOM; - public static Holder AURA_MUSHROOM; + public static ResourceKey AURA_BLOOM = PlacementUtils.createKey(NaturesAura.MOD_ID + ":aura_bloom"); + public static ResourceKey AURA_CACTUS = PlacementUtils.createKey(NaturesAura.MOD_ID + ":aura_cactus"); + public static ResourceKey WARPED_AURA_MUSHROOM = PlacementUtils.createKey(NaturesAura.MOD_ID + ":warped_aura_mushroom"); + public static ResourceKey CRIMSON_AURA_MUSHROOM = PlacementUtils.createKey(NaturesAura.MOD_ID + ":crimson_aura_mushroom"); + public static ResourceKey AURA_MUSHROOM = PlacementUtils.createKey(NaturesAura.MOD_ID + ":aura_mushroom"); + public static void bootstrap(BootstapContext context) { + HolderGetter> holdergetter = context.lookup(Registries.CONFIGURED_FEATURE); + + PlacementUtils.register(context, AURA_BLOOM, holdergetter.getOrThrow(ModFeatures.Configured.AURA_BLOOM)); + PlacementUtils.register(context, AURA_CACTUS, holdergetter.getOrThrow(ModFeatures.Configured.AURA_CACTUS)); + PlacementUtils.register(context, WARPED_AURA_MUSHROOM, holdergetter.getOrThrow(ModFeatures.Configured.WARPED_AURA_MUSHROOM)); + PlacementUtils.register(context, CRIMSON_AURA_MUSHROOM, holdergetter.getOrThrow(ModFeatures.Configured.CRIMSON_AURA_MUSHROOM)); + PlacementUtils.register(context, AURA_MUSHROOM, holdergetter.getOrThrow(ModFeatures.Configured.AURA_MUSHROOM)); + + } } } diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemCrimsonMeal.java b/src/main/java/de/ellpeck/naturesaura/items/ItemCrimsonMeal.java index 001e2dca..a8693be9 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemCrimsonMeal.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemCrimsonMeal.java @@ -1,12 +1,15 @@ package de.ellpeck.naturesaura.items; import de.ellpeck.naturesaura.gen.ModFeatures; +import net.minecraft.core.Registry; +import net.minecraft.core.registries.Registries; import net.minecraft.server.level.ServerLevel; import net.minecraft.util.Mth; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.NetherWartBlock; +import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; public class ItemCrimsonMeal extends ItemImpl { @@ -24,7 +27,8 @@ public class ItemCrimsonMeal extends ItemImpl { if (level.random.nextInt(5) == 0) { int age = state.getValue(NetherWartBlock.AGE); if (age >= 3) { - ModFeatures.Configured.NETHER_WART_MUSHROOM.value().place((ServerLevel) level, ((ServerLevel) level).getChunkSource().getGenerator(), level.random, pos); + Registry> registry = level.registryAccess().registryOrThrow(Registries.CONFIGURED_FEATURE); + registry.getHolderOrThrow(ModFeatures.Configured.NETHER_WART_MUSHROOM).value().place((ServerLevel) level, ((ServerLevel) level).getChunkSource().getGenerator(), level.random, pos); } else { level.setBlockAndUpdate(pos, state.setValue(NetherWartBlock.AGE, age + 1)); } diff --git a/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java b/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java index 57b2ee58..1f09e105 100644 --- a/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java +++ b/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java @@ -11,6 +11,10 @@ import de.ellpeck.naturesaura.compat.patchouli.PatchouliCompat; import de.ellpeck.naturesaura.enchant.AuraMendingEnchantment; import de.ellpeck.naturesaura.enchant.ModEnchantments; import de.ellpeck.naturesaura.entities.*; +import de.ellpeck.naturesaura.gen.LevelGenAncientTree; +import de.ellpeck.naturesaura.gen.LevelGenAuraBloom; +import de.ellpeck.naturesaura.gen.LevelGenNetherWartMushroom; +import de.ellpeck.naturesaura.gen.ModFeatures; import de.ellpeck.naturesaura.gui.ContainerEnderCrate; import de.ellpeck.naturesaura.gui.ModContainers; import de.ellpeck.naturesaura.items.*; @@ -276,7 +280,7 @@ public final class ModRegistry { Helper.populateObjectHolders(ModEntities.class, event.getForgeRegistry()); }); -/* + event.register(ForgeRegistries.Keys.FEATURES, h -> { h.register(new ResourceLocation(NaturesAura.MOD_ID, "aura_bloom"), new LevelGenAuraBloom(ModBlocks.AURA_BLOOM, 60, false)); h.register(new ResourceLocation(NaturesAura.MOD_ID, "aura_cactus"), new LevelGenAuraBloom(ModBlocks.AURA_CACTUS, 60, false)); @@ -287,7 +291,7 @@ public final class ModRegistry { h.register(new ResourceLocation(NaturesAura.MOD_ID, "nether_wart_mushroom"), new LevelGenNetherWartMushroom()); Helper.populateObjectHolders(ModFeatures.class, event.getForgeRegistry()); }); -*/ + event.register(ForgeRegistries.Keys.RECIPE_TYPES, h -> { h.register(new ResourceLocation(NaturesAura.MOD_ID, "altar"), ModRecipes.ALTAR_TYPE); @@ -324,23 +328,6 @@ public final class ModRegistry { }); } - public static void init() { - // TODO fucking features changed again - /*ModFeatures.Configured.AURA_BLOOM = FeatureUtils.register(NaturesAura.MOD_ID + ":aura_bloom", ModFeatures.AURA_BLOOM, NoneFeatureConfiguration.INSTANCE); - ModFeatures.Configured.AURA_CACTUS = FeatureUtils.register(NaturesAura.MOD_ID + ":aura_cactus", ModFeatures.AURA_CACTUS, NoneFeatureConfiguration.INSTANCE); - ModFeatures.Configured.WARPED_AURA_MUSHROOM = FeatureUtils.register(NaturesAura.MOD_ID + ":warped_aura_mushroom", ModFeatures.WARPED_AURA_MUSHROOM, NoneFeatureConfiguration.INSTANCE); - ModFeatures.Configured.CRIMSON_AURA_MUSHROOM = FeatureUtils.register(NaturesAura.MOD_ID + ":crimson_aura_mushroom", ModFeatures.CRIMSON_AURA_MUSHROOM, NoneFeatureConfiguration.INSTANCE); - ModFeatures.Configured.AURA_MUSHROOM = FeatureUtils.register(NaturesAura.MOD_ID + ":aura_mushroom", ModFeatures.AURA_MUSHROOM, NoneFeatureConfiguration.INSTANCE); - ModFeatures.Configured.ANCIENT_TREE = FeatureUtils.register(NaturesAura.MOD_ID + ":ancient_tree", ModFeatures.ANCIENT_TREE, new TreeConfiguration.TreeConfigurationBuilder(null, null, null, null, null).build()); - ModFeatures.Configured.NETHER_WART_MUSHROOM = FeatureUtils.register(NaturesAura.MOD_ID + ":nether_wart_mushroom", ModFeatures.NETHER_WART_MUSHROOM, NoneFeatureConfiguration.INSTANCE); - - ModFeatures.Placed.AURA_BLOOM = PlacementUtils.register(NaturesAura.MOD_ID + ":aura_bloom", ModFeatures.Configured.AURA_BLOOM); - ModFeatures.Placed.AURA_CACTUS = PlacementUtils.register(NaturesAura.MOD_ID + ":aura_cactus", ModFeatures.Configured.AURA_CACTUS); - ModFeatures.Placed.WARPED_AURA_MUSHROOM = PlacementUtils.register(NaturesAura.MOD_ID + ":warped_aura_mushroom", ModFeatures.Configured.WARPED_AURA_MUSHROOM); - ModFeatures.Placed.CRIMSON_AURA_MUSHROOM = PlacementUtils.register(NaturesAura.MOD_ID + ":crimson_aura_mushroom", ModFeatures.Configured.CRIMSON_AURA_MUSHROOM); - ModFeatures.Placed.AURA_MUSHROOM = PlacementUtils.register(NaturesAura.MOD_ID + ":aura_mushroom", ModFeatures.Configured.AURA_MUSHROOM);*/ - } - public static Block createFlowerPot(Block block) { var props = Block.Properties.of().strength(0F); Block potted = new BlockFlowerPot(() -> (FlowerPotBlock) Blocks.FLOWER_POT, () -> block, props);