[SOLVED] Procedure where player looks

Started by Mars33311 on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Jun 2020
Points:
653

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 34
[SOLVED] Procedure where player looks
Mon, 08/17/2020 - 10:49 (edited)

In my mod I want stuff like player teleporting where they looks and explosions there they look but don't know how. I have searched on the website about thing like raytrace but I realised if I, say, made the player move 5 blocks in their x raytrace, it means that they would be teleporting backwards or sideways if they are facing like z or away from x. This also means that if the player is looking partially up or down they still will only go in one direction. I am really stumped and don't know how to code. Please help or add a new feature in the procedure maker! 

Edited by Mars33311 on Mon, 08/17/2020 - 10:49
Active 3 years ago
Joined Nov 2019
Points:
877

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 384
when using the raytrace…
Wed, 07/29/2020 - 08:28

when using the raytrace function, use all 3 coordinates together. for example, do something like this: move target entity to (look X position of target entity), (look Y pos...), (look Z pos...). this will move your target entity to where they are looking.

Active 4 years ago
Joined Jun 2020
Points:
653

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 34
Sorry but I still don't…
Thu, 07/30/2020 - 06:57

Sorry but I still don't understand. Can you show me a picture of what you are trying to say, and I am pretty sure that it only works in one angle.

Active 4 years ago
Joined Jun 2020
Points:
653

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 34
Does x mean directly in…
Tue, 08/11/2020 - 09:52

Does x mean directly in front of the player, and z the right of the player no matter where they look? Because my understanding of it is that they are more like North and East. If so, I do not know how one can do it.

Active 4 years ago
Joined Jun 2020
Points:
653

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 58
X = right, Y = up, Z = front…
Tue, 08/11/2020 - 10:22

X = right, Y = up, Z = front

look X is basically what's to the side of the player's vision, look Y is what's above the player's vision, and Z is what's in front of the player's vision

combining these gets you the coordinate of the block you're looking at

(Teleport target entity to (look X) (look Y) (look Z))

Active 4 years ago
Joined Jun 2020
Points:
653

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 34
Oh, thank you very much!  
Thu, 08/13/2020 - 06:38

Oh, thank you very much!

 

Active 11 months ago
Joined Apr 2015
Points:
1029

User statistics:

  • Modifications: 0
  • Forum topics: 51
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 117
Is there a way to set a max…
Tue, 10/27/2020 - 05:20

Is there a way to set a max distance?

Active 4 years ago
Joined Jun 2020
Points:
653

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 34
hurn, if say the range if 5,…
Wed, 11/18/2020 - 07:28

hurn, if say the range if 5, I am thinking of checking if the block 5 blocks away from you is air, and if false, then check with the fourth, and so on

Active 4 years ago
Joined Dec 2019
Points:
965

User statistics:

  • Modifications: 1
  • Forum topics: 36
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 263
hey uh how do you MAKE this…
Fri, 12/04/2020 - 19:48

hey uh how do you MAKE this though

Active 9 months ago
Joined Aug 2020
Points:
714

User statistics:

  • Modifications: 0
  • Forum topics: 18
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 21
Yeah, I don't really…
Mon, 06/07/2021 - 21:20

Yeah, I don't really understand how to do it either.

Active 10 months ago
Joined Dec 2017
Points:
1038

User statistics:

  • Modifications: 3
  • Forum topics: 50
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 138
Can u also make it so that a…
Fri, 07/09/2021 - 18:43

Can u also make it so that a procedure gets triggered if you rightclick on one side of a block not the whole block but only a 16x16x8 slab-sized section

Active 3 years ago
Joined Jan 2021
Points:
593

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
I can't find the "move…
Mon, 07/19/2021 - 17:57

I can't find the "move provided entity" block.

Active 3 years ago
Joined Nov 2021
Points:
501

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
Ressurection, I hape Strykz…
Thu, 12/09/2021 - 19:38

Ressurection, I hape Strykz problem, i can't find the block