breakinblocks / Plonk

A Minecraft mod that lets you place items down anywhere https://www.curseforge.com/minecraft/mc-mods/plonk https://modrinth.com/mod/plonk
MIT License
3 stars 4 forks source link

Conduits, beds, banners and shields render strangely #7

Closed k1r0s closed 3 years ago

k1r0s commented 3 years ago

Shields are not properly displayed (1.12 although It might be on any version)

BlueAgent commented 3 years ago

Oh geez, seems like this is going to be an interesting one to fix.

Plonk uses a heuristic to determine if it should be rendered as a normal item or as a block but it's far from perfect. The way vanilla item frames work is that each item has an associated camera transform for rendering in an item frame. Since it's not feasible to have each item (vanilla and potentially modded) to have a camera transform for plonk, a heuristic is needed to detect what renders "like a block" and then plonk applies a transformation before using the item frame rendering.

After going through the vanilla items list, seems like conduits, beds, banners and shields render strangely. (Although the banner one is kinda neat, maybe there should be a way to manually select the render type for such situations that the heuristic fails or for cosmetic reasons...) 2020-12-07_19 16 54

BlueAgent commented 3 years ago

Fortunately not an issue in 1.7.10 since beds use a sprite and there's no conduits, banners and shields.

BlueAgent commented 3 years ago

Found some time / motivation to look into this interesting problem. 2020-12-15_23 54 22 So banners stick out a bit and so do dragon heads. Not too sure how to address these without more special casing, but this should be okay for now. I'm thinking of adding the ability to flip between render types for cosmetic purposes as the banners before this fix were kinda neat. For now though I'm gonna consider this fixed for the next release, will close once it's out. Let me know if you got some ideas.

BlueAgent commented 3 years ago

Fixed with the release of Plonk v9.0.4 (mc 1.16.4). Happy new years! :3