3
Help With Getting to Custom Dimensions
So I made three dimensions: fsb:cave, fsb:server, and fsb:lush. (Lame names I know), and I want it so that when a person holds a mushroom block they are teleported to the server dimension, if they hold an oak leaf block they are teleported to the lush dimension, and if they hold a diamond ore block they are teleported to the cave dimension. I want them to get teleported when they hold it in off hand too. I also want it so that when they hold a nautilus shell they are teleported back to the overworld.
I also need it multiplayer compatible.
Thanks.
I also need it multiplayer compatible.
Thanks.
Create an account or sign in to comment.
7
3
Pretty sure you can do:
This will teleport you to your dimension when you're holding a red mushroom block. Just replace the block with an item of your choice and the fbs:server with the namespace and dimension.
if you dont want the item to spam teleport commands when you're in that dimension, youll have to implement a check to see if the player is in the specific dimension
execute as @a[nbt={SelectedItem:{id:"minecraft:red_mushroom_block",Count:1b}}] at @s in fsb:server run tp @s ~ ~ ~
This will teleport you to your dimension when you're holding a red mushroom block. Just replace the block with an item of your choice and the fbs:server with the namespace and dimension.
if you dont want the item to spam teleport commands when you're in that dimension, youll have to implement a check to see if the player is in the specific dimension
2
Ok, thanks, now how do I do a check?
3
You'll need to put an dditional tag to stop your tp commands:
Otherwise you'll have to check the player nbt for the specific dimension you're in, using
For the 2nd option you dont need the tag, because you can do an execute unless with the player and their specific nbt
/execute in fsb:server as @a[nbt={SelectedItem:{id:"minecraft:red_mushroom_block",Count:1b}}] run tag @s add no_tp_fbs_server
and then dont run the command for players with that tagOtherwise you'll have to check the player nbt for the specific dimension you're in, using
/data get entity @s Dimension
while you're in the dimension, and basically do the same thing as aboveFor the 2nd option you dont need the tag, because you can do an execute unless with the player and their specific nbt
2
I put the main teleport command in my datapack and it gives the following error message:
Failed to load function fsb:tick
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Incorrect argument for command at position 115: ...leport @s <--[HERE]
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1584)
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1574)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Incorrect argument for command at position 115: ...leport @s <--[HERE]
at cy.a(SourceFile:62)
at vw.a(SourceFile:86)
at vw$$Lambda$3983/903763736.get(Unknown Source)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1582)
... 5 more
Failed to load function fsb:tick
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Incorrect argument for command at position 115: ...leport @s <--[HERE]
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1584)
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1574)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Incorrect argument for command at position 115: ...leport @s <--[HERE]
at cy.a(SourceFile:62)
at vw.a(SourceFile:86)
at vw$$Lambda$3983/903763736.get(Unknown Source)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1582)
... 5 more
3
Minecraft thinks its a syntax error.
Can you double check the full command you used?
Because this command I did worked while in the overworld and tped me to the nether.
Can you double check the full command you used?
Because this command I did worked while in the overworld and tped me to the nether.
execute as @a in minecraft:overworld run tp @s ~ ~ ~
And it cant be the custom dimension because the error only picked up the teleport command syntax2
So I got the execute command working, but it teleports me when I select the item/block. I want it so that it is in your off hand it will teleport the player.
view more replies ( 1 )