Skip to content

Commit

Permalink
Attempted to fix flip
Browse files Browse the repository at this point in the history
  • Loading branch information
SIsilicon committed Dec 11, 2024
1 parent 221d565 commit c3de527
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"watch": "python build.py --watch=stable",
"watch:preview": "python build.py --watch=preview",
"watch:server": "python build.py --watch=server",
"build:client": "python build.py --target=release --clean",
"build:server": "python build.py --target=server --clean",
"build:all": "python build.py --target=release --clean && python build.py --target=server",
"build:beta": "python build.py --target=debug --clean",
"lint": "npx eslint src",
Expand Down
12 changes: 6 additions & 6 deletions src/server/modules/region_buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,15 +515,15 @@ export class RegionBuffer {
const mirror = new Vector(Math.sign(options.flip?.x ?? 1), 1, Math.sign(options.flip?.z ?? 1));
const loadOptions = {
rotation: {
0: StructureRotation.None,
1: StructureRotation.Rotate90,
2: StructureRotation.Rotate180,
3: StructureRotation.Rotate270,
"0": StructureRotation.None,
"1": StructureRotation.Rotate90,
"2": StructureRotation.Rotate180,
"3": StructureRotation.Rotate270,
}[((rotation.y ?? 0) / 90) % 4],
mirror: {
"1 1": StructureMirrorAxis.None,
"-1 1": StructureMirrorAxis.X,
"1 -1": StructureMirrorAxis.Z,
"-1 1": StructureMirrorAxis.Z,
"1 -1": StructureMirrorAxis.X,
"-1 -1": StructureMirrorAxis.XZ,
}[<string>`${mirror.x} ${mirror.z}`],
includeBlocks: options.includeBlocks ?? true,
Expand Down

0 comments on commit c3de527

Please sign in to comment.