@@ -42,7 +42,7 @@ creative_inventory.init_creative_inventory = function(player)
42
42
})
43
43
44
44
creative_inventory .update (player_name , nil , 2 )
45
- -- print("creative inventory size: "..dump(creative_inventory.creative_inventory_size ))
45
+ -- print("creative inventory size: "..dump(creative_inventory[player_name].size ))
46
46
end
47
47
48
48
local function tab_category (tab_id )
@@ -128,19 +128,19 @@ end
128
128
129
129
creative_inventory .set_crafting_formspec = function (player )
130
130
player :set_inventory_formspec ([[
131
- size[8,7.5 ]
132
- list[current_player;craft;2,0.25 ;3,3;]
133
- list[current_player;craftpreview;6,1.25 ;1,1;]
134
- list[current_player;main;0,3.6 ;8,1;]
135
- list[current_player;main;0,4.75 ;8,3;8]
136
- list[detached:creative_trash;main;0,2.25 ;1,1;]
137
- image[0.06,2.35 ;0.8,0.8;trash_icon.png]
138
- image[5,1.25 ;1,1;gui_furnace_arrow_bg.png^[transformR270]
131
+ size[8,8.6 ]
132
+ list[current_player;craft;2,0.75 ;3,3;]
133
+ list[current_player;craftpreview;6,1.75 ;1,1;]
134
+ list[current_player;main;0,4.7 ;8,1;]
135
+ list[current_player;main;0,5.85 ;8,3;8]
136
+ list[detached:creative_trash;main;0,2.75 ;1,1;]
137
+ image[0.06,2.85 ;0.8,0.8;trash_icon.png]
138
+ image[5,1.75 ;1,1;gui_furnace_arrow_bg.png^[transformR270]
139
139
tabheader[0,0;tabs;Crafting,All,Nodes,Tools,Items;1;true;false]
140
140
listring[current_player;main]
141
141
listring[current_player;craft]
142
142
]] ..
143
- default .get_hotbar_bg (0 ,3.6 )..
143
+ default .get_hotbar_bg (0 ,4.7 )..
144
144
default .gui_bg .. default .gui_bg_img .. default .gui_slots
145
145
)
146
146
end
@@ -191,6 +191,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
191
191
start_i = start_i - 3 * 8
192
192
if start_i < 0 then
193
193
start_i = inv_size - (inv_size % (3 * 8 ))
194
+ if inv_size == start_i then
195
+ start_i = math.max (0 , inv_size - (3 * 8 ))
196
+ end
194
197
end
195
198
elseif fields .creative_next then
196
199
start_i = start_i + 3 * 8
0 commit comments