1+ local item_steel_ingot
2+ local item_chest
3+ local item_mese_crystal
4+
5+
6+ if core .get_modpath (" default" ) then
7+ item_steel_ingot = " default:steel_ingot"
8+ item_chest = " default:chest"
9+ item_mese_crystal = " default:mese_crystal"
10+ end
11+
12+ -- VoxeLibre, Mineclonia
13+ if core .get_modpath (" mcl_core" ) then
14+ item_steel_ingot = " mcl_core:iron_ingot"
15+ item_chest = " mcl_chests:chest"
16+ item_mese_crystal = " mcl_ocean:prismarine_crystals"
17+ end
18+
19+ if not item_mese_crystal then
20+ core .log (" warning" , " [hopper] Unsupported game! There will be no craftable nodes." )
21+ return
22+ end
123
224if minetest .get_modpath (" default" ) then
325 minetest .register_craft ({
426 output = " hopper:hopper" ,
527 recipe = {
6- {" default:steel_ingot " , " default:chest " , " default:steel_ingot " },
7- {" " ," default:steel_ingot " , " " },
28+ {item_steel_ingot , item_chest , item_steel_ingot },
29+ {" " , item_steel_ingot , " " },
830 }
931 })
1032
1133 minetest .register_craft ({
1234 output = " hopper:chute" ,
1335 recipe = {
14- {" default:steel_ingot " , " default:chest " , " default:steel_ingot " },
36+ {item_steel_ingot , item_chest , item_steel_ingot },
1537 }
1638 })
1739
1840 minetest .register_craft ({
1941 output = " hopper:sorter" ,
2042 recipe = {
21- {" " ," default:mese_crystal" ," " },
22- {" default:steel_ingot" ," default:chest" ," default:steel_ingot" },
23- {" " ," default:steel_ingot" ," " },
43+ {" " , item_mese_crystal , " " },
44+ {item_steel_ingot , item_chest , item_steel_ingot },
45+ {" " , item_steel_ingot ," " },
46+ }
47+ })
48+
49+ end
50+
51+ if not hopper .config .single_craftable_item then
52+ minetest .register_craft ({
53+ output = " hopper:hopper_side" ,
54+ recipe = {
55+ {item_steel_ingot , item_chest , item_steel_ingot },
56+ {" " , " " , item_steel_ingot },
2457 }
2558 })
2659
27- if not hopper .config .single_craftable_item then
28- minetest .register_craft ({
29- output = " hopper:hopper_side" ,
30- recipe = {
31- {" default:steel_ingot" ," default:chest" ," default:steel_ingot" },
32- {" " ," " ," default:steel_ingot" },
33- }
34- })
35-
36- minetest .register_craft ({
37- output = " hopper:hopper_side" ,
38- type = " shapeless" ,
39- recipe = {" hopper:hopper" },
40- })
41-
42- minetest .register_craft ({
43- output = " hopper:hopper" ,
44- type = " shapeless" ,
45- recipe = {" hopper:hopper_side" },
46- })
47- end
48- end
60+ minetest .register_craft ({
61+ output = " hopper:hopper_side" ,
62+ type = " shapeless" ,
63+ recipe = {" hopper:hopper" },
64+ })
65+
66+ minetest .register_craft ({
67+ output = " hopper:hopper" ,
68+ type = " shapeless" ,
69+ recipe = {" hopper:hopper_side" },
70+ })
71+ end
0 commit comments