Item frame reverse rotation functionality may leave the item frame in an invalid state
progheal opened this issue · 3 comments
Describe the bug (Required)
It is possible to let the item frame have a negative ItemRotataion
value using the reverse rotation functionality.
This will have some (Vanilla and modded) impact:
- On Vanilla, comparator reading negative rotation item frame will have zero output, which should be impossible since it should always at least one;
- On modded, a known failure case is Botania's Corporea Funnel, which reads the ItemRotation tag value and index into an internal array; if the item frame has negative rotation, the game will crash when the Funnel is requesting item and using the negative value to index the array.
To Reproduce (Required unless not known)
Steps to reproduce the behavior:
- Put an item frame on a side of a block.
- Put a comparator at the back of that block directing outward, with one redstone wire along its output.
- Put an item into the item frame.
- Shift right click the item frame to rotate backward once.
→ ❌ The output of the comparator is zero. - Use
/entitydata
(1.12) or/data
(1.15) to inspect the NBT data of the item frame:
In 1.15, run/data get entity @e[type=item_frame,limit=1]
when standing near the item frame.
→ ❌ The NBT tagItemRotation
has a negative value.
Expected behavior (Required)
In the situation described above, the output of the comparator should be 8, while the ItemRotation
tag should be 7b
.
Screenshots
Also includes the result of /data
command mentioned above; it can be seen that the ItemRotation
tag has a negative value -1b
.
Note the redstone wire I'm looking at has power 0, where in this roatation it should be 8.
Versions:(check log if you don't know)
The aforementioned situation is repro'ed in the following version:
- Forge Version: 31.2.0
- MC Version: 1.15.2
- Mod Version: 1.5.26
- JEI Version (if present) : None
- Baubles Version (if present) : None
- Curios Version (if present) : None
Also, this problem is discovered in an MC 1.12.2 modpack called Journey Across The Void; one of the player in a private server I played in triggered the aforementioned Botania Corporea Funnel situation. The version info of the modpack when this happened is:
- Forge Version: 14.23.5.2854
- MC Version: 1.12.2
- Journey Across The Void modpack version: 13.7
- Vanilla Tweaks Mod Version: 1.5.6
- Botania Version: r1.10-363
- JEI Version: 4.15.0.293
- Baubles Version: 1.5.2
- Curios Version: None
This Botania Corporea Funnel situation can also be reproduced using 1.15 version of Botania. The version info in this situation is:
- Forge Version: 31.2.0
- MC Version: 1.15.2
- Vanilla Tweaks Mod Version: 1.5.26
- Botania Version: r1.15-384
- Curios Version: 2.0.2.4
Additional context
A few more things that's probably related:
- Shift right click an item into an empty item frame will, in addition to put the item into item frame, rotate it backward two times.
- Shift right click an empty item frame with an empty frame will make the next item (normally) put into the item frame rotated upside-down.