diff --git a/core/src/ru/deadsoftware/cavedroid/game/render/HudRenderer.kt b/core/src/ru/deadsoftware/cavedroid/game/render/HudRenderer.kt
index 7bbb87689d7b6adb77742385a8ae2f2c454355ab..b6319020a2cf2b770e3b7129670753886b2e9bc2 100644 (file)
}
private fun drawHotbarItems(spriteBatch: SpriteBatch, shapeRenderer: ShapeRenderer, hotbarX: Float) {
- mobsController.player.inventory
+ mobsController.player.inventory.asSequence().take(HotbarConfig.hotbarCells)
.forEachIndexed { index, item ->
if (item.item.isNone()) {
return@forEachIndexed
const val verticalMargin = 3f
const val itemSeparatorWidth = 4f
const val itemSlotSpace = 16f
+ const val hotbarCells = 9
}
private data object HotbarSelectorConfig {