Skip to content

Commit

Permalink
Merge pull request #83 from MineInAbyss/revert
Browse files Browse the repository at this point in the history
Revert until fix is found
DevScyu authored Aug 20, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 14ae4a4 + 8da0dce commit e51dd1f
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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
@@ -42,7 +41,7 @@ private fun syncBlockLocker(corr: Block) {
*/
object SectionSyncListener : Listener {

@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH)
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
fun BlockBreakEvent.syncBlockBreak() {
BlockSyncEvent(block, SyncType.BREAK).call {
block.location.sync { original, corr ->
@@ -119,15 +118,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

0 comments on commit e51dd1f

Please sign in to comment.