Is it possible to pull player towards location?

Started by MrFesli on Mon, 07/26/2021 - 13:51

Topic category: Help with modding (Java Edition)

Last seen on 13:12, 22. Sep 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Is it possible to pull player towards location?
Mon, 07/26/2021 - 13:51

Is it possible to pull player towards location? I need it for a mod.

Last seen on 10:00, 15. Aug 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
This is a concept/pseudocode…
Mon, 07/26/2021 - 15:24

This is a concept/pseudocode, maybe you could implement it via code or via the code blocks.

loop [
      double targetX, targetY, targetZ
      check if (player position == targetX, targetY, targetZ) if not [
          set_player_position(targetX += 0.5, targetY += 0.5, targetZ += 0.5)
      ]
]

 

Last seen on 13:12, 22. Sep 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
ok thanks  
Fri, 08/20/2021 - 04:14

ok thanks