Page 1 of 1

[Mod] Builtin Item [builtin_item]

Posted: Sun Jun 29, 2014 18:03
by Calinou
Destroys items in damaging blocks, makes them decay after 10 minutes. Based on PilzAdam's builtin item mod.

Download

No dependencies on non-default mods.
License for code: CC0


This mod can be used with Item Drop just fine.

Re: [Mod] Builtin Item [builtin_item]

Posted: Sun Jun 29, 2014 21:03
by TenPlus1
Line 97 could be changed to:

Code: Select all

if minetest.get_item_group(name, "hot") > 0 then
to stop things like crystal_spikes (which hurt player with cold) from destroying dropped items...

Re: [Mod] Builtin Item [builtin_item]

Posted: Sun Jun 29, 2014 21:08
by Inocudom
Fatal error:
16:58:38: ERROR[main]: ServerError: ...20140627\bin\..\games\carbone\mods\builtin_item\init.lua:97: attempt to index a nil value
16:58:38: ERROR[main]: stack traceback:
16:58:38: ERROR[main]: ...20140627\bin\..\games\carbone\mods\builtin_item\init.lua:97: in function <...20140627\bin\..\games\carbone\mods\builtin_item\init.lua:81>

Re: [Mod] Builtin Item [builtin_item]

Posted: Mon Jun 30, 2014 07:54
by TenPlus1
Inocudom: which line 97 caused this error, the original code or the one I posted above (which seems to work fine on my standalone server) ?

Re: [Mod] Builtin Item [builtin_item]

Posted: Mon Jun 30, 2014 14:12
by Inocudom
TenPlus1 wrote:Inocudom: which line caused this error, the original or the one I posted above (which seems to work fine on my standalone server) ?
Line 97 caused that error, probably due to an unknown node.

User notes

Posted: Fri Jan 06, 2017 01:10
by Wuzzy
Note to users: This mod has an undocumented feature: Items in flowing water get pushed. (Calinou, please add this to thread description).
I like the idea of making items float, but this doesn't seem to go on really smoothly, or movement direction of the item does not always make sense. It looks like the item often stops prematurely and is stuck in flowing water. The item does not get always pushed out of the water completely.
So I think the water physics need a bit more love. If implemented well, this could add a nice gameplay mechanic. You could build simple water transport systems. ;-)

Item destruction in lava works perfectly.

Item decay is set with the undocumented remove_items setting. Item decay is totally pointless, as this is already natively supported by Minetest. Minetest makes items disappear after some minutes.
The setting for this is item_entity_ttl.

Re: [Mod] Builtin Item [builtin_item]

Posted: Fri Jan 06, 2017 09:06
by TenPlus1
Since this mod is a little out of date, here's a new link to an updated builtin_item mod with similar features (and some new) that works with item_entity_ttl and destroy_item setting:

https://github.com/tenplus1/builtin_item

Re: [Mod] Builtin Item [builtin_item]

Posted: Fri Jan 06, 2017 11:46
by Wuzzy
And why does the README.md say this?:
Items are removed after 120 seconds or the time that is specified by remove_items in minetest.conf (-1 disables it)
:-(

Re: [Mod] Builtin Item [builtin_item]

Posted: Fri Jan 06, 2017 19:47
by TenPlus1
Readme updated :P