Jump to content

Can not get libraries to work properly! Class not defined error when loading world, however it builds just fine.


X_ZombieSlayer_X

Recommended Posts

Crash Log:

Spoiler

[24May2022 09:16:42.340] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 1.18, --assetsDir, C:\Users\Austin\.gradle\caches\forge_gradle\assets, --gameDir, ., --fml.forgeVersion, 39.0.10, --fml.mcVersion, 1.18.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20211210.034407]
[24May2022 09:16:42.344] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 9.0.24+9.0.24+main.7be9f01d starting: java version 17.0.1 by Oracle Corporation
[24May2022 09:16:42.458] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/Austin/.gradle/caches/modules-2/files-2.1/org.spongepowered/mixin/0.8.5/9d1c0c3a304ae6697ecd477218fa61b850bf57fc/mixin-0.8.5.jar%2327! Service=ModLauncher Env=CLIENT
[24May2022 09:16:44.503] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeclientuserdev' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\Austin\.gradle\caches\forge_gradle\assets, --assetIndex, 1.18]
[09:16:53] [Render thread/WARN]: Assets URL 'union:/C:/Users/Austin/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/1.18.1-39.0.10_mapped_official_1.18.1/forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!/assets/.mcassetsroot' uses unexpected schema
[09:16:53] [Render thread/WARN]: Assets URL 'union:/C:/Users/Austin/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/1.18.1-39.0.10_mapped_official_1.18.1/forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!/data/.mcassetsroot' uses unexpected schema
[24May2022 09:16:54.026] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[09:16:54] [Render thread/INFO]: Setting user: Dev
[09:16:54] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 SNAPSHOT
[09:16:55] [Render thread/ERROR]: Null comment for config option server, this is invalid and may be disallowed in the future.
[09:16:59] [modloading-worker-0/INFO]: Starting To Register: serveressentials
[09:16:59] [modloading-worker-0/INFO]: Forge mod loading, version 39.0.10, for MC 1.18.1 with MCP 20211210.034407
[09:16:59] [modloading-worker-0/INFO]: MinecraftForge v39.0.10 Initialized
[09:17:00] [modloading-worker-0/INFO]: Registered Behaviors
[09:17:00] [modloading-worker-0/INFO]: Finished Registering: serveressentials
[24May2022 09:17:01.560] [Render thread/INFO] [com.mojang.text2speech.NarratorWindows/]: Narrator library for x64 successfully loaded
[09:17:01] [Render thread/INFO]: Reloading ResourceManager: Default, Mod Resources
[24May2022 09:17:01.900] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Starting version check at https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json
[24May2022 09:17:02.255] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Found status: OUTDATED Current: 39.0.10 Target: 39.1.0
[09:17:06] [Render thread/INFO]: OpenAL initialized on device OpenAL Soft on Speakers (2- High Definition Audio Device)
[09:17:06] [Render thread/INFO]: Sound engine started
[09:17:06] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas
[09:17:06] [Render thread/INFO]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
[09:17:06] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[09:17:06] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[09:17:06] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[09:17:06] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[09:17:06] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[09:17:07] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[09:17:07] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[09:17:07] [Render thread/INFO]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[09:17:07] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[24May2022 09:17:12.914] [Render thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: org/web3j/protocol/Web3jService
    Index: 1
    Listeners:
        0: NORMAL
        1: ASM: mod.events.CommandRegistryEvent@50239d42 onRegisterCommandEvent(Lnet/minecraftforge/event/RegisterCommandsEvent;)V
        2: ASM: net.minecraftforge.common.ForgeInternalHandler@7443a0a onCommandsRegister(Lnet/minecraftforge/event/RegisterCommandsEvent;)V
java.lang.NoClassDefFoundError: org/web3j/protocol/Web3jService
    at TRANSFORMER/serveressentials@1.1/mod.events.CommandRegistryEvent.onRegisterCommandEvent(CommandRegistryEvent.java:127)
    at net.minecraftforge.eventbus.ASMEventHandler_0_CommandRegistryEvent_onRegisterCommandEvent_RegisterCommandsEvent.invoke(.dynamic)
    at MC-BOOTSTRAP/eventbus@5.0.7/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
    at MC-BOOTSTRAP/eventbus@5.0.7/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
    at MC-BOOTSTRAP/eventbus@5.0.7/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
    at TRANSFORMER/forge@39.0.10/net.minecraftforge.event.ForgeEventFactory.onCommandRegister(ForgeEventFactory.java:730)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.commands.Commands.<init>(Commands.java:202)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.server.ServerResources.<init>(ServerResources.java:35)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.server.ServerResources.loadResources(ServerResources.java:84)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.Minecraft.makeServerStem(Minecraft.java:2070)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.Minecraft.doLoadLevel(Minecraft.java:1903)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.Minecraft.loadLevel(Minecraft.java:1872)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.loadWorld(WorldSelectionList.java:476)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.joinWorld(WorldSelectionList.java:330)
    at java.base/java.util.Optional.ifPresent(Optional.java:178)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.gui.screens.worldselection.SelectWorldScreen.lambda$init$3(SelectWorldScreen.java:57)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.gui.components.Button.onPress(Button.java:29)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.gui.components.AbstractButton.onClick(AbstractButton.java:17)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.gui.components.AbstractWidget.mouseClicked(AbstractWidget.java:111)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.gui.components.events.ContainerEventHandler.mouseClicked(ContainerEventHandler.java:28)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.MouseHandler.lambda$onPress$0(MouseHandler.java:88)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.gui.screens.Screen.wrapScreenError(Screen.java:527)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.MouseHandler.onPress(MouseHandler.java:85)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.MouseHandler.lambda$setup$4(MouseHandler.java:185)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:90)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.MouseHandler.lambda$setup$5(MouseHandler.java:184)
    at MC-BOOTSTRAP/org.lwjgl.glfw/org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36)
    at MC-BOOTSTRAP/org.lwjgl/org.lwjgl.system.JNI.invokeV(Native Method)
    at MC-BOOTSTRAP/org.lwjgl.glfw/org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3174)
    at TRANSFORMER/minecraft@1.18.1/com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(RenderSystem.java:185)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.Minecraft.runTick(Minecraft.java:1065)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.Minecraft.run(Minecraft.java:660)
    at TRANSFORMER/minecraft@1.18.1/net.minecraft.client.main.Main.main(Main.java:205)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at MC-BOOTSTRAP/fmlloader@1.18.1-39.0.10/net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.24/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.24/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.24/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.24/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.24/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.24/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.24/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
    at cpw.mods.bootstraplauncher@0.1.17/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90)
