Jump to content

Recommended Posts

Posted
---- Minecraft Crash Report ----
// Shall we play a game?

Time: 30/04/2023, 13:47
Description: Mod loading error has occurred

java.lang.Exception: Mod Loading has failed
	at net.minecraftforge.logging.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:55) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2375%2382!/:?] {re:classloading}
	at net.minecraftforge.client.loading.ClientModLoader.completeModLoading(ClientModLoader.java:170) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2375%2382!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.lambda$new$1(Minecraft.java:560) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.Util.ifElse(Util.java:400) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading}
	at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:554) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.gui.screens.LoadingOverlay.render(LoadingOverlay.java:135) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:891) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1070) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:668) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:205) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {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:24) ~[fmlloader-1.18.2-40.1.51.jar%230!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%2310!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%2310!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%2310!/:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%2310!/:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%2310!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%2310!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%2310!/:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {}


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

-- Head --
Thread: Render thread
Stacktrace:
	at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?] {}
-- MOD majestic --
Details:
	Caused by 0: java.lang.reflect.InvocationTargetException
		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:67) ~[javafmllanguage-1.18.2-40.1.51.jar%2377!/:?] {}
		at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:106) ~[fmlcore-1.18.2-40.1.51.jar%2380!/:?] {}
		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) ~[?:?] {}

	Caused by 1: java.lang.ExceptionInInitializerError
		at net.JustEmSee_Burd.the_majestic.The_Majestic.<init>(The_Majestic.java:47) ~[%2381!/:?] {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:67) ~[javafmllanguage-1.18.2-40.1.51.jar%2377!/:?] {}
		at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:106) ~[fmlcore-1.18.2-40.1.51.jar%2380!/:?] {}
		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) ~[?:?] {}

	Mod File: main
	Failure message: The Majestic (majestic) has failed to load correctly
		java.lang.reflect.InvocationTargetException: null
	Mod Version: 0.0NONE
	Mod Issue URL: NOT PROVIDED
	Exception message: java.lang.NullPointerException: Registry Object not present: majestic:fire_crystal_ore
Stacktrace:
	at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?] {}
	at net.minecraftforge.registries.RegistryObject.get(RegistryObject.java:320) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2375%2382!/:?] {re:classloading,xf:fml:forge:registry_object_binary_compat}
	at net.JustEmSee_Burd.the_majestic.world.feature.ModConfiguredFeatures.RegisterOre(ModConfiguredFeatures.java:23) ~[%2381!/:?] {re:classloading}
	at net.JustEmSee_Burd.the_majestic.item.ModCrystalItems.registerCrystalOre(ModCrystalItems.java:117) ~[%2381!/:?] {re:classloading}
	at net.JustEmSee_Burd.the_majestic.item.ModCrystalItems.registerCrystal(ModCrystalItems.java:105) ~[%2381!/:?] {re:classloading}
	at net.JustEmSee_Burd.the_majestic.item.ModCrystalItems.<clinit>(ModCrystalItems.java:40) ~[%2381!/:?] {re:classloading}
	at net.JustEmSee_Burd.the_majestic.The_Majestic.<init>(The_Majestic.java:47) ~[%2381!/:?] {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:67) ~[javafmllanguage-1.18.2-40.1.51.jar%2377!/:?] {}
	at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:106) ~[fmlcore-1.18.2-40.1.51.jar%2380!/:?] {}
	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) ~[?:?] {}


