Started by
Aplhau
on
Topic category: Help with Minecraft modding (Java Edition)
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.
Edited by Aplhau on Fri, 07/09/2021 - 16:53
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.
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.
Yeah someone just told me that so now I'm trying to figure out some math to make it point towards the orb
Great, good luck :)
what was the math?
Did you figure this out?
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?
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
simple
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
and change the x y z to x y z of event/target entity (by an blackhole entity)
theffs it work for entity if yes how i put my entity or use btm?
what is btm
and do not wonder about my low points i´m like a mcreator pro but i´m not publishing many of my mods