From 56ab86aa3f6bd4d35e0ba52e8fe9b234d3fdb546 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Sun, 7 May 2023 16:51:55 +0300 Subject: [PATCH] carbon mesh and plasma repeater stored energy lang --- .../ru/dbotthepony/mc/otm/datagen/lang/English.kt | 1 + .../ru/dbotthepony/mc/otm/datagen/lang/Russian.kt | 1 + .../mc/otm/item/weapon/PlasmaWeaponItem.kt | 11 ++--------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt index ac35140e7..fd1b25172 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt @@ -548,6 +548,7 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.MIRROR, "description", "I can clearly see my own reflection in this mirror") add(MItems.REINFORCED_TRITANIUM_PLATE, "Reinforced Tritanium Plate") add(MItems.REINFORCED_TRITANIUM_PLATE, "description", "An armor plate, reinforced to withstand great kinetic forces") + add(MItems.CARBON_MESH, "Carbon Mesh") add(MItems.GRAVITATIONAL_DISRUPTOR, "Gravitational Disruptor") diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt index dd46dbd90..304a43b57 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt @@ -553,6 +553,7 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.MIRROR, "description", "Я могу очень отчётливо видеть своё отражение в этом зеркале") add(MItems.REINFORCED_TRITANIUM_PLATE, "Укреплённая тритановая пластина") add(MItems.REINFORCED_TRITANIUM_PLATE, "description", "Бронированная пластина, усиленная что бы выдержать большие кинетические силы") + add(MItems.CARBON_MESH, "Углеродная сетка") add(MItems.GRAVITATIONAL_DISRUPTOR, "Антигравитационный маяк") diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaWeaponItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaWeaponItem.kt index e33c8662d..71eccdb0e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaWeaponItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaWeaponItem.kt @@ -18,6 +18,7 @@ import net.minecraftforge.common.util.LazyOptional import ru.dbotthepony.mc.otm.* import ru.dbotthepony.mc.otm.capability.* import ru.dbotthepony.mc.otm.capability.energy.IMatteryEnergyStorage +import ru.dbotthepony.mc.otm.capability.energy.ItemEnergyStorageImpl import ru.dbotthepony.mc.otm.capability.energy.getBarColor import ru.dbotthepony.mc.otm.capability.energy.getBarWidth import ru.dbotthepony.mc.otm.core.* @@ -181,15 +182,7 @@ abstract class PlasmaWeaponItem(tables: KClass, pr ) { super.appendHoverText(itemStack, p_41422_, p_41423_, p_41424_) - itemStack.getCapability(MatteryCapability.ENERGY).ifPresentK { - p_41423_.add( - TranslatableComponent( - "otm.item.power.normal.storage", - it.batteryLevel.formatPower(), - it.maxBatteryLevel.formatPower() - ).withStyle(ChatFormatting.GRAY) - ) - } + ItemEnergyStorageImpl.appendHoverText(itemStack, p_41423_) } fun energyData(itemStack: ItemStack) = itemStack.matteryEnergy as PlasmaWeaponEnergy