Posted March 15, 20223 yr 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.
March 16, 20223 yr Author 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?
March 17, 20223 yr Author 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 here, here 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.