Jump to content

[1.18.1] Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER


Recommended Posts

Posted

Crash log because it was too big: https://pastebin.com/0u0tL3Ym

https://github.com/NindyBun/BurnerGun_1.18.1/blob/016d5680408cdb2da1abd72929f663656a09be70/src/main/java/com/nindybun/burnergun/common/items/burnergunmk1/BurnerGunMK1Handler.java#L46

For some reason, when I try to send a packet to the server while on the dev server, it gives me an error and it's strange becasue it used to work find before and I don't know why what's causing the problem.

Posted
Quote

Apart from the above, why on earth are you sending a packet in isItemValid? I do not see the point of this at all.

Well, I wanted the itemstack to consume the item immediately when I put it in the slot so that it refuels the itemstack. It just makes it more convenient as I wouldn't have to close the itemstack gui just to refuel, I could just make it do that while im in the gui.

Quote

These fields must not be static. Your decode method in the same class is completely and utterly broken, as it reaches across logical sides and makes it so ItemStack references are shared between server and client thread. This will cause all kinds of impossible-to-debug havoc and simply not work at all on an actual server.

So how would I get the buffer to distinguish between more than one itemstack?

Posted

In anycase, I moved the packet into the itemstack container screen and it works on the server and client side. The only problem I keep having is that the itemstack handler won't set an itemstack into a slot.

I tried simply inserting the itemstack but it wont work herehere or here on either the server or client. I'm trying to insert a bucket in slot 0 after it consumes a lava bucket.

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.