[Mod] Builtin Item [builtin_item]

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

[Mod] Builtin Item [builtin_item]

by Calinou » Sun Jun 29, 2014 18:03

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.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Builtin Item [builtin_item]

by TenPlus1 » Sun Jun 29, 2014 21:03

Line 97 could be changed to:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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...
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Builtin Item [builtin_item]

by Inocudom » Sun Jun 29, 2014 21:08

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>
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Builtin Item [builtin_item]

by TenPlus1 » Mon Jun 30, 2014 07:54

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) ?
Last edited by TenPlus1 on Mon Jun 30, 2014 16:19, edited 1 time in total.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Builtin Item [builtin_item]

by Inocudom » Mon Jun 30, 2014 14:12

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 avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

User notes

by Wuzzy » Fri Jan 06, 2017 01:10

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.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Builtin Item [builtin_item]

by TenPlus1 » Fri Jan 06, 2017 09:06

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
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Builtin Item [builtin_item]

by Wuzzy » Fri Jan 06, 2017 11:46

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)

:-(
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Builtin Item [builtin_item]

by TenPlus1 » Fri Jan 06, 2017 19:47

Readme updated :P
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 5 guests

cron