Skip to content

Conversation

@PierreSchwang
Copy link
Member

Overview

Fixes #3090

### Submitter Checklist
- [x] Make sure you are opening from a topic branch (**/feature/fix/docs/ branch** (right side)) and not your main branch.
- [x] Ensure that the pull request title represents the desired changelog entry.
- [x] New public fields and methods are annotated with `@since TODO`.
- [x] I read and followed the [contribution guidelines](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md).

@PierreSchwang PierreSchwang requested a review from a team as a code owner January 26, 2025 21:43
@github-actions github-actions bot added the Bugfix This PR fixes a bug label Jan 26, 2025
}

// Blocks
LinListTag.Builder<@org.jetbrains.annotations.NotNull LinCompoundTag> blocks = LinListTag.builder(LinTagType.compoundTag());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this top javax while we're here I guess?

Copy link
Member Author

@PierreSchwang PierreSchwang Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be great, but i hate that
image
image

guess i could suppress that simply (edit: or wait, i can simply use a var assignment)

@dordsor21
Copy link
Member

Like I said on Discord, I wonder if it's an idea to add a switch to allow/disallow structure void to be pasted - I can see it being useful to know where they are

@RedstoneFuture
Copy link
Member

By default, Structure Void blocks should be pasted because they are simply part of the structure / schematic, I think.

In vanilla, structure_void is like the //paste command flag “-a” from FAWE, but “-a” affects air and structure_void would remain. So the vanilla behavior is exactly the opposite of the FAWE behavior when using "-a".

Maybe a paste command flag for FAWE would be an idea, which would paste AIR like in Vanilla and leave out structure_void blocks. Anything else would perhaps be unusual.

@Leomelonseeds
Copy link

Just ran into this issue saving Minecraft structure schematics for my plugin, would appreciate this getting merged!

@PierreSchwang PierreSchwang changed the title fix: don't attempt to write structure void blocks in minecraft structure fix: don't write structure void blocks in minecraft structure Dec 25, 2025
… add option to ignore structure void blocks on paste
@PierreSchwang
Copy link
Member Author

Should be fine now ig.
Saving a structure with structure void blocks doesn't save the structure void blocks in the palette or block compound (they are ignored). This seems to be consistent with the actual Structure File format, as I haven't found any builtin structure file which actually contains structure void blocks. I would guess they are simply ignored as a whole, which fits structure void blocks.

When loading Structure File clipboards / schematics the resulting clipboard is filled with structure void blocks, so that every clipboard position actually has a block. Known blocks are overriding the structure void blocks.

Pasting without any arguments pastes the clipboard including the structure void blocks (suitable for knowing where they are of if the structure needs to be changed). Passing the -v switch (e.g. //paste -v) doesn't paste structure void blocks (inverse block type source mask) and keeps the target block unmodified (the one which would've been overridden with the structure void, kinda like -a). That should follow the spec as described in https://minecraft.wiki/w/Structure_Void

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix This PR fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Structure Voids are replaced with a placeholder (in structure schem)

6 participants