Started by
Mars33311
on
Topic category: Help with Minecraft modding (Java Edition)
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
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.
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.
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.
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))
Oh, thank you very much!
Is there a way to set a max distance?
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
hey uh how do you MAKE this though
Yeah, I don't really understand how to do it either.
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
I can't find the "move provided entity" block.
Ressurection, I hape Strykz problem, i can't find the block