![Furniture Expanded [FORGE/FABRIC]](https://media.forgecdn.net/avatars/thumbnails/459/585/256/256/637735969178537828.png)
Crash log
lostopkk opened this issue ยท 3 comments
Hm... weird. That should not be happening.
Can you test this one? Just unzip and replace your old one.
FEFabric-UNZIP THIS.zip
Greetings! This bug was also reported to me as it occurred in combination with my mod, DynamicCrosshair: Crendgrim/DynamicCrosshairCompat#5
For context, I create a fake item placement context to see if the held item can be placed as a block in the looked at place. Investigating the crash led me to a way to replicate this crash with only your mod (and fabric-api) installed:
Hold an item of type "toilet paper roll" in your hand. Try to place it against the floor or ceiling.
This crash happens because the safeguard here is not complete:
You make sure to only rotate when you are in a horizontal direction; but still erroneously return with Up/Down as the "facing" value if the item is being placed against a floor / ceiling. As far as I can tell, the vanilla way here would be to return "null" if the faced block face is Up or Down.
I didn't even noticed that, thanks for pointing it out. Turns out that the problem was pretty much what you said.
I ended up using context.getPlayerLookDirection
when I was porting to fabric, which returns all possible direction values. Using context.getPlayerFacing
, which just return the horizontal values, fixed the problem.
I will be uploading the fixed version soon.