diff options
author | Linnea Gräf <nea@nea.moe> | 2024-04-26 10:11:23 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-04-26 10:12:18 +0200 |
commit | 041da7c7d179df01c4048a81ddf40a9f13c3ce77 (patch) | |
tree | 6e6933320c8e96a22bfe433b1e33b184948b8fbd /src/main/kotlin/moe/nea/firmament/util/DurabilityBarEvent.kt | |
parent | c264ca9e8f9f2b0aed457753c43bb4e25edb0ef1 (diff) | |
download | firmament-041da7c7d179df01c4048a81ddf40a9f13c3ce77.tar.gz firmament-041da7c7d179df01c4048a81ddf40a9f13c3ce77.tar.bz2 firmament-041da7c7d179df01c4048a81ddf40a9f13c3ce77.zip |
Add fuel durability bar
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/DurabilityBarEvent.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/util/DurabilityBarEvent.kt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/DurabilityBarEvent.kt b/src/main/kotlin/moe/nea/firmament/util/DurabilityBarEvent.kt new file mode 100644 index 0000000..eacf070 --- /dev/null +++ b/src/main/kotlin/moe/nea/firmament/util/DurabilityBarEvent.kt @@ -0,0 +1,25 @@ +/* + * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe> + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +package moe.nea.firmament.util + +import me.shedaniel.math.Color +import net.minecraft.item.ItemStack +import moe.nea.firmament.events.FirmamentEvent +import moe.nea.firmament.events.FirmamentEventBus + +data class DurabilityBarEvent( + val item: ItemStack, +) : FirmamentEvent() { + data class DurabilityBar( + val color: Color, + val percentage: Float, + ) + + var barOverride: DurabilityBar? = null + + companion object : FirmamentEventBus<DurabilityBarEvent>() +} |