Always teleport on block edge

Started by YourNightmxre on

Topic category: Help with modding (Java Edition)

Last seen on 14:32, 23. Oct 2022
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Always teleport on block edge
Thu, 06/23/2022 - 21:41 (edited)

Hello,

Im currently working on a mod that among other things adds the ability to set a home and teleport to it,

Everything works except for the fact that when you teleport it teleports you on the edge of the block.

I don´t know whats causing it or how to fix it, please help.

https://imgur.com/a/66YFw7T

 

Edited by YourNightmxre on Thu, 06/23/2022 - 21:41
Last seen on 07:34, 25. Oct 2023
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello there,  I think that…
Fri, 06/24/2022 - 07:25

Hello there, 

I think that if you want to make it teleport to the center, you should set the coordinate to X+0.5 and Z+0.5. Here is the example that I try base on your original one.

https://ibb.co/CJHS94w

Anyway, hope this helps and good luck on your mod.

Last seen on 14:32, 23. Oct 2022
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks tuonkhung, it works…
Fri, 06/24/2022 - 13:05

Thanks tuonkhung, it works now :)