How to make flying mob that gonna shoot fireballs or enderballs, or mob that gonna teleport sometimes like enderman

Started by RedCorr on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make flying mob that gonna shoot fireballs or enderballs, or mob that gonna teleport sometimes like enderman

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? 

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To make the mob shoot…
Tue, 02/25/2020 - 15:13

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

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oof, thank you very much! Im…
Tue, 02/25/2020 - 19:37

Oof, thank you very much!
Im appreciating that you helping me X)

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No problem! Anyway, I forgot…
Tue, 02/25/2020 - 22:57

No problem!

Anyway, I forgot to say you should also check if the block under the teleport destination is not air