Skip to content

Freshly create plot schematic is regenerated (cleared) one block too low #4404

@PierreSchwang

Description

@PierreSchwang

Server Implementation

Paper

Server Version

1.20.4

Describe the bug

When clearing a plot in an area utilizing plot schematics, the schematic will be pasted one block too low.
World-Generation itself works (e.g. //regen works).

The culprit seems to be somewhere here (used by the FAWE Delegate to determine minY for plot schematics):

public int getPlotYStart() {
return SCHEM_Y + plotY;
}

When replacing SCHEM_Y + plotY with getMinBuildHeight() (the same reference point the world generator uses, as visible in HybridGen: https://github.com/IntellectualSites/PlotSquared/blob/main/Core/src/main/java/com/plotsquared/core/generator/HybridGen.java#L76) clear works. My only idea for that being is, that one of these two variables is normalized somewhere - possibly against the road height.
I don't just want to PR my fix, as I'm not sure what the reasoning behind the change was (@dordsor21 ?) and if that does not have any unexpected side effects.

To Reproduce

  1. Create plot schematic as described in wiki (/plot schematic save, move to appropriate schematic folder)
  2. World will be generated accordingly
  3. Claim Plot and run /plot clear
  4. Schematic will be one block too low

Expected behaviour

The schematic should be pasted from the correct y-level

Screenshots / Videos

No response

Error log (if applicable)

No response

Fawe Debugpaste

Fawe Version

Checklist

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions