1
0
Fork 0

Fix dispenser's bucket support in the Nether

This commit is contained in:
Wuzzy 2017-08-29 02:50:46 +02:00
parent 3a18f4044d
commit bd74902789
2 changed files with 15 additions and 3 deletions

View File

@ -2,6 +2,9 @@ mcl_init
mesecons mesecons
mcl_sounds mcl_sounds
mcl_tnt mcl_tnt
mcl_util
mcl_core
mcl_nether
3d_armor_stand 3d_armor_stand
3d_armor 3d_armor
doc? doc?

View File

@ -145,7 +145,7 @@ local dispenserdef = {
if dropnode.name == "mcl_core:water_source" then if dropnode.name == "mcl_core:water_source" then
collect_liquid = true collect_liquid = true
bucket_id = "mcl_buckets:bucket_water" bucket_id = "mcl_buckets:bucket_water"
elseif dropnode.name == "mcl_core:lava_source" then elseif dropnode.name == "mcl_core:lava_source" or dropnode.name == "mcl_nether:nether_lava_source" then
collect_liquid = true collect_liquid = true
bucket_id = "mcl_buckets:bucket_lava" bucket_id = "mcl_buckets:bucket_lava"
end end
@ -173,11 +173,20 @@ local dispenserdef = {
elseif iname == "mcl_buckets:bucket_water" or iname == "mcl_buckets:bucket_lava" then elseif iname == "mcl_buckets:bucket_water" or iname == "mcl_buckets:bucket_lava" then
-- Place water/lava source -- Place water/lava source
if dropnodedef.buildable_to then if dropnodedef.buildable_to then
local _, dim = mcl_util.y_to_layer(droppos.y)
if iname == "mcl_buckets:bucket_water" then if iname == "mcl_buckets:bucket_water" then
if dim == "nether" then
minetest.sound_play("fire_extinguish_flame", {pos = droppos, gain = 0.25, max_hear_distance = 16})
else
minetest.set_node(droppos, {name = "mcl_core:water_source"}) minetest.set_node(droppos, {name = "mcl_core:water_source"})
end
elseif iname == "mcl_buckets:bucket_lava" then elseif iname == "mcl_buckets:bucket_lava" then
if dim == "nether" then
minetest.set_node(droppos, {name = "mcl_nether:nether_lava_source"})
else
minetest.set_node(droppos, {name = "mcl_core:lava_source"}) minetest.set_node(droppos, {name = "mcl_core:lava_source"})
end end
end
stack:take_item() stack:take_item()
inv:set_stack("main", stack_id, stack) inv:set_stack("main", stack_id, stack)