maruohon / litematica

A modern client-side schematic mod for Minecraft
GNU Lesser General Public License v3.0
687 stars 190 forks source link

Blocks below carpets get removed by "visible blocks only" #773

Closed MichaelVolk closed 8 months ago

MichaelVolk commented 9 months ago

fixes #772

Crec0 commented 9 months ago

Blocks which require a supporting material should also be covered by this PR since they have similar limitation. Snow Layers, Repeaters, Comparators, Dust, etc.

MichaelVolk commented 9 months ago

That's true for snow layers, repeaters and comparators. Redstone dust is already covered since its bottom side is not a full square. Sadly, I lack the programming experience for implementing repeaters, comparators and snow layers (are there more non full blocks needing a support block?).

Crec0 commented 9 months ago

I am pretty sure there's a helper method somewhere which checks if the material requires supporting blocks in a particular direction. Maybe that can be used here.

maruohon commented 8 months ago

I didn't find any common/generic methods to indicate blocks that need support. So I just added an implementation with hard coded blocks. I also added a new option to the save menu to enable this "support blocks" behavior. It also adds a support block for gravity block columns that have some part of the column exposed.

2023-10-08_22 45 18

The visible blocks implementation still has issues like where it would just leave out stuff like fully concealed redstone stuff like repeaters... But I don't know if it's worth it to worry about stuff like that (for now at least), I feel like this option would mostly be used for large scale aesthetic builds instead of redstone contraptions.

MichaelVolk commented 8 months ago

Thank you for implementing this!