Skip to content

Commit

Permalink
Synchronise complete placement logic
Browse files Browse the repository at this point in the history
andantet committed Jul 2, 2024
1 parent 38c142e commit 1206126
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ yarn_build=7
loader_version=0.15.11

# Mod Properties
mod_version=1.5.2
mod_version=1.5.3
maven_group=net.mcbrawls
mod_id=blueprint

11 changes: 5 additions & 6 deletions src/main/kotlin/net/mcbrawls/blueprint/structure/Blueprint.kt
Original file line number Diff line number Diff line change
@@ -65,17 +65,16 @@ data class Blueprint(
val progress = AtomicReference(0.0f)

val future: CompletableFuture<PlacedBlueprint> = CompletableFuture.supplyAsync {
var i = 0
forEach { offset, state ->
synchronized(world) {
synchronized(world) {
var i = 0
forEach { offset, state ->
world.setBlockState(position.add(offset), state)
i++
}

i++
progress.set(i.toFloat() / totalBlocks)
}

progress.set(i.toFloat() / totalBlocks)

PlacedBlueprint(this, position)
}

0 comments on commit 1206126

Please sign in to comment.