-- System Details --
Details:
	Minecraft Version: 1.18.2
	Minecraft Version ID: 1.18.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 17.0.2, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
	Memory: 1758408704 bytes (1676 MiB) / 2187329536 bytes (2086 MiB) up to 4282384384 bytes (4084 MiB)
	CPUs: 16
	Processor Vendor: AuthenticAMD
	Processor Name: AMD Ryzen 7 3700X 8-Core Processor             
	Identifier: AuthenticAMD Family 23 Model 113 Stepping 0
	Microarchitecture: Zen 2
	Frequency (GHz): 3.59
	Number of physical packages: 1
	Number of physical CPUs: 8
	Number of logical CPUs: 16
	Graphics card #0 name: NVIDIA GeForce GTX 970
	Graphics card #0 vendor: NVIDIA (0x10de)
	Graphics card #0 VRAM (MB): 4095.00
	Graphics card #0 deviceId: 0x13c2
	Graphics card #0 versionInfo: DriverVersion=31.0.15.2737
	Memory slot #0 capacity (MB): 8192.00
	Memory slot #0 clockSpeed (GHz): 2.13
	Memory slot #0 type: DDR4
	Memory slot #1 capacity (MB): 8192.00
	Memory slot #1 clockSpeed (GHz): 2.13
	Memory slot #1 type: DDR4
	Virtual memory max (MB): 41929.35
	Virtual memory used (MB): 18962.37
	Swap memory total (MB): 25600.00
	Swap memory used (MB): 984.88
	JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
	ModLauncher: 9.1.3+9.1.3+main.9b69c82a
	ModLauncher launch target: forgeclientuserdev
	ModLauncher naming: mcp
	ModLauncher services: 
		 mixin PLUGINSERVICE 
		 eventbus PLUGINSERVICE 
		 slf4jfixer PLUGINSERVICE 
		 object_holder_definalize PLUGINSERVICE 
		 runtime_enum_extender PLUGINSERVICE 
		 capability_token_subclass PLUGINSERVICE 
		 accesstransformer PLUGINSERVICE 
		 runtimedistcleaner PLUGINSERVICE 
		 mixin TRANSFORMATIONSERVICE 
		 fml TRANSFORMATIONSERVICE 
	FML Language Providers: 
		minecraft@1.0
		lowcodefml@null
		javafml@null
	Mod List: 
		forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1|Minecraft                     |minecraft                     |1.18.2              |COMMON_SET|Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
		                                                  |Forge                         |forge                         |40.1.51             |COMMON_SET|Manifest: NOSIGNATURE
		Patchouli-1.18.2-71.1_mapped_parchment_2022.03.13-|Patchouli                     |patchouli                     |1.18.2-71.1         |COMMON_SET|Manifest: NOSIGNATURE
		main                                              |The Majestic                  |majestic                      |0.0NONE             |ERROR     |Manifest: NOSIGNATURE
		geckolib-forge-1.18-3.0.41_mapped_parchment_2022.0|GeckoLib                      |geckolib3                     |3.0.41              |COMMON_SET|Manifest: NOSIGNATURE
		jei-1.18.2-9.7.1.255_mapped_parchment_2022.03.13-1|Just Enough Items             |jei                           |9.7.1.255           |COMMON_SET|Manifest: NOSIGNATURE
	Crash Report UUID: 670498e1-ca33-4e4d-b9d9-7456cf682631
	FML: 40.1
	Forge: net.minecraftforge:40.1.51

tried to add automatic ore generation for automictic generating blocks but got this error

Posted

You can't dereference RegistryObjects until after the underlying objects are registered.

https://forge.gemwire.uk/wiki/Registration

https://forge.gemwire.uk/wiki/Stages_of_Modloading

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Posted

Paraphrasing those links since it looks like you are too lazy to read them yourself.

 

Don't call get() until you really need the value. After the RegisterEvent has been fired.

You certainly can't do it in the static initialisation of a class.

  Quote

at net.JustEmSee_Burd.the_majestic.item.ModCrystalItems.<clinit>(ModCrystalItems.java:40) ~[%2381!/:?] {re:classloading}

Expand  

 

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Posted

the thing I'm trying to do is for each item in ModCrystals that has a value set to true I want to generate an ore with ore generation which is different per crystal, but I guess that is just not possible?

 

Posted

Of course it is possible. You are just doing it wrong.

From that link I posted earlier that you didn't read (the part that says IMPORTANT): https://forge.gemwire.uk/wiki/Registration#DeferredRegister

 

