How to make an item fly towards you?

Started by Astronomic Carrot on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an item fly towards you?

Hi,

I was wondering how to make an item fly towards me.

For example, if I dropped an axe somewhere in the world, I want to press a keybind and the item will fly from its position straight towards me. Is this possible to do? If so, then please show me its procedures, or if it can't be made in MCreator, suggest an alternative method to achieve this. Thank you

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
assuming the axe hasn't, or…
Sat, 06/17/2023 - 15:35

assuming the axe hasn't, or rather doesn't despawn, you could do this via command in a procedure upon keybind hit;

by running "/execute at @e[type=item,nbt={Item:{id:"modname:itemname"}},limit=1,sort=nearest] facing entity @s eyes as @e[type=item,nbt={Item:{id:"modname:itemname"}},limit=1,sort=nearest] run tp @s ^ ^ ^1" in the name of the player, it will teleport the item one block towards the player, then you can just put this on a loop or maybe make it so the player has to hold the key down for the axe to return.

of course there's probably a better way of doing it through actual procedure code - so if someone else recommends something to do with procedures - thats probably a better option.

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
alright, ty for ur reply,…
Sun, 06/18/2023 - 14:49

alright, ty for ur reply, ill work on it soon and ill let u know if it worked or not