Rotation Crash on TagSubstitutionBlock#814
Rotation Crash on TagSubstitutionBlock#814armele wants to merge 3 commits intoldtteam:version/1.21from
Conversation
| } | ||
|
|
||
| // If the rotated state cannot host a BE, drop any BE tag (prevents renderer/loader issues). | ||
| if (!rotatedState.hasBlockEntity()) |
There was a problem hiding this comment.
Can it happen that we get serializedBE not empty but it has no block entity?
There was a problem hiding this comment.
What I saw when debugging was that for this specific decoration the block entity was reported as "present but blank" - showed up as "{}" when dumping the logs. Not sure how that comes about... but wanted to guard against it.
There was a problem hiding this comment.
Might be interesting to log that then
|
Hi Armele, any hope for this one? I'm worried players of my style may be hitting this still |
|
Added logging per code review feedback. Re-tested. |
Closes #813
Changes proposed in this pull request
Testing
I was able to reproduce the crash and confirm that after the fix it was eliminated.
I did a number of other tests using the TagSubstitutionBlock. I did note that if the TSB is put on a chest that the rotation of the chest was NOT correctly reflected (the position was, but not the facing). I did confirm that contents were persisted as well.
After a number of attempts to explore fixes, I decided to submit this small improvement (no crash) despite the lack of proper chest orientation post-rotation.
Review please