From 352f5a55b1e5039e2d8fb826ef3500022ef36348 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 2 Jun 2017 23:03:57 +0200 Subject: [PATCH] Fix creative slider disappearing in empty search --- mods/HUD/mcl_inventory/creative.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index b1c3b3f37..665f1d343 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -206,7 +206,7 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz inv_size = 0 end end - local pagemax = math.floor((inv_size-1) / (9*5) + 1) + local pagemax = math.max(1, math.floor((inv_size-1) / (9*5) + 1)) local slider_height if pagemax == 1 then slider_height = 4.525