Bad constructor (no way to pass an item in static initialisation):

MyCrystalOreBlock(Item item)

Good constructor (deferred access)

MyCrystalOreBlock(RegistryObject<Item> itemRegistryObject) // or equivalently Supplier<Item>

 

And it's not like this question hasn't been asked many times before in this forum. oh wait...

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Posted

Sorry, but you are just talking to yourself unless you show what you talking about.

We have no psychic powers.

Although I suspect, you just don't understand how Suppliers (deferred access) works?

Example from a recent thread:

https://forums.minecraftforge.net/topic/123364-defective-ore-generation/

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Posted

im sorry, here is the code i am referring to

 

package net.JustEmSee_Burd.the_majestic.item;

import net.JustEmSee_Burd.the_majestic.The_Majestic;
import net.JustEmSee_Burd.the_majestic.block.ModBlocks;
import net.JustEmSee_Burd.the_majestic.spell.Spell;
import net.JustEmSee_Burd.the_majestic.spell.SpellItem;
import net.JustEmSee_Burd.the_majestic.world.feature.ModConfiguredFeatures;
import net.JustEmSee_Burd.the_majestic.world.feature.ModOrePlacement;
import net.minecraft.data.worldgen.features.OreFeatures;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.levelgen.VerticalAnchor;
import net.minecraft.world.level.levelgen.placement.HeightRangePlacement;
import net.minecraft.world.level.levelgen.placement.PlacementModifier;
import net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest;
import net.minecraft.world.level.material.Material;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import org.jetbrains.annotations.Nullable;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Supplier;

public class ModCrystalItems {
    private List GenerateOres = new ArrayList();
    public static final DeferredRegister<Item> CRYSTALS =
            DeferredRegister.create(ForgeRegistries.ITEMS, The_Majestic.MOD_ID);

    public static final RegistryObject<Item> MANA_CRYSTAL =  registerCrystal("mana_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            false, false, null, 0 ,
            null, null);


