Jump to content

Recommended Posts

Posted

Did you try looking at the vanilla code for the Nether or End portal and associated Teleporter? I bet those would have what you need.

Already tested it back in 1.8.9, does not work.

They do it with entity.setInPortal or so, but that's teleports you in the vanilla dimension. And this method just sets a boolean

to true and the rest is done in the Entity itself.

Developer of Primeval Forest.

Posted

You didn't follow the rabbit-hole far enough - eventually it should lead you to the ConfigurationManager or whatever the class is that you get from playerMp.mcServer.getConfigurationManager(), which has some nifty methods for interdimensional travel. I use it in 1.8.0, but it may well be named something different now.

Posted

Hm, I still can't figure out how I have to do it now in Minecraft 1.9.

 

But after looking deeper into the code I know that the class which will be returned from getConfigurationManager seems to be gone in 1.9, atleast it does no longer exists in the package and in the MinecraftServer class.

 

So any idea?

Developer of Primeval Forest.

Posted

So the method #getConfigurationManager still exists, but its return type (class) doesn't? O.o

 

I have neither Eclipse nor a 1.9 workspace on this computer, but if the method exists, its return type must exist. You can use your IDE to search, open call and type hierarchies, or just ctrl-click your way through classes and methods until you get there, but you should be able to find it.

 

The method in particular that I have used was called #transferPlayerToDimension

Posted

ServerConfigurationManager

was renamed to

PlayerList

.

 

You can see other name changes in 1.9 by searching here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

If you are still wondering here's an example I made.

if(!event.getEntityLiving().worldObj.isRemote){
				EntityPlayerMP player = (EntityPlayerMP) event.getEntityLiving();
                if (player.timeUntilPortal > 0) {
                    player.timeUntilPortal = 10;
                } else if (player.dimension != ModConfig.DIMENSION_ID) {
                    player.timeUntilPortal = 10;
                    player.mcServer.getPlayerList().transferPlayerToDimension(player, ModConfig.DIMENSION_ID, new TeleporterCustom(player.mcServer.worldServerForDimension(ModConfig.DIMENSION_ID)));
                } else if (player.dimension == ModConfig.DIMENSION_ID) {
                    player.timeUntilPortal = 10;
                    player.mcServer.getPlayerList().transferPlayerToDimension(player, 0, new TeleporterCustom(player.mcServer.worldServerForDimension(0)));
                }
}

Posted

Ok, thx. I'll test it out. Oh and anyone who got an idea how to let entities travel through dimensions, like tamed wolves, untamed wolves, Zombies and all of that stuff?

Developer of Primeval Forest.

  • 5 months later...
Posted

I have a code to transfere entities. I did not tested .

entityIn.getServer().getPlayerList().tranferEntityToDimension(entityIn, worldIn.provider.getDimensionType().getId(), entityIn.getServer().worldServerForDimension(worldIn.getDimensionType().getId(), entityIn.getServer().worldServerForDimension(The dimension Id), new The teleporter(entityIn.getServer().worldServerForDimension(The dimension Id))))

Posted

I have a code to transfere entities. I did not tested .

entityIn.getServer().getPlayerList().tranferEntityToDimension(entityIn, worldIn.provider.getDimensionType().getId(), entityIn.getServer().worldServerForDimension(worldIn.getDimensionType().getId(), entityIn.getServer().worldServerForDimension(The dimension Id), new The teleporter(entityIn.getServer().worldServerForDimension(The dimension Id))))

Good for you, it's just that this thread is over 6 months old, and there's no need to reply to that.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I need to know what mod is doing this crash, i mean the mod xenon is doing the crash but i want to know who mod is incompatible with xenon, but please i need to know a solution if i need to replace xenon, i cant use optifine anymore and all the other mods i tried(sodium, lithium, vulkan, etc) doesn't work, it crash the game.
    • I have been trying to solve a consistent crashing issue on my brother's computer where it will crash during the "Scanning Mod Candidates" phase of the loading process that starts when you click the play button on the Minecraft launcher. The issue seems to stem from a missing library that it mentions in the log file I provide below. I might I'm missing the bigger issue here for a smaller one but hopefully someone can find what I'm missing. Here's all of the stuff that I've been able to figure out so far: 1. It has nothing to do with mods, the crash happened with a real modpack, and even when I made a custom modpack and launched it without putting ANY mods into it (That is where the log file comes from by the way). 2. I have tried to find this class like a file in the Minecraft folders, but I've had no luck finding it (I don't think it works like that, but since I really don't understand how it works, I just figured I'd try). 3. I haven't seen anyone else have this issue before. 4. I know that my modpack (with mods) does work since I've run it on my computer, and it works fantastic. For some reason my brother's computer can't seem to run anything through curseforge. 5. This is for Minecraft version 1.20.1, Minecraft launcher version 3.4.50-2.1.3, forge 47.3.0, and curseforge app version 1.256.0.21056 6. My brother is using a Dell laptop from 6 years ago running Windows 10 (If you think more info on this would help, please ask as I do have it. I'm just choosing not to put it here for now). 7. I have reinstalled the curseforge app and installed Minecraft version 1.20.1. I have not reinstalled Minecraft or forge 47.3.0 but I didn't know if that would help. 8. I had an error code of 1 Please let me know if there is anything else that I am missing that you would like me to add to this post/add in a comment! Lastly, many thanks in advance to whoever can help! ------------- LOG FILE (latest.log) ------------- (from /Users/<NAME OF USER>/cursforge/minecraft/Instances/<THE NAME OF MY EMPTY MODPACK>/logs/latest.log) (This was made after running an empty modpack with same versions for all apps) ("[REDACTED]" is not the actual text from the log, it is me replacing text I figured wouldn't be necessary for fixing and would hurt my privacy) https://pastebin.com/hxXvGGEK ------------- DEBUG.LOG (I realized that I should have put this here first after I had done all of the work on putting latest.log in) -------------------- (again, "[REDACTED]" is not the actual text from the log, it is me replacing text I figured wouldn't be necessary for fixing and would hurt my privacy) https://pastebin.com/Fmh8GHYs
    • Pastebin... https://pastebin.com/Y3iZ85L5   Brand new profile, does not point to a mod as far as I can tell, my fatal message just has something about mixins. Don't know much about reading logs like this, but am genuinely stuck, please help. Java updated, pc restarted.
    • I was playing minecraft, forge 47.3.0 and 1.20.1, but when i tried to play minecraft now only crashes, i need help please. here is the crash report: https://securelogger.net/files/e6640a4f-9ed0-4acc-8d06-2e500c77aaaf.txt
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.