From 94f70c39b0928e222c1c56444f21bcd55dcfe0bc Mon Sep 17 00:00:00 2001 From: trivernis Date: Sat, 11 Jul 2020 16:37:26 +0200 Subject: [PATCH] Fix #66, #70 Task progress being discarded on resume --- build.gradle | 2 +- .../chunkmaster/lib/generation/GenerationManager.kt | 6 +++--- .../chunkmaster/lib/generation/GenerationTaskPaper.kt | 1 + .../chunkmaster/lib/generation/GenerationTaskSpigot.kt | 1 + src/main/resources/plugin.yml | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 12f3885..d89f698 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ idea { } group "net.trivernis" -version "1.2.0" +version "1.2.1" sourceCompatibility = 1.8 diff --git a/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationManager.kt b/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationManager.kt index 989fe04..98e5e61 100644 --- a/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationManager.kt +++ b/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationManager.kt @@ -343,9 +343,9 @@ class GenerationManager(private val chunkmaster: Chunkmaster, private val server shapeName: String ): GenerationTask { val shape = when (shapeName) { - "circle" -> Circle(Pair(center.x, center.z), Pair(center.x, center.z), radius) - "square" -> Spiral(Pair(center.x, center.z), Pair(center.x, center.z), radius) - else -> Spiral(Pair(center.x, center.z), Pair(center.x, center.z), radius) + "circle" -> Circle(Pair(center.x, center.z), Pair(start.x, start.z), radius) + "square" -> Spiral(Pair(center.x, center.z), Pair(start.x, start.z), radius) + else -> Spiral(Pair(center.x, center.z), Pair(start.x, start.z), radius) } return if (PaperLib.isPaper()) { diff --git a/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationTaskPaper.kt b/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationTaskPaper.kt index cf3fca0..b1cefc3 100644 --- a/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationTaskPaper.kt +++ b/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationTaskPaper.kt @@ -24,6 +24,7 @@ class GenerationTaskPaper( init { updateGenerationAreaMarker() + count = shape.count } /** diff --git a/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationTaskSpigot.kt b/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationTaskSpigot.kt index 5dfbd10..a812d3f 100644 --- a/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationTaskSpigot.kt +++ b/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/GenerationTaskSpigot.kt @@ -19,6 +19,7 @@ class GenerationTaskSpigot( init { updateGenerationAreaMarker() + count = shape.count } /** diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 9fb30bf..86d8f46 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ main: net.trivernis.chunkmaster.Chunkmaster name: Chunkmaster -version: '1.2.0' +version: '1.2.1' description: Chunk commands plugin. author: Trivernis website: trivernis.net