Started by
Professor Blue
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to make it so when I right click with an item, I teleport to a specific block.
The main thing I'm stuck with is how to teleport to the block (a security camera)
I already know how to make the view zoom in, I only need to make the player teleport.
Any help greatly appreciated
If the item somehow "connects" to the chosen camera, then you can just store the xyz position in 3 variables, or nbt tags.
Could you send an image maybe?
I'm struggling to understand
Can't really use MCreator currently, sorry.
But the procedures should look somehow like this:
On Item Right Clicked on block:
If block at x,y,z = camera
Set NBT number tag "camera_x" of Item to : x
Set NBT number tag "camera_y" of Item to : y
Set NBT number tag "camera_z" of Item to : z
This should store the position of right clicked block as an item tag.
Then for example:
On Item right clicked in air:
Set player's location to x: [Get NBT number tag "camera_x" of Item]
y: [Get NBT number tag "camera_y" of Item]
z: [Get NBT number tag "camera_z" of Item]
Can't explain any better than that. But if you got any questions I'll look into them.
Is there any global trigger I should use?
First bolded procedure should be used in "On Item right clicked on block" event, second one in "On item right clicked in air".
No extra triggers should be required.
I did everything and it didn't work
Any other suggestions?