ldtteam / Structurize

Minecraft Structures
GNU General Public License v3.0
47 stars 45 forks source link

New placeholder: Replacement placeholder #589

Open Thodor12 opened 1 year ago

Thodor12 commented 1 year ago

Is there an existing feature request for this?

Are you using the latest Structurize Version?

Did you check on the Wiki? or ask on Discord?

Minecraft Version

1.20

Structurize Version

1.0.584-BETA

Related Mods and their Versions

  1. Forge 47.0.50

Is your feature request related to a problem?

Certain blocks over time change state, which causes issues because the schematic thinks those blocks change (for example copper oxidation). Another one is plants growing over time, which you would rather that the builder does not destroy.

Feature description

The replacement placeholder basically replaces anything with a "default block", assuming the block already there is not present in the allowed list of blocks.

There is 1 setting which would be the "default block", this would be the block that is placed. The other setting is a list of "allowed blocks", if any of these blocks exist at the location of the placeholder they would be kept there, if something else is there it would be replaced with the "default block".

This way things like copper blocks can keep all their oxidation states and they would never be replaced by plain copper over and over. Whilst still not allowing other blocks to be there.

Anything else?

https://discord.com/channels/472875599422291968/1128752652898017280 relevant discussion

Footer


Viewers

someaddons commented 1 year ago

is there a reason why we can't as usual put a light place on the later level after its placed? E.g. all plant stuff we put air on level 1, and placeholders on 2+ for this

Nightenom commented 1 year ago

honestly this should be done in mcol using placement handlers, structurize should aim at wysiwyg placement, while mcol aims at upgrades which are more human-like placement i do agree on light ones for plants, the copper one would probably be a handler

Thodor12 commented 1 year ago

is there a reason why we can't as usual put a light place on the later level after its placed? E.g. all plant stuff we put air on level 1, and placeholders on 2+ for this

For one, it can prevent theft because you wouldn't be able to repair the building. And repair in general would actually function, light placeholders cannot be repaired as they will retain the original block (which is then air).

i do agree on light ones for plants, the copper one would probably be a handler

The issue with a handler (or like discussed on Discord, dedicated placeholders) is that whenever something new is added, we have to write special compat for it again and again. The idea was to just have something that can work in any scenario and would save us from having to make all kinds of special exceptions here and there.

Pancake010 commented 1 year ago

This could also be really usefull for making foundation for custom-style buildings. the builder will only place the foundation if there are no blocks below the building. so placing on a slope would look natural