1
0
Fork 0

Hotfix for brewing stands rotation (#4371)

Reviewed-on: VoxeLibre/VoxeLibre#4371
Reviewed-by: teknomunk <teknomunk@protonmail.com>
Co-authored-by: JoseDouglas26 <josedouglas20002014@gmail.com>
Co-committed-by: JoseDouglas26 <josedouglas20002014@gmail.com>
This commit is contained in:
JoseDouglas26 2024-06-07 06:10:52 +00:00 committed by the-real-herowl
parent 65d6cb1d83
commit 2dafbae64b
1 changed files with 2 additions and 1 deletions

View File

@ -340,6 +340,7 @@ local function on_put(pos, listname, index, stack, player)
local inv = meta:get_inventory() local inv = meta:get_inventory()
local str = "" local str = ""
local stack local stack
local oldparam2 = minetest.get_node(pos).param2
for i=1, inv:get_size("stand") do for i=1, inv:get_size("stand") do
stack = inv:get_stack("stand", i) stack = inv:get_stack("stand", i)
if not stack:is_empty() then if not stack:is_empty() then
@ -347,7 +348,7 @@ local function on_put(pos, listname, index, stack, player)
else str = str.."0" else str = str.."0"
end end
end end
minetest.swap_node(pos, {name = "mcl_brewing:stand_"..str}) minetest.swap_node(pos, {name = "mcl_brewing:stand_"..str, param2 = oldparam2})
minetest.get_node_timer(pos):start(1.0) minetest.get_node_timer(pos):start(1.0)
--some code here to enforce only potions getting placed on stands --some code here to enforce only potions getting placed on stands
end end