CammiePone / Cammies-Combat-Tweaks

An overhaul to Minecraft's combat for both PvP and PvE
https://www.curseforge.com/minecraft/mc-mods/cammies-combat-tweaks
Other
6 stars 0 forks source link

sync_attribute_overrides prevents player joining server with exact configs and modlist #25

Open jklw10 opened 2 years ago

jklw10 commented 2 years ago

[Netty Client IO #2/ERROR]: Encountered exception while handling in channel with name "combattweaks:sync_attribute_overrides" java.lang.ArrayIndexOutOfBoundsException: Index 63 out of bounds for length 3

CammiePone commented 2 years ago

\<We are going to need more information than this.>

LunarNox commented 2 years ago

message.txt Here.

jklw10 commented 2 years ago

ah minecraft 1.18.2, unsure if it was collision but, i do have mods that touch attributes such as attribute fix and hp fix. OH it could've been a problem with client having an outdated fabric loader. i'll retest this later today in 10 or 20 h

CammiePone commented 2 years ago

maybe, we experienced this as well on a server Lilybun set up earlier as well tho, with a new instance. it seems to just be a bug, and I'll have to suffer in figuring out why its happening

jklw10 commented 2 years ago

https://github.com/CammiePone/Cammies-Combat-Tweaks/blob/4dffa55c36eb8cbc837298e718e2dc6224e43abe/src/main/java/dev/cammiescorner/combattweaks/common/packets/s2c/SyncAttributeOverridesPacket.java#L82

https://github.com/CammiePone/Cammies-Combat-Tweaks/blob/4dffa55c36eb8cbc837298e718e2dc6224e43abe/src/main/java/dev/cammiescorner/combattweaks/common/packets/s2c/SyncAttributeOverridesPacket.java#L103

seems like the latter doesn't have fix mojank?

since it's an array out of bounds, and the only array access I see is the registry entry checks, it could be that these buffer int reads return the wrong value?

https://github.com/CammiePone/Cammies-Combat-Tweaks/blob/4dffa55c36eb8cbc837298e718e2dc6224e43abe/src/main/java/dev/cammiescorner/combattweaks/common/packets/s2c/SyncAttributeOverridesPacket.java#L72

I could take a look at some point if I can find anything odd with the project open in an IDE, but for now I hope this helps?

CammiePone commented 2 years ago

no, that's not the line that's the issue. It's related to the different arrays, and I know what the problem is, just not certain how to fix it at this moment in time. all that line does is ensure formatting of the attributes is correct in the tooltip

also, damn you github for not telling me there was a comment added here

GamingInfinite commented 2 years ago

Not sure if the nature of the bug has really been discussed outside of it being a index oob, so I'm gonna throw in my 2 cents: the game DOESN'T seem to have an issue when in Singleplayer, and on a dedicated server, it only shows this error (at least, in my experience) on second join after the server boots. So I join the server, does fine, leave join again, then it kicks me out. However I feel like whatever function is causing it should be running in both instances so I dunno.

CammiePone commented 2 years ago

the nature of the error is known, it's just trying to work out how to fix it that's problematic

RedWideWeb commented 2 years ago

the nature of the error is known, it's just trying to work out how to fix it that's problematic

So still not fixed?

CammiePone commented 2 years ago

nope, that's why it's still open

nephatrine commented 2 years ago

Is there any workaround for this at the moment aside from completely removing the mod so affected players can join?

CammiePone commented 2 years ago

unfortunately no. i've been busy looking for a job so havent been focusing on my mods at all. sorry

nephatrine commented 2 years ago

unfortunately no. i've been busy looking for a job so havent been focusing on my mods at all. sorry

Sorry to hear that. No apologies needed, that's a much better priority than mods. Good luck with the search!