mirror of
				https://github.com/mt-mods/plantlife_modpack.git
				synced 2025-11-03 23:25:26 +01:00 
			
		
		
		
	If farming:seed_spelt exists, drop that instead of wheat
(for Realtest compatibility)
This commit is contained in:
		@@ -1,2 +1,2 @@
 | 
				
			|||||||
plants_lib
 | 
					plants_lib
 | 
				
			||||||
 | 
					farming?
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -225,6 +225,11 @@ local box = {
 | 
				
			|||||||
	fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
 | 
						fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					local sunflower_drop = "farming:seed_wheat"
 | 
				
			||||||
 | 
					if minetest.registered_items["farming:seed_spelt"] then 
 | 
				
			||||||
 | 
						sunflower_drop = "farming:seed_spelt"
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_node(":flowers:sunflower", {
 | 
					minetest.register_node(":flowers:sunflower", {
 | 
				
			||||||
	description = "Sunflower",
 | 
						description = "Sunflower",
 | 
				
			||||||
	drawtype = "mesh",
 | 
						drawtype = "mesh",
 | 
				
			||||||
@@ -240,15 +245,14 @@ minetest.register_node(":flowers:sunflower", {
 | 
				
			|||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
	selection_box = box,
 | 
						selection_box = box,
 | 
				
			||||||
	collision_box = box,
 | 
						collision_box = box,
 | 
				
			||||||
})
 | 
						drop = {
 | 
				
			||||||
 | 
							max_items = 1,
 | 
				
			||||||
minetest.override_item("flowers:sunflower", {drop = {
 | 
							items = {
 | 
				
			||||||
	max_items = 1,
 | 
								{items = {sunflower_drop}, rarity = 8},
 | 
				
			||||||
	items = {
 | 
								{items = {"flowers:sunflower"}},
 | 
				
			||||||
		{items = {"farming:seed_wheat"}, rarity = 8},
 | 
							}
 | 
				
			||||||
		{items = {"flowers:sunflower"}},
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local extra_aliases = {
 | 
					local extra_aliases = {
 | 
				
			||||||
	"waterlily",
 | 
						"waterlily",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user