Caused by: java.lang.ClassNotFoundException: org.web3j.protocol.Web3jService
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    at cpw.mods.securejarhandler@0.9.54/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:132)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    at cpw.mods.securejarhandler@0.9.54/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:132)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    ... 46 more

[09:17:13] [Render thread/FATAL]: Reported exception thrown!
net.minecraft.ReportedException: mouseClicked event handler
    at net.minecraft.client.gui.screens.Screen.wrapScreenError(Screen.java:534) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.MouseHandler.onPress(MouseHandler.java:85) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.MouseHandler.lambda$setup$4(MouseHandler.java:185) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:90) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.MouseHandler.lambda$setup$5(MouseHandler.java:184) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36) ~[lwjgl-glfw-3.2.2.jar%2355!:build 10]
    at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar%2361!:build 10]
    at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3174) ~[lwjgl-glfw-3.2.2.jar%2355!:build 10]
    at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(RenderSystem.java:185) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1065) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:660) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.main.Main.main(Main.java:205) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    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:38) ~[fmlloader-1.18.1-39.0.10.jar%230!:?]
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.24.jar%2310!:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.24.jar%2310!:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.24.jar%2310!:?]
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.24.jar%2310!:?]
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.24.jar%2310!:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.24.jar%2310!:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.24.jar%2310!:?]
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?]
Caused by: java.lang.NoClassDefFoundError: org/web3j/protocol/Web3jService
    at mod.events.CommandRegistryEvent.onRegisterCommandEvent(CommandRegistryEvent.java:127) ~[%2381!:?]
    at net.minecraftforge.eventbus.ASMEventHandler_0_CommandRegistryEvent_onRegisterCommandEvent_RegisterCommandsEvent.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.7.jar%239!:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.7.jar%239!:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.7.jar%239!:?]
    at net.minecraftforge.event.ForgeEventFactory.onCommandRegister(ForgeEventFactory.java:730) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2376%2382!:?]
    at net.minecraft.commands.Commands.<init>(Commands.java:202) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.server.ServerResources.<init>(ServerResources.java:35) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.server.ServerResources.loadResources(ServerResources.java:84) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.Minecraft.makeServerStem(Minecraft.java:2070) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.Minecraft.doLoadLevel(Minecraft.java:1903) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.Minecraft.loadLevel(Minecraft.java:1872) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.loadWorld(WorldSelectionList.java:476) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.joinWorld(WorldSelectionList.java:330) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
    at net.minecraft.client.gui.screens.worldselection.SelectWorldScreen.lambda$init$3(SelectWorldScreen.java:57) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.components.Button.onPress(Button.java:29) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.components.AbstractButton.onClick(AbstractButton.java:17) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.components.AbstractWidget.mouseClicked(AbstractWidget.java:111) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.components.events.ContainerEventHandler.mouseClicked(ContainerEventHandler.java:28) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.MouseHandler.lambda$onPress$0(MouseHandler.java:88) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.screens.Screen.wrapScreenError(Screen.java:527) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    ... 24 more
