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)

Active 2 years ago
Joined Sep 2019
Points:
884

User statistics:

  • Modifications: 0
  • Forum topics: 40
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 115
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? 

Active 3 years ago
Joined Jun 2016
Points:
3742

User statistics:

  • Modifications: 10
  • Forum topics: 39
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5492
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

Active 2 years ago
Joined Sep 2019
Points:
884

User statistics:

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

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

Active 3 years ago
Joined Jun 2016
Points:
3742

User statistics:

  • Modifications: 10
  • Forum topics: 39
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5492
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