chimericdream / minekea

Minecraft mod to add a variety of vanilla-esque decorative and functional blocks.
https://www.curseforge.com/minecraft/mc-mods/minekea-fabric
MIT License
4 stars 2 forks source link

Floating Shelves Inconvenient - Is this intentional? #26

Open HacoKavanah opened 2 years ago

HacoKavanah commented 2 years ago

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.

HacoKavanah commented 2 years ago

Ah same happens with display cases etc.

chimericdream commented 2 years ago

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!

chimericdream commented 2 years ago

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!

chimericdream commented 2 years ago

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.