Structure#place - add option for strict placement
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem?
Not really. Just new API that would be nice.
I guess if I were to think of a problem, when I place structures, block updates happen when I may not want them to.
A good example is flowing water, waterlogging (weird bug in MC), fences updates, etc.
Describe the solution you'd like.
Minecraft 1.21.5 added a new feature for "strict" placement of structures using the structure block and /place template command.
Strict placement allows for the structure to be placed without block updates, ex: water not flowing.
Looking into how the command/structure block do it, it would be as easy as changing this line:
https://github.com/PaperMC/Paper/blob/9b1798d6438107fdf0d5939b79a8cf71f4d16e2c/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructure.java#L100
changing the flags from 2 to 2 | (strict ? 816 : 0) and adding in a method parameter for strict
For reference the 816 flag is UPDATE_SKIP_ALL_SIDEEFFECTS
Describe alternatives you've considered.
Nothing I can think of!
Other
Visual Example:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructure.java at the linked placement call, then compare how Minecraft 1.21.5 performs strict placement through structure blocks and /place template. Add the strict-placement API option and verify that placement can suppress block updates such as flowing water and waterlogging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, game-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100