aboutsummaryrefslogtreecommitdiff
path: root/models/advtrains_engine_japan.b3d
diff options
context:
space:
mode:
author1F616EMO <root@1f616emo.xyz>2024-06-13 06:18:44 +0800
committerorwell <orwell@bleipb.de>2024-08-01 22:01:54 +0200
commita820318ecf209b53f6afd430e6ffb35e91631a4a (patch)
tree0796267bd6e34563b5542cb1a0865ea211e501b1 /models/advtrains_engine_japan.b3d
parentae394a43b8a715570ee3b94b19e70b8d66f597e4 (diff)
downloadadvtrains-a820318ecf209b53f6afd430e6ffb35e91631a4a.tar.gz
advtrains-a820318ecf209b53f6afd430e6ffb35e91631a4a.tar.bz2
advtrains-a820318ecf209b53f6afd430e6ffb35e91631a4a.zip
Fix crossing bell positional stereo
Diffstat (limited to 'models/advtrains_engine_japan.b3d')
0 files changed, 0 insertions, 0 deletions
>register_craft({ output = 'bucket:bucket_empty 1', recipe = { {'default:steel_ingot', '', 'default:steel_ingot'}, {'', 'default:steel_ingot', ''}, } }) bucket = {} bucket.liquids = {} -- Register a new liquid -- source = name of the source node -- flowing = name of the flowing node -- itemname = name of the new bucket item (or nil if liquid is not takeable) -- inventory_image = texture of the new bucket item (ignored if itemname == nil) -- This function can be called from any mod (that depends on bucket). function bucket.register_liquid(source, flowing, itemname, inventory_image) bucket.liquids[source] = { source = source, flowing = flowing, itemname = itemname, } bucket.liquids[flowing] = bucket.liquids[source] if itemname ~= nil then minetest.register_craftitem(itemname, { inventory_image = inventory_image, stack_max = 1, liquids_pointable = true, on_use = function(itemstack, user, pointed_thing) -- Must be pointing to node if pointed_thing.type ~= "node" then return end -- Check if pointing to a liquid n = minetest.get_node(pointed_thing.under) if bucket.liquids[n.name] == nil then -- Not a liquid minetest.add_node(pointed_thing.above, {name=source}) elseif n.name ~= source then -- It's a liquid minetest.add_node(pointed_thing.under, {name=source}) end return {name="bucket:bucket_empty"} end }) end end minetest.register_craftitem("bucket:bucket_empty", { inventory_image = "bucket.png", stack_max = 1, liquids_pointable = true,