Started by
RedCorr
on
Topic category: Help with Minecraft modding (Java Edition)
I want to make some variations of my of ideas to minecraft, and i just trying to do some mobs that gonna fly and shoot something to player.
Or even that like Endermans, gonna sometimes teleport somewhere.
Can i make that with your help?
To make the mob shoot projectiles there is a box for that in the AI tab while making a mob. You can't customise the projectile much though
To make it randomly teleport, you could make a procedure which happens every tick and looks like this:
If NOT is provided world client :
-If (get entity nbt variable <teleportcooldown>) > 100:
--Set <local:teleportx> to [(Random × 10) - 5] + x
--Set <local:teleporty> to [(Random × 10) - 5] + y
--Set <local:teleportz> to [(Random × 10) - 5] + z
---If (is air at <local:teleport x>, <local:teleporty>, <local:teleportz>) AND (is air at <local: teleportx>, (<local:teleporty> + 1), <local: teleportz>)
----Teleport entity to <local:teleportx>,<local:teleporty>,<local:teleportz>
----Set entity nbt variable <teleportcooldown> to 0
-Else:
Set entity nbt variable <teleportcooldown> to (get entity nbt variable <teleportcooldown>) + [round(Random × 4)]
I know it's kinda messy but it took a while to be written XD
Oof, thank you very much!
Im appreciating that you helping me X)
No problem!
Anyway, I forgot to say you should also check if the block under the teleport destination is not air