aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/mc/ArmorUtil.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-04-01 01:37:55 +0200
committerLinnea Gräf <nea@nea.moe>2025-04-01 01:37:55 +0200
commitbda040c6c2cc77c9c1a06a61b2f13548d28d76ec (patch)
tree3c48dc96cfd74a6a7d167e45eaccca0bec74fb12 /src/main/kotlin/util/mc/ArmorUtil.kt
parent4f4652bb0d50dfd37297a573ad73ef9cd1a8e92d (diff)
downloadFirmament-mc1.21.5.tar.gz
Firmament-mc1.21.5.tar.bz2
Firmament-mc1.21.5.zip
WIP: Port some 1.21.5 thingsmc1.21.5
Diffstat (limited to 'src/main/kotlin/util/mc/ArmorUtil.kt')
-rw-r--r--src/main/kotlin/util/mc/ArmorUtil.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/kotlin/util/mc/ArmorUtil.kt b/src/main/kotlin/util/mc/ArmorUtil.kt
new file mode 100644
index 0000000..fd1867c
--- /dev/null
+++ b/src/main/kotlin/util/mc/ArmorUtil.kt
@@ -0,0 +1,8 @@
+package moe.nea.firmament.util.mc
+
+import net.minecraft.entity.EquipmentSlot
+import net.minecraft.entity.LivingEntity
+
+val LivingEntity.iterableArmorItems
+ get() = EquipmentSlot.entries.asSequence()
+ .map { it to getEquippedStack(it) }