PaperMC / PaperMC/Paper

Structure#place - add option for strict placement

Open
#12,381 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: accepted
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:

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.