From f8bac68d733e501ec1169af3e24f38f7ebbff0ea Mon Sep 17 00:00:00 2001 From: Scyu_ Date: Thu, 19 Aug 2021 01:21:49 +0100 Subject: [PATCH 1/2] Revert until fix is found --- .../synchronization/SectionSyncListener.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt b/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt index 6b583e7..0ad83f1 100644 --- a/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt +++ b/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt @@ -3,7 +3,6 @@ package com.derongan.minecraft.deeperworld.synchronization import com.derongan.minecraft.deeperworld.DeeperContext import com.derongan.minecraft.deeperworld.world.section.correspondingSection import com.derongan.minecraft.deeperworld.world.section.inSectionOverlap -import com.derongan.minecraft.deeperworld.world.section.isOnTopOf import com.derongan.minecraft.deeperworld.world.section.section import com.mineinabyss.idofront.messaging.error import nl.rutgerkok.blocklocker.SearchMode @@ -39,7 +38,7 @@ private fun syncBlockLocker(corr: Block) { */ object SectionSyncListener : Listener { - @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) + @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) fun BlockBreakEvent.syncBlockBreak() { val block = block block.location.sync { original, corr -> @@ -113,15 +112,15 @@ object SectionSyncListener : Listener { val section = block.location.section ?: return val section2 = block.location.correspondingSection ?: return - if( + if ( block.location.inSectionOverlap - && section.isOnTopOf(section2) +// && section.isOnTopOf(section2) && block.blockData !is Levelled // Water / Lava ) isCancelled = true - if(!section.isOnTopOf(section2)) { - block.sync() - } +// if(!section.isOnTopOf(section2)) { +// block.sync() +// } } @EventHandler From 8da0dce7cb43bac4def3ac52cedd915d77ba1f36 Mon Sep 17 00:00:00 2001 From: Scyu_ Date: Fri, 20 Aug 2021 01:31:46 +0100 Subject: [PATCH 2/2] optimize --- .../deeperworld/synchronization/SectionSyncListener.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt b/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt index 0213442..a80f6ed 100644 --- a/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt +++ b/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt @@ -3,11 +3,10 @@ package com.derongan.minecraft.deeperworld.synchronization import com.derongan.minecraft.deeperworld.DeeperContext import com.derongan.minecraft.deeperworld.event.BlockSyncEvent import com.derongan.minecraft.deeperworld.event.SyncType -import com.derongan.minecraft.deeperworld.world.section.inSectionOverlap -import com.mineinabyss.idofront.events.call import com.derongan.minecraft.deeperworld.world.section.correspondingSection -import com.derongan.minecraft.deeperworld.world.section.isOnTopOf +import com.derongan.minecraft.deeperworld.world.section.inSectionOverlap import com.derongan.minecraft.deeperworld.world.section.section +import com.mineinabyss.idofront.events.call import com.mineinabyss.idofront.messaging.error import nl.rutgerkok.blocklocker.SearchMode import org.bukkit.Material