Jump to content

I have an error and have no clue how to fix it


MrGreenyboy

Recommended Posts

[m[36m[08:57:09] [Render thread/DEBUG] [ne.mi.fm.ja.FMLModContainer/LOADING]: Firing event for modid forge : RegistryEvent.NewRegistry
[m[36m[08:57:09] [Render thread/DEBUG] [ne.mi.fm.ja.FMLModContainer/LOADING]: Fired event for modid forge : RegistryEvent.NewRegistry
[m[36m[08:57:09] [Render thread/DEBUG] [ne.mi.fm.ja.FMLModContainer/LOADING]: Firing event for modid tutorialmod : RegistryEvent.NewRegistry
[m[36m[08:57:09] [Render thread/DEBUG] [ne.mi.fm.ja.FMLModContainer/LOADING]: Fired event for modid tutorialmod : RegistryEvent.NewRegistry
[m[36m[08:57:09] [Render thread/DEBUG] [ne.mi.re.ObjectHolderRegistry/REGISTRIES]: Processing ObjectHolder annotations
[m[33m[08:57:09] [Render thread/WARN] [ne.mi.re.ObjectHolderRegistry/REGISTRIES]: Found an unqualified ObjectHolder annotation (tutorialmod) without a modid context at Lcom/MrGreenyboy/TutorialMod/init/ItemInit;.example_item, ignoring
[m[32m[08:57:09] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:printToSYSOUT:120]: ---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 27/07/20 08:57
Description: Initializing game

java.lang.IllegalStateException: Unqualified reference to ObjectHolder
    at net.minecraftforge.registries.ObjectHolderRegistry.scanTarget(ObjectHolderRegistry.java:146) ~[forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {re:classloading}
    at net.minecraftforge.registries.ObjectHolderRegistry.lambda$findObjectHolders$8(ObjectHolderRegistry.java:110) ~[forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {re:classloading}
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) ~[?:1.8.0_251] {}
    at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:1.8.0_251] {}
    at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:1.8.0_251] {}
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) ~[?:1.8.0_251] {}
    at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:1.8.0_251] {}
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:1.8.0_251] {}
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) ~[?:1.8.0_251] {}
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) ~[?:1.8.0_251] {}
    at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:1.8.0_251] {}
    at java.util.stream.ReferencePipeline.forEach(Unknown Source) ~[?:1.8.0_251] {}
    at net.minecraftforge.registries.ObjectHolderRegistry.findObjectHolders(ObjectHolderRegistry.java:110) ~[forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {re:classloading}
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:203) ~[forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {re:classloading}
    at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:93) ~[forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:109) ~[forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:93) ~[forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:425) ~[forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:149) ~[forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251] {}
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_251] {}
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?] {}
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar:?] {}


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.ObjectHolderRegistry.scanTarget(ObjectHolderRegistry.java:146)
    at net.minecraftforge.registries.ObjectHolderRegistry.lambda$findObjectHolders$8(ObjectHolderRegistry.java:110)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
    at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
    at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
    at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
    at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
    at java.util.stream.ReferencePipeline.forEach(Unknown Source)
    at net.minecraftforge.registries.ObjectHolderRegistry.findObjectHolders(ObjectHolderRegistry.java:110)
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:203)
    at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:93)
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:109)
    at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:93)
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:425)

-- Initialization --
Details:
Stacktrace:
    at net.minecraft.client.main.Main.main(Main.java:149)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105)

-- System Details --
Details:
    Minecraft Version: 1.16.1
    Minecraft Version ID: 1.16.1
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_251, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 152545304 bytes (145 MB) / 802160640 bytes (765 MB) up to 1417150464 bytes (1351 MB)
    CPUs: 4
    JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
    ModLauncher: 5.1.0+69+master.79f13f7
    ModLauncher launch target: fmluserdevclient
    ModLauncher naming: mcp
    ModLauncher services:
        /mixin-0.8.jar mixin PLUGINSERVICE
        /eventbus-2.2.0-service.jar eventbus PLUGINSERVICE
        /forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16-launcher.jar object_holder_definalize PLUGINSERVICE
        /forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16-launcher.jar runtime_enum_extender PLUGINSERVICE
        /accesstransformers-2.1.3-shadowed.jar accesstransformer PLUGINSERVICE
        /forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16-launcher.jar capability_inject_definalize PLUGINSERVICE
        /forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16-launcher.jar runtimedistcleaner PLUGINSERVICE
        /mixin-0.8.jar mixin TRANSFORMATIONSERVICE
        /forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16-launcher.jar fml TRANSFORMATIONSERVICE
    FML: 32.0
    Forge: net.minecraftforge:32.0.75
    FML Language Providers:
        javafml@32.0
        minecraft@1
    Mod List:
        client-extra.jar Minecraft {minecraft@1.16.1 LOAD_REGISTRIES}
        forge-1.16.1-32.0.75_mapped_snapshot_20200514-1.16.jar Forge {forge@32.0.75 LOAD_REGISTRIES}
        main Tutorial Mod {tutorialmod@1.0 LOAD_REGISTRIES}
    Launched Version: MOD_DEV
    Backend library: LWJGL version 3.2.2 build 10
    Backend API: Radeon RX 580 Series GL version 4.6.13587 Compatibility Profile Context 20.2.2 26.20.15019.19000, ATI Technologies Inc.
    GL Caps: Using framebuffer using OpenGL 3.0
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'forge'
    Type: Client (map_client.txt)
    CPU: 4x AMD Ryzen 3 3200G with Radeon Vega Graphics
