Jump to content

Recommended Posts

Posted

I am trying to run a mod that i made on forge 1.16.2 but, its keeps crashing.

Here's the log:

---- Minecraft Crash Report ----
// Hi. I'm Minecraft, and I'm a crashaholic.

Time: 9/3/20 2:14 PM
Description: Initializing game

java.lang.ClassCastException: net.minecraftforge.fml.ModLoadingStage$$Lambda$3102/1950246647 cannot be cast to net.minecraftforge.fml.ModLoadingStage$EventGenerator
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_265] {}
    at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419) ~[?:1.8.0_265] {}
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_265] {}
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_265] {}
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_265] {}
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_265] {}
    at java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:546) ~[?:1.8.0_265] {}
    at net.minecraftforge.fml.ModLoadingStage.buildTransition(ModLoadingStage.java:104) ~[forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
    at net.minecraftforge.fml.ModLoadingStage.buildTransition(ModLoadingStage.java:96) ~[forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
    at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:234) ~[forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:196) ~[forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
    at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$1(ClientModLoader.java:120) ~[forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:140) ~[forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:120) ~[forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:429) ~[forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:149) ~[forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_265] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_265] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_265] {}
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_265] {}
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-6.1.1.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-6.1.1.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-6.1.1.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-6.1.1.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-6.1.1.jar:?] {}
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.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.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:546)
    at net.minecraftforge.fml.ModLoadingStage.buildTransition(ModLoadingStage.java:104)
    at net.minecraftforge.fml.ModLoadingStage.buildTransition(ModLoadingStage.java:96)
    at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:234)
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:196)
    at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$1(ClientModLoader.java:120)
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:140)
    at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:120)
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:429)

-- 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(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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.2
    Minecraft Version ID: 1.16.2
    Operating System: Windows 8.1 (amd64) version 6.3
    Java Version: 1.8.0_265, Amazon.com Inc.
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Amazon.com Inc.
    Memory: 159868376 bytes (152 MB) / 894435328 bytes (853 MB) up to 1888485376 bytes (1801 MB)
    CPUs: 4
    JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
    ModLauncher: 6.1.1+74+master.966c698
    ModLauncher launch target: fmluserdevclient
    ModLauncher naming: mcp
    ModLauncher services:
        /mixin-0.8.jar mixin PLUGINSERVICE
        /eventbus-3.0.3-service.jar eventbus PLUGINSERVICE
        /forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-launcher.jar object_holder_definalize PLUGINSERVICE
        /forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-launcher.jar runtime_enum_extender PLUGINSERVICE
        /accesstransformers-2.2.0-shadowed.jar accesstransformer PLUGINSERVICE
        /forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-launcher.jar capability_inject_definalize PLUGINSERVICE
        /forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-launcher.jar runtimedistcleaner PLUGINSERVICE
        /mixin-0.8.jar mixin TRANSFORMATIONSERVICE
        /forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-launcher.jar fml TRANSFORMATIONSERVICE
    FML: 33.0
    Forge: net.minecraftforge:33.0.35
    FML Language Providers:
        [email protected]
        minecraft@1
    Mod List:
        client-extra.jar Minecraft {[email protected] CREATE_REGISTRIES}
        forge-1.16.2-33.0.35_mapped_snapshot_20200514-1.16-recomp.jar Forge {[email protected] CREATE_REGISTRIES}
        main Loot's first mod! {[email protected] CREATE_REGISTRIES}
    Launched Version: MOD_DEV
    Backend library: LWJGL version 3.2.2 build 10
    Backend API: Intel(R) HD Graphics 5500 GL version 4.4.0 - Build 20.19.15.5063, Intel
    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 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz

Posted

Show your code.

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)

I still did not add anything to this mod but here it is. i'll also add the toml file if it will be any help.

 

the main code:

package com.loot0101.tutorial;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;


@Mod("tutorial")
public class TutorialMod {
    private static final Logger LOGGER = LogManager.getLogger();

    public TutorialMod() {
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

        MinecraftForge.EVENT_BUS.register(this);
    }

    private void setup(final FMLCommonSetupEvent event) { }

    private void doClientStuff(final FMLClientSetupEvent event) { }


}

 

the toml code:

modLoader="javafml"
loaderVersion="[33,)"
license="All rights reserved"
issueTrackerURL="http://my.issue.tracker/"
[[mods]]
modId="tutorial"
version="1.16.2-1.0.0"
displayName="Loot's first mod!"
updateJSONURL="http://myurl.me/"
displayURL="http://example.com/" #optional
logoFile="examplemod.png"
credits="Thanks for this example mod goes to Java"
authors="Loot0101"
description='''
This is loot0101's first mod!
            '''
[[dependencies.examplemod]]
    modId="forge"
    mandatory=true
    versionRange="[33,)"
    ordering="NONE"
    side="BOTH"
[[dependencies.examplemod]]
    modId="minecraft"
    mandatory=true
    versionRange="[1.16.2]"
    ordering="NONE"
    side="BOTH"

Thanks for trying to help me btw!

Edited by loot0101
Posted

This:

3 minutes ago, loot0101 said:

FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);

FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

And this:

3 minutes ago, loot0101 said:

MinecraftForge.EVENT_BUS.register(this);

Do essentially the same thing.

Except that the former adds the methods to the Mod Event Bus and the latter to the Forge Event Bus and the two event methods you have aren't annotated with @SubscribeEvent, so the latter actually doesn't do anything at all.

 

4 minutes ago, loot0101 said:

@Mod("tutorial")

4 minutes ago, loot0101 said:

modId="tutorial"

Your mod ID is tutorial.

4 minutes ago, loot0101 said:

[[dependencies.examplemod]]

So why are you setting up dependencies for examplemod?

 

 

  • Thanks 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.