Rewrite Heimdall block handling to support more event types and non-player block changes.

This commit is contained in:
2023-02-07 23:41:22 -05:00
parent 688106a6e6
commit e0823f7b15
19 changed files with 228 additions and 218 deletions

View File

@ -1,6 +0,0 @@
package gay.pizza.foundation.heimdall.table
object BlockBreakTable : PlayerTimedLocalEventTable("block_breaks") {
val block = text("block")
val blockData = text("block_data").nullable()
}

View File

@ -0,0 +1,7 @@
package gay.pizza.foundation.heimdall.table
object BlockChangeTable : PlayerTimedLocalEventTable("block_changes") {
val block = text("block")
val data = text("data")
val cause = text("cause")
}

View File

@ -1,6 +0,0 @@
package gay.pizza.foundation.heimdall.table
object BlockPlaceTable : PlayerTimedLocalEventTable("block_places") {
val block = text("block")
val blockData = text("block_data").nullable()
}

View File

@ -1,7 +1,7 @@
package gay.pizza.foundation.heimdall.table
abstract class PlayerTimedLocalEventTable(name: String) : TimedLocalEventTable(name) {
val player = uuid("player")
val player = uuid("player").nullable()
val pitch = double("pitch")
val yaw = double("yaw")
}

View File

@ -1,9 +0,0 @@
package gay.pizza.foundation.heimdall.view
import gay.pizza.foundation.heimdall.table.PlayerTimedLocalEventTable
object BlockChangeView : PlayerTimedLocalEventTable("block_changes") {
val isBreak = bool("break")
val block = text("block")
val blockData = text("block_data").nullable()
}