badasintended / wthit

what the hell is that?
https://docs.bai.lol/wthit
Other
121 stars 21 forks source link

Looking at a beehive causes an error #269

Closed TabulateJarl8 closed 2 months ago

TabulateJarl8 commented 2 months ago

Describe the issue

When looking at a beehive sometimes (I've only tested with a full beehive), I get an error in the log

Log output and crash report

https://gist.github.com/TabulateJarl8/cba71d48ce2a8b02c5c0e9a423d6cbd1

Additional context

Minecraft 1.20.4. Log is truncated starting at the error

deirn commented 2 months ago

Can I get the data dump of your faulty beehive? Run /data get block x y z.

I can't reproduce it, however, I do find an oversight (bef4bd973e71cc918a382b5733e38b7f346fb202). Please try it after it finishes building on here under the artifacts section.

TabulateJarl8 commented 2 months ago

I believe that build fixed the issue, as the error no longer shows up; I'm guessing it had something to do with the number of bees inside of it? For reference, here's the blockdata on the old version of the mod with the error:

{z: 12440, x: 2384, Bees: [{TicksInHive: 404, EntityData: {FlowerPos: {Z: 12449, X: 2370, Y: 74}, AbsorptionAmount: 0.0f, Attributes: [{Name: "minecraft:generic.movement_speed", Base: 0.30000001192092896d}], HasNectar: 1b, Invulnerable: 0b, id: "minecraft:bee", Age: 0, PersistenceRequired: 0b, Health: 10.0f, HasStung: 0b, ForcedAge: 0, InLove: 0, AngerTime: 0}, MinOccupationTicks: 2400}, {TicksInHive: 308, EntityData: {FlowerPos: {Z: 12435, X: 2361, Y: 76}, AbsorptionAmount: 0.0f, Attributes: [{Name: "minecraft:generic.movement_speed", Base: 0.30000001192092896d}], HasNectar: 1b, Invulnerable: 0b, id: "minecraft:bee", Age: 0, PersistenceRequired: 0b, Health: 10.0f, HasStung: 0b, ForcedAge: 0, InLove: 0, AngerTime: 0}, MinOccupationTicks: 2400}], FlowerPos: {Y: 76, Z: 12435, X: 2361}, id: "minecraft:beehive", y: 75}
deirn commented 2 months ago

It's the bee name. The server sends a nullable string, but the client didn't check for it, resulting in \0 string which is invalid text format.