klikli-dev / modonomicon

Data-driven minecraft in-game documentation with progress visualization.
24 stars 10 forks source link

Some thin blocks don't render in multiblock preview #260

Closed Eqis-Edu closed 2 weeks ago

Eqis-Edu commented 2 weeks ago

Describe the bug Iron bars, glass pane and chain is not rendered in world preview, only appear inside the book.

Note: colored glass panes are shown.

To Reproduce Steps to reproduce the behavior:

  1. Have multiblock in modonomicon with one of these blocks (used occultism last pentacle)
  2. Click Eye Button
  3. Place in world
  4. See error

Expected behavior Render these blocks in placed preview

Screenshots 2024-10-29_09 25 19

System (please complete the following information):

klikli-dev commented 2 weeks ago

Thanks for reporting! I wonder why these are not rendering, as currently the rendering uses the vanilla block renderer for both places. I need to do some testing, maybe it is about the render state setup

klikli-dev commented 2 weeks ago

On second thought, the colored glass panes might be hint that the render type is different and somehow does not render cutout (only "true" transparency)

Yes, the problem is the transparency rendering of the multiblock preview. It adds "enableBlend" and an alpha value to the render types. For cutout that leads to no rendering at all. I will check with smarter people if this can be counteracted

klikli-dev commented 2 weeks ago

Next update will fix this, but e.g. glass panes are not great blocks to use in multiblocks as they are very dependent on blockstate. Their default blockstate basically just renders one 3d pixel at the top and one at the bottom