    public static final RegistryObject<Item> FIRE_CRYSTAL =  registerCrystal("fire_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            true, false, OreFeatures.NETHER_ORE_REPLACEABLES, 100 ,
            ModOrePlacement.commonOrePlacement(1 ,HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-80), VerticalAnchor.aboveBottom(80))), null);

    public static final RegistryObject<Item> WATER_CRYSTAL =  registerCrystal("water_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            true, true, OreFeatures.STONE_ORE_REPLACEABLES, 100 ,
            ModOrePlacement.commonOrePlacement(1 ,HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-80), VerticalAnchor.aboveBottom(80))), null);

    public static final RegistryObject<Item> EARTH_CRYSTAL =  registerCrystal("earth_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            true, true, OreFeatures.STONE_ORE_REPLACEABLES, 100 ,
            ModOrePlacement.commonOrePlacement(1 ,HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-80), VerticalAnchor.aboveBottom(80))), null);

    public static final RegistryObject<Item> AIR_CRYSTAL =  registerCrystal("air_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            true, true, OreFeatures.STONE_ORE_REPLACEABLES, 100 ,
            ModOrePlacement.commonOrePlacement(1 ,HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-80), VerticalAnchor.aboveBottom(80))), null);

    public static final RegistryObject<Item> MAGMA_CRYSTAL =  registerCrystal("magma_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            false, false, null, 0 ,
            null, null);

    public static final RegistryObject<Item> ICE_CRYSTAL =  registerCrystal("ice_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            false, false, null, 0 ,
            null, null);

    public static final RegistryObject<Item> NATURE_CRYSTAL =  registerCrystal("nature_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            false, false, null, 0 ,
            null, null);

    public static final RegistryObject<Item> LIGHTNING_CRYSTAL =  registerCrystal("lightning_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            false, false, null, 0 ,
            null, null);

    public static final RegistryObject<Item> LIGHT_CRYSTAL =  registerCrystal("light_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            false, false, null, 0 ,
            null, null);

    public static final RegistryObject<Item> DARKNESS_CRYSTAL =  registerCrystal("darkness_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            false,false, null, 0,
            null, null);

    public static final RegistryObject<Item> VOID_CRYSTAL =  registerCrystal("void_crystal",
            () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
            false, false, null, 0,
            null, null);

    public static void register(IEventBus eventBus) {
        CRYSTALS.register(eventBus);
    }

    private static <T extends Item> RegistryObject<T> registerCrystal(String name, Supplier<T> item, boolean hasOre, boolean hasDeepslateOre, RuleTest defaultOreReplaceBlock, int oreSize, List<PlacementModifier> orePlacementFeatures, List Features) {
        RegistryObject<T> toReturn = CRYSTALS.register(name, item);
        String oreName = null;
        String deepslateOreName = null;
        if (hasOre) oreName = name+"_ore";
        if (hasDeepslateOre)deepslateOreName = "deepslate_"+name+"_ore";
        if (hasOre || hasDeepslateOre)registerCrystalOre(oreName, deepslateOreName, ModCreativeModeTab.Majestic_TAB, defaultOreReplaceBlock, oreSize, orePlacementFeatures, Features);

        return toReturn;
    }

    private static void registerCrystalOre(String oreName, String deepslateOreName, CreativeModeTab tab,RuleTest ruleTest, int oreSize,List<PlacementModifier> orePlacementFeatures, List Features) {
        RegistryObject<Block> ore = null;
        RegistryObject<Block> deepslateOre = null;
        if(oreName != null) ore = ModBlocks.registerBlock(oreName, () -> new Block(BlockBehaviour.Properties.of(Material.STONE)
                .strength(5F).requiresCorrectToolForDrops()), tab);
        if(deepslateOreName != null) deepslateOre = ModBlocks.registerBlock(deepslateOreName, () -> new Block(BlockBehaviour.Properties.of(Material.STONE)
                .strength(5F).requiresCorrectToolForDrops()), tab);
        ModConfiguredFeatures.RegisterOre(oreName, ore, deepslateOre, ruleTest, oreSize, orePlacementFeatures, Features);
    }

}
package net.JustEmSee_Burd.the_majestic.world.feature;

import net.JustEmSee_Burd.the_majestic.The_Majestic;
import net.minecraft.core.Holder;
import net.minecraft.data.worldgen.features.FeatureUtils;
import net.minecraft.data.worldgen.features.OreFeatures;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.configurations.OreConfiguration;
import net.minecraft.world.level.levelgen.placement.PlacementModifier;
import net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest;
import net.minecraftforge.registries.RegistryObject;

import java.util.ArrayList;
import java.util.List;

public class ModConfiguredFeatures {

    public static List<OreConfiguration.TargetBlockState> RegisterOre(String name, RegistryObject<Block> oreBlock, RegistryObject<Block> deepslateOreBlock, RuleTest deafaultOreReplaceBlock, int OreSize, List<PlacementModifier> OrePlacementFeatures, List ExtraFeatures) {
        List<OreConfiguration.TargetBlockState> toReturn = new ArrayList<>();
        if (oreBlock != null) toReturn.add(OreConfiguration.target(deafaultOreReplaceBlock, oreBlock.get().defaultBlockState()));
        if (deepslateOreBlock != null) toReturn.add(OreConfiguration.target(OreFeatures.DEEPSLATE_ORE_REPLACEABLES, deepslateOreBlock.get().defaultBlockState()));
        if (ExtraFeatures != null) toReturn.addAll(ExtraFeatures);
        configureOre(toReturn, name, OreSize, OrePlacementFeatures);
        return toReturn;
    }

    public static Holder<ConfiguredFeature<OreConfiguration, ?>> configureOre(List<OreConfiguration.TargetBlockState> features, String name, int OreSize, List<PlacementModifier> OrePlacementFeatures) {
        Holder<ConfiguredFeature<OreConfiguration, ?>> toReturn = FeatureUtils.register(name,
                Feature.ORE, new OreConfiguration(features, OreSize));
        ModPlacedFeatures.GenerateOrePlacement(name+"_placed", toReturn, OrePlacementFeatures);
        return toReturn;
    }

