minetest-mods / anvil

Minetest mod providing an anvil with which to repair worn tools
GNU General Public License v3.0
14 stars 18 forks source link

Item duplication: Steel pickaxe #22

Open sbrl opened 4 years ago

sbrl commented 4 years ago

Hey - this is a neat mod! With the low durability of the earlier tools, I've found this mod essential so I don't keep going through loads of picks - and thus loads of resources. However, if I place a steel pickaxe on the anvil, it doesn't leave my inventory - leading to an item duplication glitch! Weirdly I don't have this problem with a steel shovel, for example.

S-S-X commented 3 years ago

Same problem here: https://github.com/pandorabox-io/pandorabox.io/issues/609 had to disable another mod to mitigate it. This case anvil combined with pick_axe_tweaks just did not behave nicely together.

wsor4035 commented 3 years ago

you probably have the on_place defined in the pickaxes node def, working on a solution

wsor4035 commented 3 years ago

https://github.com/wsor4035/pick_axe_tweaks/commit/513ed26d2d72bfa21faee773ddbac710b351d7ff for anyone reading this down the line. this mod is most likely not the issue for @sbrl, its the mod that has the on_place defined and not returning properly/expected output.

side note, what games and mods are you using to have this issue?

sbrl commented 3 years ago

Hey there, @wsor4035! I'm using minetest game, with these mods: https://ybin.me/p/7a6197076e59771f#/zy6IVt3+E+6qkB7XXXGgiJI1OjyRQQfC5/cYg+6nsY=

(compressed archive of mods available upon request)

wsor4035 commented 3 years ago

i can look through the list, if your on linux, may be faster to grep your mods folder for on_place, i suspect one of your mods adds a on_place to pick axes, and that it isnt returning probably since thats the issue i had

sbrl commented 3 years ago

Here's a link to a download of my mods folder: worldmods.tar.xz (download will be deleted from the server after 30 days)

A cursory ack for on_place yields lots of candidates, but many of them aren't for a pickaxe.

wsor4035 commented 3 years ago

testing with that set of world mods and adding anvil, i can not even replicate the problem

sbrl commented 3 years ago

I've just double checked the worldmods folder I gave you there - and I'm so sorry, I gave you to the wrong one! That one is the for my mod sandbox testing world, not my survival world :P

Here's a link to the correct one: https://public.mooncarrot.space/worldmods.tar.gz (download will be deleted from the server after 30 days)

I'm very sorry for causing confusion here.


  1. Hold pick in hand
  2. Right click on empty anvil
  3. Note that the pick hasn't disappeared from your inventory
  4. Switch to an empty slot
  5. Right click again
  6. Get duplicate pick
MetaNomad commented 3 years ago

Same issue for me, using pick_axe_tweaks too

S-S-X commented 3 years ago

Same issue for me, using pick_axe_tweaks too

Latest pick_axe_tweaks should be good but similar functionality is used with many mods. Have to check all tool related mods for similar issues that pick_axe_tweaks had before. Well, unless there's another pick_axe_tweaks mod...

MetaNomad commented 3 years ago

Same issue for me, using pick_axe_tweaks too

Latest pick_axe_tweaks should be good but similar functionality is used with many mods. Have to check all tool related mods for similar issues that pick_axe_tweaks had before. Well, unless there's another pick_axe_tweaks mod...

So maybe it comes from handholds_redo, which uses pickaxe tool too

S-S-X commented 3 years ago

Same issue for me, using pick_axe_tweaks too

Latest pick_axe_tweaks should be good but similar functionality is used with many mods. Have to check all tool related mods for similar issues that pick_axe_tweaks had before. Well, unless there's another pick_axe_tweaks mod...

So maybe it comes from handholds_redo, which uses pickaxe tool too

Checked that and yes this is handhelds_redo issue, it is not returning itemstack correctly in https://github.com/t-affeldt/handholds_redo/blob/9496c8612a9f0bc3f234c1439df2bbe8dff8de2f/init.lua#L20-L25

t-affeldt commented 3 years ago

I can confirm that the issue was down to a missing return statement in my handholds_redo mod and is now fixed.