mirror of
				https://github.com/mt-mods/homedecor_modpack.git
				synced 2025-11-04 14:25:32 +01:00 
			
		
		
		
	Fixed bucket overwrite inhibiting its role
- Buckets couldn't be used to take default:water_source nor default:lava_source because the overwrite made in homdecor/exterior.lua replaced that way of working. This patch makes both well and sources work.
This commit is contained in:
		@@ -328,6 +328,7 @@ homedecor.register("well", {
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
if minetest.get_modpath("bucket") then
 | 
			
		||||
	local original_bucket_on_use = minetest.registered_items["bucket:bucket_empty"].on_use
 | 
			
		||||
	minetest.override_item("bucket:bucket_empty", {
 | 
			
		||||
		on_use = function(itemstack, user, pointed_thing)
 | 
			
		||||
			local wielditem = user:get_wielded_item()
 | 
			
		||||
@@ -342,8 +343,10 @@ if minetest.get_modpath("bucket") then
 | 
			
		||||
				else
 | 
			
		||||
					minetest.chat_send_player(user:get_player_name(), "No room in your inventory to add a filled bucket!")
 | 
			
		||||
				end
 | 
			
		||||
			end
 | 
			
		||||
				return wielditem
 | 
			
		||||
			else
 | 
			
		||||
				return original_bucket_on_use(itemstack, user, pointed_thing)
 | 
			
		||||
			end
 | 
			
		||||
		end
 | 
			
		||||
	})
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user