Posted April 25, 20214 yr Hi, Currently I am trying to change the player's dimension on right click by doing: "context.getPlayer().changeDimension([Nether Server World goes here])" which I know this is based upon PlayerEntity and context.getPlayer() just calls the PlayerEntity... It's just that the problem is, this is as far I've got and I've tried to use RegistryKeys but I've given up on that and I am thinking of using the ITeleporter after using the context: level and I've using that but my game just crashes. Please help. What do I do? Edited April 26, 20214 yr by Noxxous
April 26, 20214 yr Author I'm thinking of downgrading to 1.15 since there was more information. Should I do this?
April 26, 20214 yr 1 hour ago, DietmarKracht said: There is a player#teleport method. Where is this method? I cannot find a class called player anywhere, and PlayerEntity only seems to have teleportTo, teleportWithTicket, and randomTeleport methods. Thanks!
April 26, 20214 yr 3 hours ago, Ugdhar said: Where is this method? I cannot find a class called player anywhere, and PlayerEntity only seems to have teleportTo, teleportWithTicket, and randomTeleport methods. if you are using the latest version, the most methods have new names because minecraft has switched to the official mojang mappings you can use the bot on the forge discord server to get the names for the methods
April 27, 20214 yr It is teleportTo iirc. Check the parameters. Though you need a serverworld as the targetworld
April 28, 20214 yr Author 14 hours ago, DietmarKracht said: It is teleportTo iirc. Check the parameters. Though you need a serverworld as the targetworld Ok, but how do you find the ServerWorld of the target dimension? I'm having the same problem with Change Dimension except I can't find any class that is associated with any Dimension, and I want to use a custom dimension (using datapack) so I would probably need to the codec but then that's just a RegistryKey so a completely different instance and probably a method from what I remember and I can't think of any terms to find the Dimension class Edited April 28, 20214 yr by Noxxous
April 28, 20214 yr You need to get the MinecraftServer from a ServerPlayer first. Then use MinecraftServer#getWorld and use the target world registry key. You can find the vanilla registry keys in the World.class
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.