Started by
a_random_dev1
on
Topic category: Help with Minecraft modding (Java Edition)
I am very new to modding, and I am trying to make an enemy that can shoot fireballs. Can anyone help me with this?
Topic category: Help with Minecraft modding (Java Edition)
I am very new to modding, and I am trying to make an enemy that can shoot fireballs. Can anyone help me with this?
Either create a custom projectile fireball, then go to the entity, ai and goals, top right, use ranged attacks and select your custom fireball from the list. This is the easier option as you can copy the vanilla fireball texture and values to emulate it.
Otherwise you will need to use a procedure on tick update, get the x y z of the entity being targeted for attack. Then fire a fireball projectile with vx vy vz being the difference in values between your entitys x y z and the targets x y z. You can also use look angle x y z components instead and may be better/easier. Then use an nbt or synced data number tag to countdown a cooldown. Each tick -1 from the cooldown tag. If cooldown=0 fire the fireball as above. Then set cooldown to 120 or so, 20 ticks = 1 second.