[Mod] Minecraft like item drop/pick up [item_drop]

User avatar
Pavel_S
Member
 
Posts: 131
Joined: Sat Apr 06, 2013 11:43

by Pavel_S » Fri Apr 26, 2013 06:09

brightness of drop doesn`t change at night.
Image
 

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

by Calinou » Fri Apr 26, 2013 06:50

Pavel_S wrote:brightness of drop doesn`t change at night.
Image


This also happens in the default game, entity brightness values are incorrect.
 

ndjdjksisksk
Member
 
Posts: 130
Joined: Mon May 06, 2013 04:11

by ndjdjksisksk » Mon May 06, 2013 04:14

this does not work for somereason it doesn't load and now none of my mods in the folder are loading
nvm about me leaving minetest but i probably will for a while because i have nothing to do in this comunity becaise i can't make a server. my username is going to change i will make a new acount called stormchaser3000
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon May 06, 2013 08:31

ndjdjksisksk wrote:this does not work for somereason it doesn't load and now none of my mods in the folder are loading

Can you give more information about the error? (http://forum.minetest.net/viewtopic.php?id=5073)

Also make sure to rename the folder from "item_drop-master" (or whatever name github gave the file) to "item_drop".
 

User avatar
Cooper97
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 19:55

by Cooper97 » Wed Aug 07, 2013 06:38

I have tried this mod under 0.4.7, but it does not drop the nodes. Is that a bug or is it possible that it is an incompatibility to other mods?
Sorry for my bad english. (I am from germany.)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Aug 07, 2013 11:22

Cooper97 wrote:I have tried this mod under 0.4.7, but it does not drop the nodes. Is that a bug or is it possible that it is an incompatibility to other mods?

I just tested it and it works fine.
Do you use technic (or technic_game) or creative mode?
 

User avatar
Cooper97
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 19:55

by Cooper97 » Wed Aug 07, 2013 11:28

Oh, no I do not use the technic mod but to build I use the creativ mode. I think that is the problem :D
Sorry for my bad english. (I am from germany.)
 

wenLiangcan
New member
 
Posts: 2
Joined: Wed Aug 07, 2013 13:51

by wenLiangcan » Wed Aug 07, 2013 13:58

Failed to load and run under 0.4.7
Image
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Aug 07, 2013 14:03

wenLiangcan wrote:Failed to load and run under 0.4.7
http://i.imgur.com/491Jwx2.png?2

https://forum.minetest.net/viewtopic.php?id=6450
Rename the mod to "item_drop".
 

wenLiangcan
New member
 
Posts: 2
Joined: Wed Aug 07, 2013 13:51

by wenLiangcan » Thu Aug 08, 2013 05:22

PilzAdam wrote:
wenLiangcan wrote:Failed to load and run under 0.4.7

https://forum.minetest.net/viewtopic.php?id=6450
Rename the mod to "item_drop".


Thanks, it works now.
 

User avatar
onpon4
Member
 
Posts: 517
Joined: Thu Mar 21, 2013 01:54

by onpon4 » Thu Sep 12, 2013 03:59

There's a typo in line 58 of init.lua:

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
bject:get_luaentity().physical_state = true


It should be:

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
object:get_luaentity().physical_state = true


This causes the server to crash if it gets to that point.
Last edited by onpon4 on Thu Sep 12, 2013 03:59, edited 1 time in total.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Thu Sep 12, 2013 11:46

onpon4 wrote:There's a typo in line 58 of init.lua:

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
bject:get_luaentity().physical_state = true


It should be:

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
object:get_luaentity().physical_state = true


This causes the server to crash if it gets to that point.

Fixed.
 

User avatar
ak399g
Member
 
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR

by ak399g » Fri Dec 27, 2013 17:06

If I only want the pickup function, not the drop on death or other stuff, which lines do I comment out?
aka SAFR
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Dec 27, 2013 17:09

ak399g wrote:If I only want the pickup function, not the drop on death or other stuff, which lines do I comment out?

Lines 1 to 71 are pickup, the rest is dropping.
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by MirceaKitsune » Sun Jun 15, 2014 16:01

I checked out the latest GIT version, and found an obvious problem: You can no longer drop items, because they're picked back up immediately after leaving your inventory. Can some sort of cooldown be added, so items can only be picked up a second after their entity appears in-world?
 

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

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by Calinou » Sun Jun 15, 2014 20:06

MirceaKitsune wrote:I checked out the latest GIT version, and found an obvious problem: You can no longer drop items, because they're picked back up immediately after leaving your inventory. Can some sort of cooldown be added, so items can only be picked up a second after their entity appears in-world?


The version included in Carbone fixed this by removing the y offset in the check and reducing the collection radius, no timer is required: http://paste.ubuntu.com/7649710/

Uncomment the lines at the bottom to enable nodes dropping when they're dug.
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by MirceaKitsune » Sun Jun 15, 2014 20:28

Calinou wrote:The version included in Carbone fixed this by removing the y offset in the check and reducing the collection radius, no timer is required: http://paste.ubuntu.com/7649710/

Uncomment the lines at the bottom to enable nodes dropping when they're dug.


Good to know, thanks. Since this is a major problem, I hope it's fixed here too... being the original mod and all.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by 4aiman » Mon Jun 16, 2014 10:29

+1
FM is affected too.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by PilzAdam » Wed Jun 18, 2014 14:14

MirceaKitsune wrote:I checked out the latest GIT version, and found an obvious problem: You can no longer drop items, because they're picked back up immediately after leaving your inventory. Can some sort of cooldown be added, so items can only be picked up a second after their entity appears in-world?

There is a cooldown for that reason, maybe RBA broke it with his latest changes to builtin items (feel free to file an issue in the Minetest repo for that).
 

ivalin
 

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by ivalin » Sun Jul 13, 2014 12:18

Is this mod still being developed ? On minetest 0.4.10 can't drop items from my inventory or with " Q " button .
 

User avatar
LionsDen
Member
 
Posts: 525
Joined: Thu Jun 06, 2013 03:19

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by LionsDen » Sun Jul 13, 2014 19:33

I created the code for a trash can and posted it at the following link. It is not a mod, you need to create the depends.txt file and assign an image to use and put it into a mod directory. Looking at some other "simple" mods will show you what is needed. Here is the link:

viewtopic.php?p=148244#p148244
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by Evergreen » Sun Jul 13, 2014 21:30

LionsDen wrote:I created the code for a trash can and posted it at the following link. It is not a mod, you need to create the depends.txt file and assign an image to use and put it into a mod directory. Looking at some other "simple" mods will show you what is needed. Here is the link:

viewtopic.php?p=148244#p148244

I have a trash can mod too. :P
 

User avatar
meldrian
Member
 
Posts: 46
Joined: Sat Jan 12, 2013 14:02
GitHub: meldrian
IRC: meldrian
In-game: meldrian

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by meldrian » Wed Jul 30, 2014 18:43

ivalin wrote:Is this mod still being developed ? On minetest 0.4.10 can't drop items from my inventory or with " Q " button .


Jepp, got the same issue but you know what? I can handle it somehow :)
It's still a great and nearly necessary modification. Thank you PilzAdam
 

