mojira.dev
MC-252934

Placing structures with item frames logs "Hanging entity at invalid position: BlockPosition"

Placing structures that were serialized before 1.19 by structure blocks will log the following in case the structure tries to paste item frames.

[20:17:53] [Server thread/ERROR]: Hanging entity at invalid position: gt{x=-75, y=15, z=-55}
[20:17:53] [Server thread/ERROR]: Hanging entity at invalid position: gt{x=-75, y=15, z=-56}

As far as I've tested it doesn't affect said item frames since they seem to work as they priorly did. It seems to just be a console log.

Code analysis

Code analysis by @unknown can be found in this comment.

Comments 12

I have the same issue , it has existed only since vers. 1.19 , with vers. 1.18.2 and before there was no problem....

I can confirm the issue. Also tested on the client-side and when reviewing the logs, the same issue exists. This is both a server and a Mojang MC issue and should be fixed asap as it is hurting the community as a whole. 😞

"hurting the community" is quite an exaggeration, as this is literally just a log entry; nothing actually breaks.

Lol hurting the community..?

Well, when the console of a server is spammed with these error notices it does affect the community(or at least that server's community when the owner/admins are spending their time checking on errors that shouldn't exist). Additionally, it affects the community when the devs who worked hard on a datapack are getting grief over a Mojang issue that they can not fix. Course I am sure you both thought that far ahead when responding. So it's all good, I am glad that you both take issues to heart and even take the time to troll the Mojang bug feeds, it gives me hope that ... oh who am I kidding, troll away, we need trolls they make life less boring. 

2 more comments

The logspam is still present in 1.19.3.  The logger line is in the HangingEntity$readAdditionalSaveData method. It appears it is trying to check if the TileX, TileY, TileZ  position saved in the item frame's nbt is closer than 16 blocks to the new position the item frame is placed at. Issue is when generating structures, this saved nbt position will not match/be close to the new position which trigger the logger to spam about invalid position when the position is indeed valid. I think just removing this logger line would be good enough or at least bump it from Error level down to Debug level so users do not see this spam in the regular log files.

confirmed in 24w10a

Luis Benavides

(Unassigned)

Community Consensus

Platform

Low

Block states

1.19, 1.19.1, 1.19.2, 1.19.3, 1.20.2

Retrieved