Fix bug in WFixedPanel and use WScrollPanel + WBox for config

This commit is contained in:
nea
2023-05-26 23:23:03 +02:00
parent 484a4b1a61
commit 59ea00dabc
8 changed files with 61 additions and 13 deletions

View File

@@ -28,7 +28,8 @@ data class IsSlotProtectedEvent(
) : FirmamentEvent() {
companion object : FirmamentEventBus<IsSlotProtectedEvent>() {
@JvmStatic
fun shouldBlockInteraction(slot: Slot): Boolean {
fun shouldBlockInteraction(slot: Slot?): Boolean {
if (slot == null) return false
return publish(IsSlotProtectedEvent(slot)).isProtected.also {
if (it) {
MC.player?.sendMessage(Text.translatable("firmament.protectitem").append(slot.stack.name))