Skip to content

Commit

Permalink
chore: bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Nov 14, 2024
1 parent 91a4dfd commit 8d07e03
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group=com.mineinabyss
version=0.10
idofrontVersion=0.25.17-dev.0
idofrontVersion=0.25.17

4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
gearyPaper = "0.31.0"
guiy="0.12.4"
gearyPaper = "0.31.2"
guiy="0.12.5"

[libraries]
geary-papermc = { module = "com.mineinabyss:geary-papermc", version.ref = "gearyPaper" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,22 @@ import org.bukkit.inventory.meta.SkullMeta

class VanillaNoteBlockListener: Listener {
@EventHandler
fun NotePlayEvent.onNotePlay() = with(block.world.toGeary()) {
isCancelled = true
block.vanillaNoteBlock?.interact(block, null, Action.LEFT_CLICK_BLOCK)
fun NotePlayEvent.onNotePlay() {
with(block.world.toGeary()) {
isCancelled = true
block.vanillaNoteBlock?.interact(block, null, Action.LEFT_CLICK_BLOCK)
}
}

@EventHandler
fun BlockPhysicsEvent.onRedstone() = with(block.world.toGeary()) {
val vanillaNoteBlock = block.takeIf { it.type == Material.NOTE_BLOCK }?.vanillaNoteBlock ?: return

if (!block.isBlockIndirectlyPowered) return vanillaNoteBlock.powered(block, false)
if (!vanillaNoteBlock.powered()) vanillaNoteBlock.interact(block, null, Action.PHYSICAL)
vanillaNoteBlock.powered(block, true)
fun BlockPhysicsEvent.onRedstone() {
with(block.world.toGeary()) {
val vanillaNoteBlock = block.takeIf { it.type == Material.NOTE_BLOCK }?.vanillaNoteBlock ?: return

if (!block.isBlockIndirectlyPowered) return vanillaNoteBlock.powered(block, false)
if (!vanillaNoteBlock.powered()) vanillaNoteBlock.interact(block, null, Action.PHYSICAL)
vanillaNoteBlock.powered(block, true)
}
}

@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
Expand Down

0 comments on commit 8d07e03

Please sign in to comment.