From ea8adbf62d16a3d62eba1f548962bc92aecebf10 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 23 Feb 2022 15:23:13 +0700 Subject: [PATCH] Clarify energy capability of sword --- .../kotlin/ru/dbotthepony/mc/otm/item/EnergySwordItem.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/EnergySwordItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/EnergySwordItem.kt index da9e85d98..9fb4c0b5c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/EnergySwordItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/EnergySwordItem.kt @@ -103,6 +103,14 @@ class EnergySwordItem : Item(Properties().stacksTo(1).rarity(Rarity.RARE).tab(Ov get() = itemStack.tag?.get("energy")?.let { ImpreciseFraction.deserializeNBT(it) } ?: ImpreciseFraction.ZERO override val maxBatteryLevel: ImpreciseFraction get() = MAX_ENERGY + + override fun canExtract(): Boolean { + return false + } + + override fun canReceive(): Boolean { + return true + } } val chargedAttributes: Multimap