Skip to content

Commit

Permalink
chore: bump blocky
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Dec 1, 2023
1 parent 8893399 commit 0eec3d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle/bfLibs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
gearyPaper = "0.27.0"
blocky = "0.8.15"
blocky = "0.8.17"
protocolburrito = "0.8.0"

[libraries]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.github.shynixn.mccoroutine.bukkit.minecraftDispatcher
import com.github.shynixn.mccoroutine.bukkit.ticks
import com.mineinabyss.blocky.api.BlockyFurnitures
import com.mineinabyss.blocky.components.core.BlockyFurniture
import com.mineinabyss.blocky.helpers.FurniturePacketHelpers.ITEM_DISPLAY_ITEMSTACK_ID
import com.mineinabyss.bonfire.bonfire
import com.mineinabyss.bonfire.components.Bonfire
import com.mineinabyss.bonfire.components.BonfireRespawn
Expand Down Expand Up @@ -71,7 +72,7 @@ fun ItemDisplay.updateBonfireState() {
// Set state via packets to 'set' for all online players currently at the bonfire
val stateItem = gearyItems.createItem(bonfire.states.set) ?: return
val metadataPacket = ClientboundSetEntityDataPacket(entityId,
listOf(SynchedEntityData.DataValue(24, EntityDataSerializers.ITEM_STACK, CraftItemStack.asNMSCopy(stateItem)))
listOf(SynchedEntityData.DataValue(ITEM_DISPLAY_ITEMSTACK_ID, EntityDataSerializers.ITEM_STACK, CraftItemStack.asNMSCopy(stateItem)))
)

com.mineinabyss.bonfire.bonfire.plugin.launch(com.mineinabyss.bonfire.bonfire.plugin.minecraftDispatcher) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.bukkit.entity.ItemDisplay
import org.bukkit.event.EventHandler
import org.bukkit.event.EventPriority
import org.bukkit.event.Listener
import org.bukkit.event.block.BlockBreakEvent
import org.bukkit.inventory.EquipmentSlot
import java.time.LocalDateTime
import java.time.ZoneOffset
Expand All @@ -34,6 +35,11 @@ class BonfireListener : Listener {

private fun currentTime() = LocalDateTime.now().toInstant(ZoneOffset.UTC).epochSecond

@EventHandler
fun BlockBreakEvent.onBreakBlock() {

}

@EventHandler
fun BlockyFurniturePlaceEvent.onBonfirePlace() {
baseEntity.toGearyOrNull()?.with { bonfire: Bonfire ->
Expand Down

0 comments on commit 0eec3d4

Please sign in to comment.