diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt index bff921bea..7275e2c66 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt @@ -449,6 +449,16 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, IMatteryEn } } + private fun tickInventory() { + if (hasExoSuit) { + for ((i, stack) in exoSuitContainer.withIndex()) { + if (!stack.isEmpty) { + stack.inventoryTick(ply.level, ply, i + 41, false) + } + } + } + } + fun tickClient() { queuedTicks.clear() @@ -469,6 +479,8 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, IMatteryEn feature.tickClient() } } + + tickInventory() } fun tick() { @@ -604,13 +616,7 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, IMatteryEn exoSuitMenu.broadcastChanges() } - if (hasExoSuit) { - for ((i, stack) in exoSuitContainer.withIndex()) { - if (!stack.isEmpty) { - stack.inventoryTick(ply.level, ply, i + 41, false) - } - } - } + tickInventory() } override fun extractEnergyOuter(howMuch: ImpreciseFraction, simulate: Boolean): ImpreciseFraction {