From 9f57a322e805b0dad83d783bc8a07eceb296ee25 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Fri, 30 Sep 2022 15:15:34 +0100 Subject: [PATCH] Added ItemStack#toSNBT extension function --- eco-api/src/main/kotlin/com/willfp/eco/core/items/Items.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/core/items/Items.kt b/eco-api/src/main/kotlin/com/willfp/eco/core/items/Items.kt index 0bb6d53c..76cd2152 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/core/items/Items.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/core/items/Items.kt @@ -31,3 +31,7 @@ var ItemStack.baseNBT: PersistentDataContainer /** @see Items.setBaseNBT */ fun ItemStack.clearNBT() = Items.setBaseNBT(this, null) + +/** @see Items.toSNBT */ +fun ItemStack.toSNBT() = + Items.toSNBT(this)