Update screenshot and README.md
This commit is contained in:
parent
8b9505dec2
commit
c4cb004f96
4 changed files with 15 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
|||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 philipmi
|
||||
Copyright (c) 2020-2023 philipmi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
18
README.md
18
README.md
|
@ -1,15 +1,22 @@
|
|||
Regrowing Fruits
|
||||
===
|
||||
[![ContentDB](https://content.minetest.net/packages/philipmi/regrowing_fruits/shields/title/)](https://content.minetest.net/packages/philipmi/regrowing_fruits/)
|
||||
[![ContentDB](https://content.minetest.net/packages/philipmi/regrowing_fruits/shields/downloads/)](https://content.minetest.net/packages/philipmi/regrowing_fruits/stats/)
|
||||
[![Forums](https://img.shields.io/badge/Forums-Regrowing_Fruits-lightgrey)](https://forum.minetest.net/viewtopic.php?t=24986)
|
||||
[![License](https://img.shields.io/badge/license-MIT-brightgreen)](#license)
|
||||
![Screenshot](screenshot.png)
|
||||
|
||||
Info
|
||||
----
|
||||
|
||||
This mod causes fruits on trees from various other mods to regrow like apples in the 5.0 release of Minetest Game. If you placed the fruits by hand or removed the tree leaves, the fruits don't regrow.
|
||||
|
||||
Cool_trees modpack, ethereal, farming_plus, multibiomegen, australia, aotearoa and moretrees are supported, but maybe there are other mods with this problem that I don't know about. Please tell me in the Minetest Forum topic!
|
||||
This mod causes fruits on trees from various other mods to regrow like apples in the 5.0 release of Minetest Game.
|
||||
If you placed the fruits by hand or removed the tree leaves, the fruits don't regrow.
|
||||
|
||||
Cool_trees modpack, ethereal, farming_plus, multibiomegen, australia, aotearoa and moretrees are currently supported.
|
||||
Default apples in older versions than Minetest 5.0 will also regrow.
|
||||
|
||||
Ideas, bug reports or requests for more mod support are always welcome in the [Minetest Forum topic](https://forum.minetest.net/viewtopic.php?f=9&t=24986) or via the [Git Issue Tracker](https://git.sp-codes.de/minetest/regrowing_fruits/issues)!
|
||||
|
||||
Credits
|
||||
----
|
||||
|
||||
|
@ -18,7 +25,4 @@ This mod is inspired by "endless_apples" by Shara RedCat (2018).
|
|||
License
|
||||
----
|
||||
|
||||
Code for this mod is released under MIT (https://opensource.org/licenses/MIT).
|
||||
|
||||
|
||||
If you got ideas or found bugs, please let me know on the Forum topic(https://forum.minetest.net/viewtopic.php?f=9&t=24986)!
|
||||
Code for this mod is released under [MIT](https://spdx.org/licenses/MIT.html) (see [LICENSE](LICENSE)).
|
||||
|
|
5
init.lua
5
init.lua
|
@ -46,14 +46,15 @@ local add_fruit_regrowable = function(fruit, node, leaves)
|
|||
end)
|
||||
end
|
||||
|
||||
local groups = minetest.registered_nodes[node]["groups"]
|
||||
-- make sure (moretrees) fruits don't fall on dig
|
||||
local groups = minetest.registered_nodes[node].groups
|
||||
groups.attached_node = 0
|
||||
|
||||
-- wait until mods are loaded to ensure that other mods do not override overrides
|
||||
minetest.after(0.1, function()
|
||||
-- override fruit
|
||||
minetest.override_item(node, {
|
||||
groups = groups, -- make sure (moretrees) fruits don't fall on dig
|
||||
--groups = groups,
|
||||
after_place_node = function(pos, placer) -- make sure (moretrees and plumtree) fruits aren't placed by player
|
||||
if placer:is_player() and node == "plumtree:plum" then
|
||||
minetest.set_node(pos, {name = node, param2 = 0})
|
||||
|
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 310 KiB After Width: | Height: | Size: 418 KiB |
Loading…
Reference in a new issue