diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/ActuallyConfiguredFeatures.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/ActuallyConfiguredFeatures.java index 77a019934..9bb0b7c7f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/ActuallyConfiguredFeatures.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/ActuallyConfiguredFeatures.java @@ -1,9 +1,12 @@ package de.ellpeck.actuallyadditions.mod.gen; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; +import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstrapContext; import net.minecraft.data.worldgen.features.FeatureUtils; import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.feature.Feature; @@ -14,7 +17,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.TagMatchTest; import java.util.List; public class ActuallyConfiguredFeatures { - public static final ResourceKey> ORE_BLACK_QUARTZ = FeatureUtils.createKey("actuallyadditions:ore_black_quartz"); + public static final ResourceKey> ORE_BLACK_QUARTZ = createKey("ore_black_quartz"); public static void bootstrap(BootstrapContext> context) { RuleTest stoneRuleTest = new TagMatchTest(BlockTags.STONE_ORE_REPLACEABLES); @@ -25,4 +28,8 @@ public class ActuallyConfiguredFeatures { ); FeatureUtils.register(context, ORE_BLACK_QUARTZ, Feature.ORE, new OreConfiguration(list, 6)); } + + private static ResourceKey> createKey(String name) { + return ResourceKey.create(Registries.CONFIGURED_FEATURE, ActuallyAdditions.modLoc(name)); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/ActuallyPlacedFeatures.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/ActuallyPlacedFeatures.java index 77df044b3..77bfa7893 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/ActuallyPlacedFeatures.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/ActuallyPlacedFeatures.java @@ -1,5 +1,6 @@ package de.ellpeck.actuallyadditions.mod.gen; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.core.HolderGetter; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstrapContext; @@ -17,7 +18,7 @@ import net.minecraft.world.level.levelgen.placement.PlacementModifier; import java.util.List; public class ActuallyPlacedFeatures { - public static final ResourceKey PLACED_ORE_BLACK_QUARTZ = PlacementUtils.createKey("actuallyadditions:ore_black_quartz"); + public static final ResourceKey PLACED_ORE_BLACK_QUARTZ = createKey("ore_black_quartz"); public static void bootstrap(BootstrapContext context) { HolderGetter> holdergetter = context.lookup(Registries.CONFIGURED_FEATURE); @@ -33,4 +34,8 @@ public class ActuallyPlacedFeatures { private static List commonOrePlacement(int count, PlacementModifier modifier) { return orePlacement(CountPlacement.of(count), modifier); } + + private static ResourceKey createKey(String name) { + return ResourceKey.create(Registries.PLACED_FEATURE, ActuallyAdditions.modLoc(name)); + } }