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 tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

×
×
  • Create New...

Important Information

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