Caused by: java.lang.ClassNotFoundException: org.web3j.protocol.Web3jService
    at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:132) ~[securejarhandler-0.9.54.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:132) ~[securejarhandler-0.9.54.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    at mod.events.CommandRegistryEvent.onRegisterCommandEvent(CommandRegistryEvent.java:127) ~[%2381!:?]
    at net.minecraftforge.eventbus.ASMEventHandler_0_CommandRegistryEvent_onRegisterCommandEvent_RegisterCommandsEvent.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.7.jar%239!:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.7.jar%239!:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.7.jar%239!:?]
    at net.minecraftforge.event.ForgeEventFactory.onCommandRegister(ForgeEventFactory.java:730) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2376%2382!:?]
    at net.minecraft.commands.Commands.<init>(Commands.java:202) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.server.ServerResources.<init>(ServerResources.java:35) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.server.ServerResources.loadResources(ServerResources.java:84) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.Minecraft.makeServerStem(Minecraft.java:2070) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.Minecraft.doLoadLevel(Minecraft.java:1903) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.Minecraft.loadLevel(Minecraft.java:1872) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.loadWorld(WorldSelectionList.java:476) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.joinWorld(WorldSelectionList.java:330) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
    at net.minecraft.client.gui.screens.worldselection.SelectWorldScreen.lambda$init$3(SelectWorldScreen.java:57) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.components.Button.onPress(Button.java:29) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.components.AbstractButton.onClick(AbstractButton.java:17) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.components.AbstractWidget.mouseClicked(AbstractWidget.java:111) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.components.events.ContainerEventHandler.mouseClicked(ContainerEventHandler.java:28) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.MouseHandler.lambda$onPress$0(MouseHandler.java:88) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    at net.minecraft.client.gui.screens.Screen.wrapScreenError(Screen.java:527) ~[forge-1.18.1-39.0.10_mapped_official_1.18.1-recomp.jar%2377!:?]
    ... 24 more
[09:17:13] [Render thread/FATAL]: Preparing crash report with UUID af78ebd8-46e9-4b08-b96d-c84119b151f4
[09:17:13] [Render thread/FATAL]: Preparing crash report with UUID d8b42ac0-d637-4182-bd77-f20d855eea14

build.gradle :

Spoiler

