Making black hole/ orb pulls entities into it

Started by Aplhau on

Topic category: Help with modding (Java Edition)

Last seen on 00:36, 9. Dec 2021
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making black hole/ orb pulls entities into it
Fri, 07/09/2021 - 16:53 (edited)

Hello hope everyone is having a nice day. I need some help with making an orb the spawns where the cursor is and entities start to get pulled into it and it despawns after 5 seconds. I have figured out how to spawn the orb where the cursor is. I have a procedure that pulls entities in but I don't know if it is ok because it looks like it teleports the entities to Narnia. If this way works can you tell me how to make it slower.

this is the procedure im using. the bottom if statement is for it to despawn after 5 seconnds

Edited by Aplhau on Fri, 07/09/2021 - 16:53
You could, instead of…
Fri, 07/09/2021 - 05:13

You could, instead of teleporting them, set their movement vector in the direction of your orb. This would, however, require a bit math to be done.

Last seen on 00:36, 9. Dec 2021
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(No subject)
Fri, 07/09/2021 - 16:51

like this?

You're setting the motion…
Sat, 07/10/2021 - 08:43

You're setting the motion vector to the item/mob's coordinates which is usually a rather big number. vx, vy and vz are components of a speed vector and together they need to point in the direction of your black hole. value 1 in a certain direction means that the entity moves 1 block/second (or tick, not really sure at this moment), but I'm sure you can figure it out yourself with some tweaking.

Last seen on 00:36, 9. Dec 2021
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah someone just told me…
Sat, 07/10/2021 - 08:45

Yeah someone just told me that so now I'm trying to figure out some math to make it point towards the orb

 

Last seen on 11:25, 27. Aug 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what was the math?
Fri, 04/22/2022 - 10:11

what was the math?

Last seen on 01:06, 27. Jun 2022
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Did you figure this out?
Fri, 05/27/2022 - 05:16

Did you figure this out?

Last seen on 00:26, 25. Jul 2022
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So. I was looking through…
Fri, 07/22/2022 - 08:03

So. I was looking through messages for a way to make a black hole and I actually realised that this math is like super easy(Its also just as easy to make a repeling object aswell if u wanted to). Basically all you need is to get the differance between the block/mob/blackhole and the object/mob you are trying to pull. To make the mobs get sucked towards the black hole you need to use a attempt to overide motion vector of block with the x/y/z inputs being (black hole x/y/z) - (mob you are pulling x/y/z). If you want to repel then just swap the black hole and mob you are pulling x/y/z's. Hope this helps?

Last seen on 14:45, 10. Mar 2023
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
https://mcreator.net/comment…
Fri, 01/20/2023 - 18:25

https://mcreator.net/comment/213534/#comment-213534

to be honest, I didn't understand how to implement what you said. It is impossible to accurately set the input data in the motion vector.

 

I don't speak English so I'm sorry for the literate spelling

Last seen on 18:20, 19. Apr 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
simple go to entity…
Fri, 12/22/2023 - 17:33

simple

  1. go to entity managment
  2. select the block attempt to make event/target entity find path and move to X Y Z with speed factor 1
  3. make a for each entity as entity iterator in a square cube size of 4 blocks do
  4. do the block of 1. in the block of 2.
  5. change event/target entity to entity iterator
  6. change the in a square cube size of 4 blocks to in a square cube size of (radius) blocks

    like this https://www.mediafire.com/view/ox2qqov75t4fwop/Bildschirmfoto_2023-12-22_um_18.31.12.png/file

Last seen on 18:20, 19. Apr 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and change the x y z to x y…
Sun, 12/31/2023 - 13:00

and change the x y z to x y z of event/target entity (by an blackhole entity)

Last seen on 19:35, 27. Mar 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
theffs it work for entity if…
Wed, 02/28/2024 - 17:59

theffs it work for entity if yes how i put my entity or use btm?

 

 

 

 

Last seen on 18:20, 19. Apr 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what is btm  
Wed, 04/03/2024 - 18:39

what is btm

 

Last seen on 18:20, 19. Apr 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and do not wonder about my…
Wed, 04/03/2024 - 18:46

and do not wonder about my low points i´m like a mcreator pro but i´m not publishing many of my mods