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 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the way you're doing it you…
Sun, 07/05/2020 - 06:51

the way you're doing it you can only save entities you know, and they are all reset to first spawn state, not really "capturing" it. doing it the vanilla change dimension way you can capture any entity including from other mods, but you need to save the nbt data or else they will get lost on world unload.

in order to really capture any entity, you'll need to edit the code for your item to save the entity nbt data in the itemstack. 

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i understand, i just dont…
Sun, 07/05/2020 - 07:24

i understand, i just dont know how to do that yet :(

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and yeah i understand they…
Sun, 07/05/2020 - 07:25

and yeah i understand they will reset (they will come back as new mob), thus losing stuff like taming data

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
NBTs are so amazing! i…
Mon, 07/27/2020 - 06:52

NBTs are so amazing! i really could use some tutorials for it thou :)

Last seen on 00:46, 9. Sep 2021
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I would love to know your…
Mon, 08/23/2021 - 22:12

I would love to know your code @tbroski I sent an invite to your discord. HMU Nova#0258.

 

I will also look at the code for how vanilla does it when teleporting entities to other dimensions @ ahznb

 

I can code Java, but haven't really ever coded MC... and I'm also lazy, so MCreator with its fancy GUI just said use me.... lol... ended up with having to just code stuff anyway. Thanks for the info.