    public static void registerConfiguredFeatures() {
        System.out.println("Registering ModConfiguredFeatures for " + The_Majestic.MOD_ID);
    }


}
package net.JustEmSee_Burd.the_majestic.world.feature;


import net.minecraft.world.level.levelgen.placement.*;

import java.util.List;

public class ModOrePlacement {
    public static List<PlacementModifier> orePlacement(PlacementModifier veinsPerChunk, PlacementModifier p_195348_) {
        return List.of(veinsPerChunk, InSquarePlacement.spread(), p_195348_, BiomeFilter.biome());
    }

    public static List<PlacementModifier> commonOrePlacement(int p_195344_, PlacementModifier p_195345_) {
        return orePlacement(CountPlacement.of(p_195344_), p_195345_);
    }

    public static List<PlacementModifier> rareOrePlacement(int p_195350_, PlacementModifier p_195351_) {
        return orePlacement(RarityFilter.onAverageOnceEvery(p_195350_), p_195351_);
    }
}
package net.JustEmSee_Burd.the_majestic.world.gen;


import net.minecraft.core.Holder;
import net.minecraft.world.level.levelgen.GenerationStep;
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
import net.minecraftforge.event.world.BiomeLoadingEvent;

import java.util.ArrayList;
import java.util.List;

public class ModOreGeneration {
    private static List<Holder<PlacedFeature>> list = new ArrayList<>();

    public static void generateOres(final BiomeLoadingEvent event) {
        List<Holder<PlacedFeature>> base =
                event.getGeneration().getFeatures(GenerationStep.Decoration.UNDERGROUND_ORES);
        base.addAll(list);
    }
    
    public static void addOreGen(Holder<PlacedFeature> placedFeatureHolder) {
        list.add(placedFeatureHolder);
    }


}

 

or the github: https://github.com/sen2006/The-Majestic

Posted (edited)

I'm obviously just wasting my time.

My previous response contains a link to some code by somebody who knows how to "correctly" register ConfiguredFeatures in 1.18 using a DeferredRegister<ConfiguredFeature>

Yours tries to lookup blocks that don't exist yet and then register them in the vanilla builtin registries.

