Open HacoKavanah opened 2 years ago
Ah same happens with display cases etc.
Nope, not intentional. It's an issue with a new modder incorrectly assuming that getStackInHand()
only checks the main hand, then finding out there's another method called getMainHandStack()
.
I am uploading 2.4.1 to CurseForge now.
Side note: you'd make a great QA engineer!
I'm going to re-open this. I was overly hasty and didn't fully test my fix. You still have to take off the shield. Sorry!
After some more tinkering and research, I am not sure there's anything I can do about this. It looks like the shield item fully consumes the use
event, preventing the shelf or display case from responding to it. I thought I could mimic the way an item frame works in this regard, but unfortunately item frames are regular Entity
objects, while the shelf and display case use a BlockEntity
. The latter, unfortunately, doesn't seem to have a way to capture the event in the same manner as the former.
I am going to leave this open in case I find another way to do this in the future, but for now I'll probably chalk this up as an unavoidable pain point.
If I have a shield on, I can put any item on there, no problem. However, when I want to take that item out I first have to take off my shield before I can do so, which really becomes a hassle in the long run.