Started by
Multavit
on
Topic category: Help with Minecraft modding (Java Edition)
Hi, I want to make a special arrow that spawns 2-5 milk bottles (new item) near a cow whenever I hit it using the special arrow. Right now I’m thinking of making a procedure that activates when it hits a mob, but I don’t know the thingies to specify a cow and to drop milk. Help please?
You’ll want to trigger the procedure using the trigger in the arrow element for when it hits a mob. Make the procedure check for a cow by using and “If” block and a “Event Target Entity is mob” block in the if block condition. Then, in the if block output, put a repeat block and make the condition an math based “+” block with a “1” in the second slot and round block in the first slot. In the round block, place a “times by” block with a “4” in the second slot and a “random (0,1)” block in the first slot. Place a “Spawn Gem” block in the repeat block output and set the item to spawn to “Milk Bottle” and leave the positions to X, Y and Z.
Thanks!
Sorry if this seems stupid, but where is the if block? Can’t find it
all if blocks are stored in the "flow control" category
sorry to bother you, I'm horrible at this. Could you please send a picture of all the blocks hunterben talked about and where to find them? thanks.
I am on 2021.1 version by the way.
oh, sorry for the delay... but yeah, it's not too easy visualizing procedures or representing them in plain text, especially when some maths are involved, so here I visualized it in the procedure system to save you time! the procedure should look like this:
here's where each one can be found just for convenience:
Omg thanks, big help. No idea why I couldn’t see repeat before, I checked flow control 5 times XD