Started by
braelin777
on
Topic category: Help with Minecraft modding (Java Edition)
Hey guys! Hope everyone is having a good night or day! I'm having a lil problem with my mob. So he's a flying boss mob, with a blaze mob base. Long story short I want to make him shoot faster, and maybe make the fireballs explode on impact. I did some tests, and blazes shoot 3 fireballs at once every 8-9 seconds, and I want my mob to fire one per 2 seconds or something like that. I've been tryna mess around with procedures and events for 4 hours now, to no avail. Anyone wanna help? Thanks in advance.
entity bases make the mob kinda act like the base mob in every way, so you should avoid using them if you don't want to make an exact copy of the blaze, create your own AI with procedures that spawn fireballs to your liking
i’m not to skilled with procedures tho. mind helpin me out? 😅😅 like could you please provide me with like a basic guide procedure that i could change values in and build off of?
Pretty much, there's a few ways to go about this. The first way is to make it randomly shoot every 2 seconds on average. So what I mean is kinda like this:
We know there's 20 ticks in a second, so if you want it to shoot every 2 seconds, that's once per 40 ticks. So we can use the random 0~1 procedure, and make this procedure in the "on entity update tick" trigger:
If pick random 0~1<0.025 then
Shoot [custom fireball] as event/target entity
Each tick, the mob has a 2.5% chance of shooting a fireball, or one in 40. So with that procedure, it'll randomly shoot on average every 2 seconds.
The second way is to make it shoot every exactly two seconds. First, make a global world number variable called "Current tick". It's default value should be 0. You're gonna make a procedure for every tick in the world that goes like this:
Change current tick by 1
If current tick>20 then
set current tick to 1
A pretty easy procedure. Again, it's a global tick procedure, not an entity tick procedure. Now, for the "on entity tick update":
If Current Tick = 20 then
Shoot [custom fireball] as event/target entity
This procedure should also work, and this time, it's not randomized, the custom blaze mobs will shoot every 2 seconds exactly.
So those are the two ways, one is a randomized fireball it shoots every 2 seconds on average, and the second way shoots exactly every two seconds.
i’ll try it tomorrow after school bro! thanks so much i’ll let ya know how it goes :D
i can’t find the shoot fireball block bro :(
also how do i make the arrows (im using arrows for testing but ill figure out how to make them fireballs later) actualy shoot AT the player? bc right now they just fire in what ever direction he's looking in, but not actualy AT the player, like a blaze man or skeleton does. Heres some screenshots, and the procedure.
im having alot of trouble bro :( could u show me a screenshot of the finished procedure so i can copy it please? i cant get this to work bro
Maybe in the entity ai, you could get it to look at players?
how tho :( im sorry for being so dumb lmao im kinda new to mob ai
guys?
In target tasks you will find the block: watch closest entity. In the basic tasks, you will find "Look Around". Make sure to put the watch closest entity(set radius and type to whatever you want) over the look around block, so your mob will be looking and shooting at a certain entity. Use multiple watch closest entity if needed.
okay i’ll try that tomorrow bro and ill lyk how it goes :) how do i make it actually shoot FIREBALLS tho? bc the thing the dude above said only lets me pick between my custom ranged weapons, and arrow. no fireballs (like a blaze)
You're gonna need to make a ranged item. Then use the shoot ranged item procedure block to make your mob shoot fireballs. So really just make a ranged items and replace the arrows in the procedure block with your custom ranged item projectile.