Topic category: Help with Minecraft modding (Java Edition)
=================================
Introduction:
Making a raptor mob, wich follows the second alpha raptor mob.
=================================
My Attempts (Please read. they are very helpful. They just don't work well for me ):
-------------------------------------------------
1. Attempt: Make the raptors leashed to the alpha raptor.
Command: data modify entity @e[name="LEASHED_MOB",limit=1] Leash set from entity @e[name="THE_PULLER_MOB",limit=1] {}
1.1 Issue: Raptors can float when leashed. (Example: A cow floating in the air when leashed to a fence)
1.2 Issue: The Raptors can break off lashes. (Not a problem. If you do on entity tick procedures and modify entity data with execute command in the name of entity...)
1.3 Issue: You can see the leash...
---------------------------------------------------
2. Attempt: Make raptors be aggressive to the alpha raptor and do 0 damage.
2.1 Issue: The raptors leap at entities they attack, so it looks weird...
2.2 Issue: Alpha raptors turn red when attacked, even tho raptors do no damage.
---------------------------------------------------
3. Attempt: Do the same thing as the second one, but when the raptors get close to the alpha raptor, they join a team (When entitys are in one team, they don't get aggressive at each other.)
3. Issue: My mod uses a lot of teams (If a mob is in two teams at the same time, they won't work and. The mob will be aggressive...)
---------------------------------------------------
4. Attempt: Teleport raptors to the alpha raptor, when to far.
4.1 Issue: Easy to make. But Visualy it doesn't look natural...
---------------------------------------------------
5. Attempt: (I don know how to recreate this or is this possible. If someone knows, please tell!!) In the AI Goals list, there is a task, wich makes entitys follow their owner. Maybe you can give the "owner" tag to the alpha raptor, so that the raptors would follow him.
5.1 Issue: I don't know if this will work!
---------------------------------------------------
=================================
Extra:
I'll be very happy and thankful if you will give me some hints on how to make entitys follow others. Since its really important (especially for my mod... ). If you can, please send me some visual examples how to do it!
=================================
:)
One option is to set motion vector on tick update depending on the distance from another entity and based on the distance, determine some velocity and calculate the right direction.
I know about the motion vector, but it can be challenging for mobs to get around hilly terrain, they will just bump in to walls and its not very effective...
Thank you for you're answer!
I really don’t know, but let me try it (I am not good at procedures and stuff like that!):
(I think with both my ideas you have to go into code!)
1. Use the follow Person of authority (sorry, I don’t know the actual name of it) and than go into the code and write down with code how is the Person of authority. Like I said, I don’t know if it works!
2. Make the raptor a Baby. I don’t know if this is possible with MCr, cause I learn code at the time, but if you can make a Baby, then do it, because a baby pig for example follows here mom everywhere in Minecraft so it would be a solution!
Hope one of these, and the best if it is the first, will work!
Best wishes Heizer
Sorry I couldn't answer earlier, I was doing my homework..
---------------------------------------------------
1. I get you're idea, but don't know how to implement it. If you can, please show me some visual examples. Im sure it will help!
---------------------------------------------------
2. I did the baby thing way back earlyer, but the thing is that baby automatically have smaller hitbox, lower pich sounds and faster animations. Plus they can't see the parent from to far... I tried changing the FOLLOW_RANGE attribute, but still nothing. So it doesn't work well for me
---------------------------------------------------
Thank you for you're answer!
Did you ever get this to work??
I tested all. But neither of them worked properly. So.. After multiple tests, I found the best way to do it!
Follow this tutorial to make the Raptor follow Alpha_Raptor:
Step1: Make the Raptor aggressive at Alpha Raptor.
----------
Step2: Create a condition, where the Raptor can attack him, ONLY if the Alpha Raptor doesn't exist within 5 block radius(depends on the hitbox scale)
----------
Step3: Change the "Follow_Range" attribute in the Raptors code to prevent him from getting lost.
Done! Hope it helps!
Hi, sorry to distract you, can you show the procedure that is responsible for the possibility of an attack? I would be very happy.
Not at all.
At the end of each AI task, you can put conditions.. (Here is an image of them: https://imgbb.com/MhX0d6N)
Here is an image of the condition written: https://ibb.co/kMmsHTB
thanks
Oh wait.. The code I gave you.. It won't work.
To fix it, try flipping the true and false values.
--------------
If entity exists in area 5 block, return false.
Return true
You can also add a not block . Thanks
Hello, sry...
How do you do so that the raptor does not focus only on following Alpha Raptor? I put it in the lowest priority and still only follows Alpha Raptor instead of attacking the other entities, since he should defend her or help her, not just stare like they kill the Alpha Raptor.
Well.. Had the same problem, while testing. But luckily, I found a way to prevent this!
---------------
At the same condition, add this: https://ibb.co/ZMgdp3y
How do I leash custom mob to player? what tag should I put properly to the CAP area? can you provide sample?