Jump to content

Recommended Posts

Posted (edited)

I was following some tutorials on yt and noticed that a lot has changed from 1.19.2 to 1.19.3. My IDE doesn't show me any error but when I try to load the game the error I get is:

Spoiler

java.lang.RuntimeException: null
    at net.minecraftforge.registries.GameData.postRegisterEvents(GameData.java:355) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
    at net.minecraftforge.common.ForgeStatesProvider.lambda$new$4(ForgeStatesProvider.java:25) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
    at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$23(ModLoader.java:201) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
    at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {}
    at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:201) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
    at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$14(ModLoader.java:179) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
    at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:179) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
    at net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:91) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:111) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:91) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:474) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.run(Main.java:176) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:51) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:25) ~[fmlloader-1.19.3-44.0.41.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.8.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.8.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.8.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) ~[modlauncher-10.0.8.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) ~[modlauncher-10.0.8.jar:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.8.jar:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.8.jar:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}
    Suppressed: java.lang.RuntimeException: Failed to apply some object holders, see suppressed exceptions for details
        at net.minecraftforge.registries.ObjectHolderRegistry.applyObjectHolders(ObjectHolderRegistry.java:225) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
        at net.minecraftforge.registries.GameData.postRegisterEvents(GameData.java:375) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
        at net.minecraftforge.common.ForgeStatesProvider.lambda$new$4(ForgeStatesProvider.java:25) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
        at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$23(ModLoader.java:201) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
        at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {}
        at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:201) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
        at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$14(ModLoader.java:179) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
        at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:179) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
        at net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:91) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
        at net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:111) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
        at net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:91) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
        at net.minecraft.client.Minecraft.<init>(Minecraft.java:474) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.client.main.Main.run(Main.java:176) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
        at net.minecraft.client.main.Main.main(Main.java:51) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
        at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:25) ~[fmlloader-1.19.3-44.0.41.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.8.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.8.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.8.jar:?] {}
        at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) ~[modlauncher-10.0.8.jar:?] {}
        at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) ~[modlauncher-10.0.8.jar:?] {}
        at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.8.jar:?] {}
        at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.8.jar:?] {}
        at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}
        Suppressed: java.lang.IllegalStateException: Unable to find registry with key minecraft:worldgen/placed_feature for mod "examplemod". Check the 'caused by' to see further stack.
            at net.minecraftforge.registries.RegistryObject$1.accept(RegistryObject.java:178) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
            at net.minecraftforge.registries.RegistryObject$1.accept(RegistryObject.java:164) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
            at net.minecraftforge.registries.ObjectHolderRegistry.lambda$applyObjectHolders$8(ObjectHolderRegistry.java:229) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
            at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
            at net.minecraftforge.registries.ObjectHolderRegistry.applyObjectHolders(ObjectHolderRegistry.java:226) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
            at net.minecraftforge.registries.GameData.postRegisterEvents(GameData.java:375) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
            at net.minecraftforge.common.ForgeStatesProvider.lambda$new$4(ForgeStatesProvider.java:25) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading}
            at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$23(ModLoader.java:201) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
            at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {}
            at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:201) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
            at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$14(ModLoader.java:179) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
            at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
            at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:179) ~[fmlcore-1.19.3-44.0.41.jar:?] {}
            at net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:91) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
            at net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:111) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
            at net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:91) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
            at net.minecraft.client.Minecraft.<init>(Minecraft.java:474) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
            at net.minecraft.client.main.Main.run(Main.java:176) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
            at net.minecraft.client.main.Main.main(Main.java:51) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3.jar:?] {re:classloading,pl:runtimedistcleaner:A}
            at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
            at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
            at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
            at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
            at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:25) ~[fmlloader-1.19.3-44.0.41.jar:?] {}
            at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.8.jar:?] {}
            at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.8.jar:?] {}
            at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.8.jar:?] {}
            at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) ~[modlauncher-10.0.8.jar:?] {}
            at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) ~[modlauncher-10.0.8.jar:?] {}
            at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.8.jar:?] {}
            at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.8.jar:?] {}
            at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}
        Caused by: java.lang.Throwable: Calling Site from mod: examplemod
            at net.minecraftforge.registries.RegistryObject.<init>(RegistryObject.java:162) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3-recomp.jar%23185%23192!/:?] {re:classloading}
            at net.minecraftforge.registries.RegistryObject.create(RegistryObject.java:64) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3-recomp.jar%23185%23192!/:?] {re:classloading}
            at net.minecraftforge.registries.DeferredRegister.register(DeferredRegister.java:187) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3-recomp.jar%23185%23192!/:?] {re:classloading}
            at com.infinituum.examplemod.init.Registration.<clinit>(Registration.java:87) ~[%23191!/:?] {re:classloading}
            at com.infinituum.examplemod.ExampleMod.<init>(ExampleMod.java:25) ~[%23191!/:?] {re:classloading}
            at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}
            at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}
            at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}
            at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}
            at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}
            at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:68) ~[javafmllanguage-1.19.3-44.0.41.jar%23187!/:?] {}
            at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$10(ModContainer.java:121) ~[fmlcore-1.19.3-44.0.41.jar%23190!/:?] {}
            at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}
            at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}
            at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
            at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
            at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {}
            at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {}
            at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at net.minecraftforge.registries.GameData.postRegisterEvents(GameData.java:355) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3-recomp.jar%23185%23192!/:?] {re:classloading}
    at net.minecraftforge.common.ForgeStatesProvider.lambda$new$4(ForgeStatesProvider.java:25) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3-recomp.jar%23185%23192!/:?] {re:classloading}
    at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$23(ModLoader.java:201) ~[fmlcore-1.19.3-44.0.41.jar%23190!/:?] {}
    at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {}
    at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:201) ~[fmlcore-1.19.3-44.0.41.jar%23190!/:?] {}
    at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$14(ModLoader.java:179) ~[fmlcore-1.19.3-44.0.41.jar%23190!/:?] {}
    at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:179) ~[fmlcore-1.19.3-44.0.41.jar%23190!/:?] {}
    at net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:91) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3-recomp.jar%23185%23192!/:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:111) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3-recomp.jar%23185%23192!/:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:91) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3-recomp.jar%23185%23192!/:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:474) ~[forge-1.19.3-44.0.41_mapped_parchment_2022.12.18-1.19.3-recomp.jar%23186!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}

