grass.lua 998 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. for i = 4, 5 do
  2. -- Override default grass and have it drop Wheat Seeds
  3. minetest.override_item("default:grass_" .. i, {
  4. drop = {
  5. max_items = 1,
  6. items = {
  7. {items = {'farming:seed_wheat'}, rarity = 5},
  8. {items = {'farming:seed_oat'},rarity = 5},
  9. {items = {'default:grass_1'}},
  10. }
  11. },
  12. })
  13. -- Override default dry grass and have it drop Barley Seeds
  14. if minetest.registered_nodes["default:dry_grass_1"] then
  15. minetest.override_item("default:dry_grass_" .. i, {
  16. drop = {
  17. max_items = 1,
  18. items = {
  19. {items = {'farming:seed_barley'}, rarity = 5},
  20. {items = {'farming:seed_rye'},rarity = 5},
  21. {items = {'default:dry_grass_1'}},
  22. }
  23. },
  24. })
  25. end
  26. end
  27. -- Override default Jungle Grass and have it drop Cotton Seeds
  28. minetest.override_item("default:junglegrass", {
  29. drop = {
  30. max_items = 1,
  31. items = {
  32. {items = {'farming:seed_cotton'}, rarity = 8},
  33. {items = {'farming:seed_rice'},rarity = 8},
  34. {items = {'default:junglegrass'}},
  35. }
  36. },
  37. })