3

Help With Getting to Custom Dimensions

3 emeralds7 replies62 views
Flashbulb started 04/07/2021 1:55 pm
HoboMaggot replied 04/09/2021 10:44 pm
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.
Posted by avatar
Flashbulb
Level 31 : Artisan Fish
22

Create an account or sign in to comment.

7 replies

3
04/07/2021 10:57 pmhistory
Level 39 : Artisan Blob
HoboMaggot
HoboMaggot avatar
Pretty sure you can do:
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
04/08/2021 7:13 amhistory
Level 31 : Artisan Fish
Flashbulb
Flashbulb avatar
Ok, thanks, now how do I do a check?
3
04/08/2021 7:41 am
Level 39 : Artisan Blob
HoboMaggot
HoboMaggot avatar
You'll need to put an dditional tag to stop your tp commands:
/execute in fsb:server as @a[nbt={SelectedItem:{id:"minecraft:red_mushroom_block",Count:1b}}] run tag @s add no_tp_fbs_serverand then dont run the command for players with that tag

Otherwise you'll have to check the player nbt for the specific dimension you're in, using
/data get entity @s Dimensionwhile you're in the dimension, and basically do the same thing as above

For the 2nd option you dont need the tag, because you can do an execute unless with the player and their specific nbt
2
04/08/2021 4:00 pmhistory
Level 31 : Artisan Fish
Flashbulb
Flashbulb avatar
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
3
04/08/2021 10:21 pm
Level 39 : Artisan Blob
HoboMaggot
HoboMaggot avatar
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.
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 syntax
2
04/09/2021 1:41 pm
Level 31 : Artisan Fish
Flashbulb
Flashbulb avatar
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.
Planet Minecraft Logo

Website

© 2010 - 2021
www.planetminecraft.com

Welcome