Jump to content

java.lang.RuntimeException: Attempted to load class net/minecraft/client/multiplayer/ClientLevel for invalid dist DEDICATED_SERV


Recommended Posts

Posted
[00:05:47] [Server thread/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/multiplayer/ClientLevel for invalid dist DEDICATED_SERVER
> [00:05:51] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.ReportedException: Ticking entity
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:872) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:328) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:808) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:668) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/multiplayer/ClientLevel for invalid dist DEDICATED_SERVER
	at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:71) ~[fmlloader-1.18.1-39.0.88.jar:1.0]
	at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88) ~[modlauncher-9.1.0.jar:?]
	at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-9.1.0.jar:?]
	at cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50) ~[modlauncher-9.1.0.jar:?]
	at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:110) ~[securejarhandler-1.0.1.jar:?]
	at cpw.mods.cl.ModuleClassLoader.lambda$findClass$16(ModuleClassLoader.java:213) ~[securejarhandler-1.0.1.jar:?]
	at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:223) ~[securejarhandler-1.0.1.jar:?]
	at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:213) ~[securejarhandler-1.0.1.jar:?]
	at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:130) ~[securejarhandler-1.0.1.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at com.nindybun.burnergun.common.items.upgrades.Auto_Smelt.AutoSmeltProvider.<init>(AutoSmeltProvider.java:17) ~[%2381!/:?]
	at com.nindybun.burnergun.common.items.upgrades.Auto_Smelt.AutoSmelt.initCapabilities(AutoSmelt.java:59) ~[%2381!/:?]
	at net.minecraft.world.item.ItemStack.lambda$forgeInit$10(ItemStack.java:1002) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraftforge.common.capabilities.CapabilityProvider.getCapabilities(CapabilityProvider.java:101) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2376%2382!/:?]
	at net.minecraftforge.common.capabilities.CapabilityProvider.areCapsCompatible(CapabilityProvider.java:113) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2376%2382!/:?]
	at net.minecraft.world.item.ItemStack.matches(ItemStack.java:434) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.world.item.ItemStack.matches(ItemStack.java:422) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.world.inventory.AbstractContainerMenu.triggerSlotListeners(AbstractContainerMenu.java:206) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.world.inventory.AbstractContainerMenu.broadcastChanges(AbstractContainerMenu.java:163) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.server.level.ServerPlayer.tick(ServerPlayer.java:407) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:649) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.world.level.Level.guardEntityTick(Level.java:487) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.server.level.ServerLevel.lambda$tick$3(ServerLevel.java:316) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:54) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:296) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:868) ~[forge-1.18.1-39.0.88_mapped_official_1.18.1-recomp.jar%2377!/:?]
	... 5 more

So I have an itemStack with a gui that I grabbed from the creative menu on the dev server but I get this Ticking Entity and invalid dist DEDICATED_SERVER error which points to the itemStack's provider here. The provider is made the same way as all the other one I have that works.

Posted
1 hour ago, diesieben07 said:
  • This code runs on server and client. You are reaching across logical sides here. If you need the level here, pass it to the class' constructor.

if I'm going to pass the level into the Handler class' constructor, where am I getting the level from? Because the Handler is called by the Provider, which is called by initCapabilities in the main class.

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.