buildscript {
    repositories {
        // These repositories are only for Gradle plugins, put any other repositories in the repository block further below
        maven { url = 'https://maven.minecraftforge.net' }
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
        
        //implementation files('libs/web3j-cli-1.4.1.jar')
    }
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.0'
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'modid'

// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
    // The mappings can be changed at any time and must be in the following format.
    // Channel:   Version:
    // snapshot   YYYYMMDD   Snapshot are built nightly.
    // stable     #          Stables are built at the discretion of the MCP team.
    // official   MCVersion  Official field/method names from Mojang mapping files
    //
    // You must be aware of the Mojang license when using the 'official' mappings.
    // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
    //
    // Use non-default mappings at your own risk. They may not always work.
    // Simply re-run your setup task after changing the mappings to update your workspace.
    mappings channel: 'official', version: '1.18.1'

    // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.

    // Default run configurations.
    // These can be tweaked, removed, or duplicated as needed.
    runs {
        client {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            // The markers can be added/remove as needed separated by commas.
            // "SCAN": For mods scan.
            // "REGISTRIES": For firing of registry events.
            // "REGISTRYDUMP": For getting the contents of all registries.
            property 'forge.logging.markers', 'REGISTRIES'

            // Recommended logging level for the console
            // You can set various levels here.
            // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
            property 'forge.logging.console.level', 'debug'

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }

        server {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            // The markers can be added/remove as needed separated by commas.
            // "SCAN": For mods scan.
            // "REGISTRIES": For firing of registry events.
            // "REGISTRYDUMP": For getting the contents of all registries.
            property 'forge.logging.markers', 'REGISTRIES'

            // Recommended logging level for the console
            // You can set various levels here.
            // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
            property 'forge.logging.console.level', 'debug'

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }

        data {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            // The markers can be added/remove as needed separated by commas.
            // "SCAN": For mods scan.
            // "REGISTRIES": For firing of registry events.
            // "REGISTRYDUMP": For getting the contents of all registries.
            property 'forge.logging.markers', 'REGISTRIES'

            // Recommended logging level for the console
            // You can set various levels here.
            // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
            property 'forge.logging.console.level', 'debug'

            // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
            args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }
    }
}

// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }

repositories {
    // Put repositories for dependencies here
    // ForgeGradle automatically adds the Forge maven and Maven Central for you

    // If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
    // flatDir {
    //     dir 'libs'
    // }
}

dependencies {
    // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
    // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
    // The userdev artifact is a special name and will get all sorts of transformations applied to it.
    minecraft 'net.minecraftforge:forge:1.18.1-39.0.10'

    // Real mod deobf dependency examples - these get remapped to your current mappings
    // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
    // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
    // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency

    // Examples using mod jars from ./libs
    // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")

    // For more info...
    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
    // http://www.gradle.org/docs/current/userguide/dependency_management.html
    implementation fileTree(dir: 'libs', include: '*.jar')
}

// Example for how to get properties into the manifest for reading at runtime.
jar {
    manifest {
        attributes([
                "Specification-Title"     : "examplemod",
                "Specification-Vendor"    : "examplemodsareus",
                "Specification-Version"   : "1", // We are version 1 of ourselves
                "Implementation-Title"    : project.name,
                "Implementation-Version"  : project.jar.archiveVersion,
                "Implementation-Vendor"   : "examplemodsareus",
                "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
        ])
    }
}

// Example configuration to allow publishing using the maven-publish plugin
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar')
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
// publish.dependsOn('reobfJar')

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact jar
        }
    }
    repositories {
        maven {
            url "file://${project.projectDir}/mcmodsrepo"
        }
    }
}

my class that references the "class not found" :

Spoiler
package mod.commands.web3;

import org.web3j.protocol.Web3j;
import org.web3j.protocol.core.DefaultBlockParameter;
import org.web3j.protocol.core.methods.response.EthBlockNumber;
import org.web3j.protocol.core.methods.response.EthGetBalance;
import org.web3j.protocol.core.methods.response.NetPeerCount;
import org.web3j.protocol.http.HttpService;

import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.exceptions.CommandSyntaxException;

import mod.commands.base.CommandTemplate;
import mod.utils.msgutils.Msg;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;

public class Web3BlockCommand extends CommandTemplate{

	@Override
	public void command() {
		command = Commands.literal("web3_block").executes(
				(commandContext) -> {return web3_block(commandContext);}
				);
	}
	
	public int web3_block(CommandContext<CommandSourceStack> commandContext) throws CommandSyntaxException {
		commandContext.getSource().sendSuccess(Msg.buildMessage("The Block Number is: " + getBlockCount()), false);
		return 1;
	}
	
	public static String getBlockCount() {
		Web3j web3 = Web3j.build(new HttpService());
		try {
			EthBlockNumber result = web3.ethBlockNumber().sendAsync().get();
			return result.getBlockNumber().toString();
		} catch (Exception e) {
			return "NAN";
		}
	}
	
}

 

Link to comment
Share on other sites

1 hour ago, diesieben07 said:

I still get: "Exception message: java.lang.ClassNotFoundException: org.web3j.protocol.Web3jService"

Even after adding "implementation group: 'org.web3j', name: 'core', version: '5.0.0'" to my build.gradle. I don't have a Maven pom.xml to add the dependency to.

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.