[Mod] Item magnet and in-world node drops [item_drop]

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Item magnet and in-world node drops [item_drop]

by texmex » Post

Excellent, let's mark it as fixed for now.

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Item magnet and in-world node drops [item_drop]

by FreeGamers » Post

A user reported on my server that they could not obtain clay with a shovel. So I tried it with an admin account with creative privs and it worked fine.

But when I log in with a test user account with standard MT privs, clay lumps cannot be obtained when this mod is enabled. Can anyone else reproduce this or verify?
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Item magnet and in-world node drops [item_drop]

by texmex » Post

Are you using the latest version?

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Item magnet and in-world node drops [item_drop]

by FreeGamers » Post

texmex wrote:Are you using the latest version?
I was using the previous version. I updated to the latest and we're all good. Clay is dropping from clay blocks with a standard user. Thanks for mentioning the update. I need to start following git repositories and push updates to my server somehow.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
Clyde
Member
Posts: 222
Joined: Sat Jul 30, 2016 14:23
GitHub: acmgit
In-game: clyde

Re: [Mod] Item magnet and in-world node drops [item_drop]

by Clyde » Post

Hello,
i was testing the mod on my server, but

Code: Select all

2020-03-05 23:26:36: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod '' in callback environment_Step(): /usr/local/share/minetest/builtin/game/item.lua:22: attempt to index local 'img1' (a nil value)
2020-03-05 23:26:36: ERROR[Main]: stack traceback:
2020-03-05 23:26:36: ERROR[Main]: 	/usr/local/share/minetest/builtin/game/item.lua:22: in function 'inventorycube'
2020-03-05 23:26:36: ERROR[Main]: 	...l/share/minetest/games/Smalltech/mods/item_drop/init.lua:124: in function 'collect_item'
2020-03-05 23:26:36: ERROR[Main]: 	...l/share/minetest/games/Smalltech/mods/item_drop/init.lua:292: in function 'pickupfunc'
2020-03-05 23:26:36: ERROR[Main]: 	...l/share/minetest/games/Smalltech/mods/item_drop/init.lua:317: in function 'func'
2020-03-05 23:26:36: ERROR[Main]: 	/usr/local/share/minetest/builtin/common/after.lua:20: in function </usr/local/share/minetest/builtin/common/after.lua:5>
2020-03-05 23:26:36: ERROR[Main]: 	/usr/local/share/minetest/builtin/game/register.lua:429: in function </usr/local/share/minetest/builtin/game/register.lua:413>
2020-03-05 23:26:36: ERROR[Main]: stack traceback:
I use the last git-version of MT.
Greetings, Clyde.
My Server: Welcome to Zeitsprung - deadsoft.org:49152 Jungle The next Gundul - jungle-tng.deadsoft.org:49152

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Item magnet and in-world node drops [item_drop]

by texmex » Post

Looks like it’s due to the particle effect. It’s been flaky before. I’ll look into it.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] Item magnet and in-world node drops [item_drop]

by Hybrid Dog » Post

The first parameter passed to minetest.inventorycube is nil. ("attempt to index local 'img1' (a nil value)")
https://github.com/minetest/minetest/bl ... ua#L18-L25
img1 is top from there:
https://github.com/minetest-mods/item_d ... t.lua#L124
Either tiles[1] or tiles[1].name (if tiles[1] is a table) is nil.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: [Mod] Item magnet and in-world node drops [item_drop]

by DoyleChris » Post

I cant seem to get this to work right, I can walk accross items and pick them up but it dosent pull items to me and i haft to stand just about on the items to pick them up. below is the settingtypes.txt. I have it running on a server.

Code: Select all

#Pick up items automatically
item_drop.enable_item_pickup (Enable item pickups) bool true

#Drop items in-world on dig, does nothing in creative mode
item_drop.enable_item_drop (Enable item drops) bool false

#Use a key to pick up items
item_drop.enable_pickup_key (Use pickup key) bool true

#Collect items when the key is not pressed instead of when it is pressed
item_drop.pickup_keyinvert (Invert pickup key) bool true

#What keytype to use as pickup key
item_drop.pickup_keytype (Pickup keytype) enum Sneak

#The volume of the pickup sound
item_drop.pickup_sound_gain (Pickup sound gain) float 0.4

#Display a particle of the item picked up above the player
item_drop.pickup_particle (Pickup particle) bool true

#Player pickup radius, the maximum distance from which items can be collected
item_drop.pickup_radius (Pickup radius) float 12

#Magnet radius, items between pickup_radius and this begin flying to the player
#Set it to -1 (or something else smaller than pickup_radius) to disable item
#flying
item_drop.magnet_radius (Magnet radius) float 30

#Item flight duration, items flying for more than this time are added to the
#player's inventory
item_drop.magnet_time (Magnet time) float 5.0

#Time delay in seconds after autopicking an item if it's dropped by a player
item_drop.pickup_age (Pickup age) float 0.5

#Enable manual item pickups by mouse
item_drop.mouse_pickup (Mouse pickup) bool true

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: [Mod] Item magnet and in-world node drops [item_drop]

by DoyleChris » Post

I can get it to work in single player but i move the settingtypes over to my server and it dosen't work.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: [Mod] Item magnet and in-world node drops [item_drop]

by DoyleChris » Post

Any solution to this problem.

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

Re: [Mod] Item magnet and in-world node drops [item_drop]

by ErrorNull » Post

@texmex - really enjoying this mod. i'm currently using this in my game. is it possible to make the item pickup sound be something different based on what is being picked up? like using the existing footstep sounds for various nodes. pickup dirt, you hear the dirt step sound, pick up wood and you hear the wood step sound, etc...

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 28 guests