Make drops go straight into player inventory

Started by EladrielNokk on

Topic category: Help with modding (Java Edition)

Last seen on 18:05, 5. May 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make drops go straight into player inventory

Hello,

I am currently working on a mod to expand the amount of curses/enchantments in the game as well as their functions.

I am trying to make an enchantment that puts drops from mined blocks and slain mobs directly into the player's inventory. Though indicating what to put into the player's inventory has proven tricky. It's one thing to say "when player mine stone put cobblestone in inventory and delete original stone" what I want is for the mined block to put its drop directly into my pockets. AS far as the procedure structure goes, I'm a bit lost. Can anyone lend a hand?

Last seen on 18:05, 5. May 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mine seems to simply take…
Wed, 05/05/2021 - 04:45

Mine seems to simply take the block and put it directly in the inventory, similar to silk touch but with an instant deposit. I couldn't get your structure to work for me. Do you know how we can manipulate drops in general? Believe it or not this is instrumental in several other enchant and curse ideas I have...

Last seen on 00:59, 19. Oct 2022
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes, it's like a silk touch,…
Wed, 05/05/2021 - 04:54

yes, it's like a silk touch, I thought of using "get nearest entity".
I think we could detect entity items and convert them into itemstack.
it is a hypothesis

Last seen on 11:29, 16. Apr 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could always test for an…
Sat, 06/05/2021 - 03:15

You could always test for an item entity, and teleport it directly to the players coordinates. It's not perfect but it's a work around