Started by
TotoUmbertoch72
on
Topic category: Help with Minecraft modding (Java Edition)
hi,
I have a problem : I am trying to make a custom mob that is very similar to a ghast : same model, same size, and shoots fireballs. But when i choose the ghast default model, the mob is smaller than a ghast ( it's size is 1 block ). And for the fireballs, even tho i selected fireball as the item the mob throw, it acts like an arrow but with a fireball texture, so not very useful. ( and the arrow shoots from the air up the mob, i don't know how to resolve that. ) Thanks to anyone that has some answers
TotoUmbertoch72
I don't know how to fix the size, but I do have a solution for the fireballs.
Make a custom ranged item. The settings don't matter.
For "on projectile tick update," make a procedure "set location of [immediate source entity] to [x] [-70] [z].
Then, run command "/kill @s" in the name of the immediate source entity.
Then, use the projectile blocks. Drag a shoot from entity block in and set it to a fireball. Set the shooter to "event/target entity" both in the shoot block and on the projectile block.
What this procedure does is, whenever one of the custom item's projectiles is in the world, it deletes it and shoots a ghast fireball from the shooter instead.
If I did it right, this should result in the ranged item shooting a ghast fireball in the direction you're facing if you use it.
Now, make your custom mob use this ranged item for its attacks. Hopefully there is no MCreator weirdness and that works just fine.
If it does not, I have a Plan B. Make a procedure "on entity tick update." Set global trigger to "on loaded entity tick update." Put and if "target entity is (sub) type of <your custom entity>".
Drag the procedure template "Strike lightning every 10th time procedure is called (for entities)." Replace the strike lightning part with the shoot block used in the first procedure I suggested. Remember to set the shooter to target entity.
This will, by default, make it fire these at two times a second. That's probably a bit excessive, so you can adjust the rate of fire by changing the "10" in the MOD operation. 10 makes it run every 10 ticks, or half a second. 20 would make it run every second. Multiples of 20 get larger times.
If neither of those worked, send a reply.
Thanks for you help! I used plan A and had problems at the beginning (the fireballs were spammed indefinitely), but after some logic i solved that. The ghast shoots fireballs at the ennemy at the wanted rate and all, but theres a catch : when the ghast start firing fireballs, every other fireballs in the "attack" (aggro on a mob by the ghast) are shot in the same direction, independently of where the ghast is looking. (it shoots to the same place from the beginning to the end of the attack). Hope there is a solution and thanks in advance.
@COMMANDO66 here's the mention so you get the notification ( i forgot )
I really need help, please someone help me
Is it okay if we put the template "make entity shoot a fireball" in the shoot section of Plan B ?