From bd74902789385aeed35b7327104d6d8249c3b3c4 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 29 Aug 2017 02:50:46 +0200 Subject: [PATCH] Fix dispenser's bucket support in the Nether --- mods/ITEMS/REDSTONE/mcl_dispensers/depends.txt | 3 +++ mods/ITEMS/REDSTONE/mcl_dispensers/init.lua | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/depends.txt b/mods/ITEMS/REDSTONE/mcl_dispensers/depends.txt index e726d0255..e912ec124 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/depends.txt +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/depends.txt @@ -2,6 +2,9 @@ mcl_init mesecons mcl_sounds mcl_tnt +mcl_util +mcl_core +mcl_nether 3d_armor_stand 3d_armor doc? diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua index ec63cb7e8..263ed80ed 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua @@ -145,7 +145,7 @@ local dispenserdef = { if dropnode.name == "mcl_core:water_source" then collect_liquid = true 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 bucket_id = "mcl_buckets:bucket_lava" end @@ -173,10 +173,19 @@ local dispenserdef = { elseif iname == "mcl_buckets:bucket_water" or iname == "mcl_buckets:bucket_lava" then -- Place water/lava source if dropnodedef.buildable_to then + local _, dim = mcl_util.y_to_layer(droppos.y) if iname == "mcl_buckets:bucket_water" then - minetest.set_node(droppos, {name = "mcl_core:water_source"}) + 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"}) + end elseif iname == "mcl_buckets:bucket_lava" then - minetest.set_node(droppos, {name = "mcl_core:lava_source"}) + if dim == "nether" then + minetest.set_node(droppos, {name = "mcl_nether:nether_lava_source"}) + else + minetest.set_node(droppos, {name = "mcl_core:lava_source"}) + end end stack:take_item()