Registration.java:

public class Registration {
    private Registration() {}

    private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
    private static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, MODID);
    private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
    private static final DeferredRegister<Codec<? extends IGlobalLootModifier>> GLM = DeferredRegister.create(ForgeRegistries.Keys.GLOBAL_LOOT_MODIFIER_SERIALIZERS, MODID);
    private static final DeferredRegister<MenuType<?>> CONTAINERS = DeferredRegister.create(ForgeRegistries.MENU_TYPES, MODID);
    private static final DeferredRegister<PlacedFeature> PLACED_FEATURES = DeferredRegister.create(Registries.PLACED_FEATURE, MODID);

    public static final RegistryObject<Block> EXAMPLE_BLOCK = BLOCKS.register("example_block", () -> new Block(BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops()));
    public static final RegistryObject<Block> EXAMPLE_CARROT_CROP = BLOCKS.register("example_carrot_crop", () -> new ExCarrotCropBlock(BlockBehaviour.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP).noOcclusion()));
    public static final RegistryObject<Block> EXAMPLE_ORE = BLOCKS.register("example_ore", () -> new Block(BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(2.0f)));
    public static final RegistryObject<Block> DEEPSLATE_EXAMPLE_ORE = BLOCKS.register("deepslate_example_ore", () -> new Block(BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(2.0f)));
    public static final RegistryObject<Block> EXAMPLE_ADVANCED_BLOCK = BLOCKS.register("example_advanced_block", ExampleAdvancedBlock::new);

    public static final RegistryObject<BlockEntityType<ExampleAdvancedBlockEntity>> EXAMPLE_ADVANCED_BLOCK_ENTITY = BLOCK_ENTITIES.register("example_advanced_block_entity", () -> BlockEntityType.Builder.of(ExampleAdvancedBlockEntity::new, EXAMPLE_ADVANCED_BLOCK.get()).build(null));

    public static final RegistryObject<Item> EXAMPLE_INGOT = ITEMS.register("example_ingot", () -> new Item(new Item.Properties()));
    public static final RegistryObject<Item> EXAMPLE_FOOD = ITEMS.register("example_food", () -> new Item(new Item.Properties().food(new FoodProperties.Builder().nutrition(6).saturationMod(0.6F).build())));
    public static final RegistryObject<Item> EXAMPLE_CARROT = ITEMS.register("example_carrot", () -> new BlockItem(EXAMPLE_CARROT_CROP.get(), new Item.Properties().food(new FoodProperties.Builder().nutrition(6).saturationMod(0.6F).build())));
    public static final RegistryObject<Item> EXAMPLE_PICKAXE = ITEMS.register("example_pickaxe", () -> new PickaxeItem(new ExampleToolTier(), 0, 0, new Item.Properties().stacksTo(1)));
    public static final RegistryObject<Item> EXAMPLE_BLOCK_ITEM = ITEMS.register("example_block", () -> new BlockItem(EXAMPLE_BLOCK.get(), new Item.Properties()));
    public static final RegistryObject<Item> EXAMPLE_ADVANCED_BLOCK_ITEM = ITEMS.register("example_advanced_block", () -> new BlockItem(EXAMPLE_ADVANCED_BLOCK.get(), new Item.Properties()));
    public static final RegistryObject<Item> EXAMPLE_ORE_ITEM = ITEMS.register("example_ore", () -> new BlockItem(EXAMPLE_ORE.get(), new Item.Properties()));
    public static final RegistryObject<Item> DEEPSLATE_EXAMPLE_ORE_ITEM = ITEMS.register("deepslate_example_ore", () -> new BlockItem(DEEPSLATE_EXAMPLE_ORE.get(), new Item.Properties()));
    public static final RegistryObject<Item> RAW_EXAMPLE_ORE = ITEMS.register("raw_example_ore", () -> new Item(new Item.Properties()));

    public static final RegistryObject<Codec<GrassLootModifier>> GRASS_MOD = GLM.register("grass", GrassLootModifier.CODEC);

    public static final RegistryObject<MenuType<ExampleAdvancedBlockMenu>> EXAMPLE_ADVANCED_BLOCK_CONTAINER = CONTAINERS.register("example_advanced_block_container", () -> IForgeMenuType.create((id, inv, data) -> new ExampleAdvancedBlockMenu(id, data.readBlockPos(), inv, inv.player)));

    public static final Supplier<List<OreConfiguration.TargetBlockState>> OVERWORLD_EXAMPLE_ORE = Suppliers.memoize(() -> List.of(
            OreConfiguration.target(new TagMatchTest(BlockTags.STONE_ORE_REPLACEABLES), EXAMPLE_ORE.get().defaultBlockState()),
            OreConfiguration.target(new TagMatchTest(BlockTags.DEEPSLATE_ORE_REPLACEABLES), DEEPSLATE_EXAMPLE_ORE.get().defaultBlockState())
    ));

    public static final RegistryObject<PlacedFeature> EXAMPLE_ORE_PLACED =
            PLACED_FEATURES.register("example_ore_placed",
                    () -> new PlacedFeature(Holder.direct(new ConfiguredFeature<>(Feature.ORE, new OreConfiguration(OVERWORLD_EXAMPLE_ORE.get(), 7))),
                            CustomOrePlacements.commonOrePlacement(7,
                                    HeightRangePlacement.triangle(
                                            VerticalAnchor.aboveBottom(-80),
                                            VerticalAnchor.aboveBottom(80)
                                    )
                            )
                    )
            );


    public static void init() {
        IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();

        BLOCKS.register(bus);
        BLOCK_ENTITIES.register(bus);
        ITEMS.register(bus);
        GLM.register(bus);
        CONTAINERS.register(bus);

        PLACED_FEATURES.register(bus);
    }
}

The method `init` is called directly from the ExampleMod constructor (main entry point of the mod).

The `CustomOrePlacements` class is basically a copy of some of the private methods from the `OrePlacements` class.

 

I've already placed a json file inside `resources/data/examplemod/forge/biome_modifier`:

{
  "type": "forge:add_features",
  "biomes": "#minecraft:is_overworld",
  "features": "examplemod:example_ore_placed",
  "step": "underground_ores"
}


I was wondering if someone could explain what's wrong with the code and how to fix this problem.

Edited by Infinituum

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • UPDATE: this seems to be an Arch-specific issue. Switching to Ubuntu server fixed EVERYTHING.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.