[m[32m[08:57:09] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:printToSYSOUT:120]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\dangr\Documents\Youtube\mods\TutorialMod1.16.1(2)\run\.\crash-reports\crash-2020-07-27_08.57.09-client.txt
[m

Link to comment
Share on other sites

1 hour ago, MrGreenyboy said:

[08:57:09] [Render thread/WARN] [ne.mi.re.ObjectHolderRegistry/REGISTRIES]: Found an unqualified ObjectHolder annotation (tutorialmod) without a modid context at Lcom/MrGreenyboy/TutorialMod/init/ItemInit;.example_item, ignoring

You put a `@ObjectHolder` annotation on `ItemInit.example_item` without specifying a modid in either the annotation on the field or on the class (through @Mod or @ObjectHolder). See the documentation on @ObjectHolder for its rules and examples. (ignore the 1.14.x version, it is the same up to 1.16.+)

  • Thanks 2
Link to comment
Share on other sites

This is my code where would i add the modid

 

package com.MrGreenyboy.TutorialMod.init;

import com.MrGreenyboy.TutorialMod.TutorialMod;

import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
import net.minecraftforge.registries.ObjectHolder;

@Mod.EventBusSubscriber(modid = "tutorialmod", bus = Bus.MOD)
public class ItemInit
{
    
    @ObjectHolder("tutorialmod" + "example_item")
    public static Item example_item;
    
    @SubscribeEvent
    public static void registerItems(final RegistryEvent.Register<Item> event) {
        event.getRegistry().register(new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName("example_item"));
    }
}

Link to comment
Share on other sites

13 minutes ago, MrGreenyboy said:

@ObjectHolder("tutorialmod" + "example_item")

Remove your item name, all you need is the modid, you can also annotate the class with it if you're going to use to for lots of items.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

Link to comment
Share on other sites

I still had minecraft crash with the same error so here is my main code

 

package com.MrGreenyboy.TutorialMod;

import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.InterModComms;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.stream.Collectors;

// The value here should match an entry in the META-INF/mods.toml file
@Mod("tutorialmod")
public class TutorialMod
{
    // Directly reference a log4j logger.
    private static final Logger LOGGER = LogManager.getLogger();
    public static final String MOD_ID = "tutorialmod";
    public static TutorialMod instance;

    public TutorialMod() {
        // Register the setup method for mod loading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the doClientStuff method for mod loading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);
        instance = this;
    }

    private void setup(final FMLCommonSetupEvent event)
    {
        
    }

    private void doClientStuff(final FMLClientSetupEvent event) {
        
    }

    // You can use SubscribeEvent and let the Event Bus discover methods to call
    @SubscribeEvent
    public void onServerStarting(FMLServerStartingEvent event) {
        
    }

}

 

Link to comment
Share on other sites

Just now, MrGreenyboy said:

I still had minecraft crash with the same error so here is my main code

 

package com.MrGreenyboy.TutorialMod;

import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.InterModComms;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.stream.Collectors;

// The value here should match an entry in the META-INF/mods.toml file
@Mod("tutorialmod")
public class TutorialMod
{
    // Directly reference a log4j logger.
    private static final Logger LOGGER = LogManager.getLogger();
    public static final String MOD_ID = "tutorialmod";
    public static TutorialMod instance;

    public TutorialMod() {
        // Register the setup method for mod loading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the doClientStuff method for mod loading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);
        instance = this;
    }

    private void setup(final FMLCommonSetupEvent event)
    {
        
    }

    private void doClientStuff(final FMLClientSetupEvent event) {
        
    }

    // You can use SubscribeEvent and let the Event Bus discover methods to call
    @SubscribeEvent
    public void onServerStarting(FMLServerStartingEvent event) {
        
    }

}

 

Oh and i did remove "example_mod" from the other code

Link to comment
Share on other sites

2 minutes ago, MrGreenyboy said:

Oh and i did remove "example_mod" from the other code

You mean example_item, right? Please post your full debug.log. Before you ask where it is like everyone else, remember that your OS 's file manager has a search function.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

Link to comment
Share on other sites

34 minutes ago, MrGreenyboy said:

    @ObjectHolder("tutorialmod" + "example_item")
    public static Item example_item;

In the future, please use the code blocks (the `<>` in the editor) when pasting code.

 

You are missing the colon between the modid and item name: "tutorialmod:example_item".

 

18 minutes ago, Novârch said:

Remove your item name, all you need is the modid

That isn't true for annotations on fields; you explicitly need to specify the registry path and, as there is no @ObjectHolder annotation on the class, also the modid/namespace has to be specified. It's all written in the documentation. (see the last example in UnannotatedHolder)

Edited by sciwhiz12
clarifying some words
  • Like 1
Link to comment
Share on other sites

1 minute ago, sciwhiz12 said:

In the future, please use the code blocks (the `<>` in the editor) when pasting code.

 

You are missing the colon between the modid and item name: "tutorialmod:example_item".

 

That isn't true for annotations on fields; you explicitly need to specify the registry name and, as there is no @ObjectHolder annotation on the class, also the modid has to be specified. It's all written in the documentation. (see the last example in UnannotatedHolder)

so I have to put the mod id at the top of the class and then the item id above where i make it?

Link to comment
Share on other sites

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



×
×
  • Create New...

Important Information

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