gsmanners
Member
 
Posts: 159
Joined: Fri Jan 10, 2014 21:37

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by gsmanners » Thu Aug 07, 2014 21:01

Well, I have a "fix" (fwiw):

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
minetest.register_globalstep(function(dtime)
   for _,player in ipairs(minetest.get_connected_players()) do
      if player:get_hp() > 0 or not minetest.setting_getbool("enable_damage") then
         local pos = player:getpos()
         pos.y = pos.y+0.5
         local inv = player:get_inventory()
         local ctrl = player:get_player_control()
         if ctrl.up or ctrl.left or ctrl.right then

            for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 2)) do
               local en = object:get_luaentity()
               if not object:is_player() and en and en.name == "__builtin:item" then
                  if inv and
                     inv:room_for_item("main", ItemStack(en.itemstring)) then
                     inv:add_item("main", ItemStack(en.itemstring))
                     if en.itemstring ~= "" then
                        minetest.sound_play("item_drop_pickup", {
                           to_player = player:get_player_name(),
                           gain = 0.4,
                        })
                     end
                     en.itemstring = ""
                     object:remove()
                  end
               end
            end

         end
      end
   end
end)
 

sloantothebone
Member
 
Posts: 26
Joined: Thu Aug 28, 2014 18:42

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by sloantothebone » Thu Sep 04, 2014 17:29

I tried out the fix but i get an error <eof> expected near end
 

User avatar
valmet565
Member
 
Posts: 12
Joined: Sat Nov 02, 2013 19:22

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by valmet565 » Sat Sep 20, 2014 12:15

Fix works well. Replace only this function: "minetest.register_globalstep(function(dtime)". 71 lines.
 

Joz
Member
 
Posts: 40
Joined: Fri Oct 25, 2013 21:37

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by Joz » Sun Sep 28, 2014 17:55

For me the line with "minetest.sound_play" doesn't work, also not with other sound files.
 

User avatar
fireglow
Member
 
Posts: 72
Joined: Fri Mar 28, 2014 11:36
IRC: fireglow
In-game: fireglow

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by fireglow » Wed Feb 04, 2015 10:45

I, too, recommend the version of this mod that is shipped with Carbone: viewtopic.php?f=15&t=9033
It works as exptected!
 

rlocki69
New member
 
Posts: 3
Joined: Thu Nov 20, 2014 23:16
GitHub: rlocki69
IRC: rlocki69
In-game: rlocki69

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by rlocki69 » Fri Apr 17, 2015 01:53

Is there any way to break a block and not get the item dropped, but you can pick up blocks on the ground?
 

rlocki69
New member
 
Posts: 3
Joined: Thu Nov 20, 2014 23:16
GitHub: rlocki69
IRC: rlocki69
In-game: rlocki69

Re: [Mod] Minecraft like item drop/pick up [item_drop]

by rlocki69 » Fri Apr 17, 2015 01:54

Whenever I try to drop an item, the sound plays but nothing happens.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 58 guests

cron