Edited by warjort

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

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

    • Short Term Loans Online: A Reliable Source of Fast Cash   If you are experiencing financial difficulties, you don't have to worry about this challenge. This is the quickest and best method for handling financial catastrophes. You can pick short term loans online without reluctance, and you can apply for the payday loan you want online and have it the same day without any issues. With two to four weeks to repay the loan, you may often borrow between $100 and $1000 without having to offer any collateral.   As implied by the title, those with bad credit histories—defaults, arrears, foreclosure, late or missed payments, judgments against you, insolvency or IVA, etc.—are welcome to apply for online short term loans without having to go through any challenging procedures. Interest rates are a bit high in comparison to other loans. A thorough internet search can be used to determine the greatest rate for a financed loan.   You don't have to waste your precious time searching the internet for short term funding payday loans. In just a few minutes, you can apply for the finance you desire by completing a brief online application. The lender will approve the loan once he has verified that you have provided accurate information on this brief form. This loan is carefully deposited into your bank account in the least amount of time. You can utilize the money in a number of ways without running into any problems. Usually, the money can be used to settle debts like credit card balances, overdue bank overdrafts, tuition or school fees for children, energy bills, housing costs, and more.   Loans Lucre makes it simple to apply for short term loans online, so there's no need to drive across town. Additionally, you won't have to wait weeks for a response from us. Additionally, having bad credit shouldn't be a deal-breaker. We evaluate your entire financial history rather than just your FICO score. We approve many debtors who had been rejected by banks.   Once you are approved, Loans Lucre puts your online installment loans directly into your bank account, giving you instant access to your funds. The repayment plan is broken down into simple, reasonably priced monthly installments. Loans Lucre also rejects rollovers. Instead, we help borrowers get back on track when they encounter difficulties with the repayment process. Borrowers who regularly make their payments on time are eligible for lower annual percentage rates (APRs) on their subsequent these loans. That is truly win-win!   You will be communicating with the lender whether you apply for online personal loans through a cash advance broker or directly from the lender. The cost and duration of the transaction will be increased by any third parties you deal with through the direct lender. This will lead to a faulty perception of the "instant approval" of your payday loan, in addition to raising the cost of your transaction. When asking for a payday loan, it is therefore essential that you work with a trustworthy direct lender; a lender with a solid online reputation and satisfied clients is a wise choice.   You can apply for a short term loans online through internet platforms in addition to conventional lenders. A quicker and more convenient application process is frequently provided by these platforms. In the end, it is feasible to get a $500 loan with low credit or no credit at all, but it will need effort and careful evaluation of your financial possibilities. The lender's requirements will always determine approval, so be careful to give accurate information and look into several lenders to determine which one best suit your needs. https://loanslucre.com/  
    • Apply For Fast Cash Loans Online Today To Get Money Right Away   Do you have to deal with your money issues right away? You don't need to go anywhere because you can get fast cash loans online with just a computer and an internet connection. This suggests that you don't need to waste any time applying for these loans. All you have to do is fill out the form accurately and submit it to the lender online. They will check it and determine whether to approve the loan within the specified time frame. The money is moved to your bank account shortly after approval.   The same-day financing loan facility offers the most beneficial cash assistance in quantities ranging from $100 to $1000, with a flexible payback period of 2-4 weeks from the date of acceptance. You can use the borrowed funds to cover your child's tuition or school fees, small vacation expenses, past credit card payments, laundry costs, minor house repairs, your mother's checkups, and other emergencies.   To be qualified for same day funding loans, you must meet specific conditions regardless of your credit score—fair or low. A valid proof of domicile and proof of residence for the last 12 months, a current bank account with an SSN, being employed permanently with a monthly wage of at least $1000, and being at least eighteen years of age are prerequisites. If you satisfy the qualifications, you can apply for same-day payday loans directly without undergoing a credit check if you have bankruptcy, CCJs, IVAs, foreclosure, arrears, or defaults. As a result, getting a loan is fairly easy in the current credit market.   You must complete an application with information about your bank account and job in order to apply for a fast cash loan online from a physical payday lender. You also need to provide the lender with postdated checks that will be deposited on the scheduled repayment date. In return, you get paid right away.   Applicants can apply for same day payday loans at any time, from the comfort of their homes, eliminating the need to travel across town to a payday loan outlet. However, online payday lenders do not frequently provide same-day loans. Instead, payouts are made straight into borrowers' bank accounts via the Automated Clearing House (ACH) system; processing for this method takes at least one business day.   You must think about if you can pay back the loan in full within the allotted time because same day payday loans may have payback periods as little as one week or ten days. If you are unable to pay the full amount due, the lender might accept a token payment from you. The remaining sum will be restructured as a rollover, which is a new loan with fresh interest and administrative costs and the same short payback period. After a few rollovers, a significant number of little payday loans accumulate to the point that debtors still owe more than they originally borrowed, even after making consistent payments for months or years.   You should be ready to submit the required paperwork and supporting proof when applying for a payday loans online same day with bad credit. Usually, lenders will evaluate your present financial state, work status, and loan-repayment capacity. Many lenders specialize in bad credit loans and are willing to take on the risk of lending to those with poor credit, despite the difficulties presented by a low credit score. This implies that you are not automatically denied a loan because of poor credit or no credit at all. https://nuevacash.com/
    • I have removed stevekunglib and it is still crashing again https://pastebin.com/9vE8pji0
    • It looks like an issue with stevekunglib or a mod requiring it
  • Topics

×
×
  • Create New...

Important Information

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