how to make mobs move only on one axis

Started by FoliageMarker on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make mobs move only on one axis

so im making like a goomba from mario in minecraft and i want to make it so when it spawns it only moves left on whatever axis the player is facing when it gets spawned, so if the player is facing east or west the goomba can only move in those two directions, and if the player is facing north or south it can only move in those two directions. i have no clue how to do this please help i dont know how to do it im a new mod creator