This commit is contained in:
DBotThePony 2022-09-24 10:52:58 +07:00
parent 0000d70063
commit bd5c59bbb5
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -19,6 +19,7 @@ import ru.dbotthepony.mc.otm.capability.MatteryCapability
import ru.dbotthepony.mc.otm.capability.matter.*
import ru.dbotthepony.mc.otm.core.ImpreciseFraction
import ru.dbotthepony.mc.otm.core.formatMatter
import ru.dbotthepony.mc.otm.core.ifPresentK
import javax.annotation.ParametersAreNonnullByDefault
@ParametersAreNonnullByDefault
@ -140,11 +141,11 @@ class MatterCapacitorItem : Item {
if (isCreative) {
p_41423_.add(INFINITE_STORAGE)
} else {
stack.getCapability(MatteryCapability.MATTER).ifPresent { cap: IMatterHandler ->
stack.getCapability(MatteryCapability.MATTER).ifPresentK {
p_41423_.add(
TranslatableComponent(
"otm.item.matter.normal",
cap.storedMatter.formatMatter(),
it.storedMatter.formatMatter(),
capacity.formatMatter()
).withStyle(ChatFormatting.GRAY)
)