Started by
EladrielNokk
on
Topic category: Help with Minecraft modding (Java Edition)
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?
I was just doing the same thing
for blocks:
https://i.imgur.com/JTHBOt7.jpg
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...
https://imgur.com/a/JbrE3Rf
Just realized I forgot to link the image. My bad.
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
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