Procedure to Capture mob

Started by gustavowizard123 on

Topic category: Help with modding (Java Edition)

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedure to Capture mob

Hey guys im trying to set up a procedure for a item (on right clicked) on a mob capture its (maybe using those NBT tags) and so on... do i need 2 itens or just 1?

i want this to make on any entity, vanilla or mod ones.

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can someone gimme a hand?…
Wed, 07/01/2020 - 07:15

can someone gimme a hand? thanks!

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what do you mean by capture…
Wed, 07/01/2020 - 10:50

what do you mean by capture it? gotta give details

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what do you mean by capture…
Wed, 07/01/2020 - 16:23

what do you mean by capture it? gotta give details

He means he wants to set an NBT tag == to the Entity. There are many details, and here is one;

 (maybe using those NBT tags)

 

You can do this easily in Java, in fact, I do it in my mod;

https://mcreator.net/modification/63126/infused-stones-mod

However, it involves iterations and some events. So, to save my time, I won't show an example or give code unless you are ready! 🥰 Let me know if you want to do it.

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
lol yeah i want it! thanks!
Wed, 07/01/2020 - 20:22

lol yeah i want it! thanks!

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
like on most mods, you right…
Wed, 07/01/2020 - 20:25

like on most mods, you right click the mob with the net or magic bottle wtv then the mob despawn and you get a tag ID on the item, then you can move the mob to your house and stuff, i know how to do it using 1 new item for each mob, but i got 80 mobs + the vanillas and i want it to work on mobs of any mod.

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is your mod on curseforge…
Wed, 07/01/2020 - 20:26

is your mod on curseforge tbroski ?

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
im ready what should i do?…
Wed, 07/01/2020 - 20:28

im ready what should i do? thanks!

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well in that case nbt tags…
Thu, 07/02/2020 - 07:15

well in that case nbt tags won't be enough. you will need to make a copy of the captured entity and then despawn it. the copy is a full Entity so you can spawn it somewhere else easily. you can check how vanilla does it when teleporting entities to other dimensions

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
make a copy of the entity…
Thu, 07/02/2020 - 19:25

make a copy of the entity you mean by Mcreator Procedure or by editing the code?

also where do i find that code, you mean when mobs enter the portal by acident?

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
by editing code. look in net…
Fri, 07/03/2020 - 19:03

by editing code. look in net.minecraft.entity.Entity.java starting from line 2437. looks simple enough. of course the entity won't get saved on world shutdown, for that you'll need to save the nbt data of that entity somewhere.

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
bummer i was not able to do…
Sat, 07/04/2020 - 23:07

bummer i was not able to do like that.. im still trying to make with procedures, but i dont understand what those NBT data and logic tags are

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i can make it work but only…
Sat, 07/04/2020 - 23:51

i can make it work but only using 1 element Item for each mob (that would be much more time consuming and plus wont work on other mods, just my own and vanilla mobs)

 

c

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i read the wiki info,…
Sat, 07/04/2020 - 23:51

i read the wiki info, nothing there shows how to set this up... :(

 

could you help me?