diff --git a/src/main/kotlin/net/mcbrawls/blueprint/editor/block/RegionBlock.kt b/src/main/kotlin/net/mcbrawls/blueprint/editor/block/RegionBlock.kt index eba0b47..58320b4 100644 --- a/src/main/kotlin/net/mcbrawls/blueprint/editor/block/RegionBlock.kt +++ b/src/main/kotlin/net/mcbrawls/blueprint/editor/block/RegionBlock.kt @@ -12,11 +12,12 @@ interface RegionBlock { fun trySaveRegion( world: ServerWorld, pos: BlockPos, + relativePos: BlockPos, state: BlockState, regions: MutableMap ): Boolean { if (state.block is PointRegionBlock) { - regions["${regions.size}"] = PointRegion(Vec3d.ofCenter(pos)) + regions["${regions.size}"] = PointRegion(Vec3d.ofCenter(relativePos)) return true } diff --git a/src/main/kotlin/net/mcbrawls/blueprint/structure/Blueprint.kt b/src/main/kotlin/net/mcbrawls/blueprint/structure/Blueprint.kt index 6ae2617..a40e53e 100644 --- a/src/main/kotlin/net/mcbrawls/blueprint/structure/Blueprint.kt +++ b/src/main/kotlin/net/mcbrawls/blueprint/structure/Blueprint.kt @@ -187,7 +187,7 @@ data class Blueprint( // state val state = world.getBlockState(pos) - if (!RegionBlock.trySaveRegion(world, pos, state, regions)) { + if (!RegionBlock.trySaveRegion(world, pos, relativePos, state, regions)) { if (!state.isAir) { // build palette if (state !in palette) {