Multiverse-NetherPortals

Multiverse-NetherPortals

689k Downloads

End Portal Not Teleporting to THE END spawn

dawninginnovations opened this issue ยท 6 comments

commented

I'm beginning to wonder if I am missing something obvious. I have a second world with both a nether and the_end versions. Creating nether portals works fine and follows scaling rules. However, when an end portal is opened, players are teleported to the same location as that in the fromWorld, rather than using the default Notch behavior of spawn near the dragon. (0,64,0), or so. If I disable NetherPortals, the end portal works as expected.

I took a closer look at the source to see if I was missing some important configuration option. As it stands, the onPlayerPortal gets a linkedWorld of null and drops down to the last else condition. From there because it is an end portal and nameChecker does find the_end world getNewTeleportLocation moves forward and teleports the player. Instead, it would be nice to shortcircuit getNewTeleportLocation and let the onPlayerPortal event take its natural course down the event chain so that Notches default behavior is fired up.

Right now my only work around is to disable NetherPortal. Unfortunately, that limit me to having a single Nether for the main world, but at least The End comes up for either world.

commented

I had an idea. While this may not be the most gallant way of doing this, at least this way, if there is no linked world defined for the_end, the onPlayerPortal will just do its default thing. If I specifically link the_end in the configuration file, then normal scaling and the rest applies.

    if (type == PortalType.END) {
        if (linkedWorld != null)
            this.linkChecker.getNewTeleportLocation(event, currentLocation,
                    linkedWorld);
        else
            return;   // do default portal to The End
    } else {
        if (linkedWorld != null) {
            this.linkChecker.getNewTeleportLocation(event, currentLocation,
                    linkedWorld);
        } else if (this.nameChecker.isValidNetherName(currentWorld)) {
            this.linkChecker.getNewTeleportLocation(event, currentLocation,
                    this.nameChecker.getNormalName(currentWorld));
        } else {
            this.linkChecker.getNewTeleportLocation(event, currentLocation,
                    this.nameChecker.getNetherName(currentWorld));
        }
    }
commented

Aye. I've wanted better end support for some time. I'm still on a holiday (github issues for iPhone ftw) but would love to read a pull request for this when I get back :)

commented

I solute this putting 10000 ratio to the end

commented

That's a clever temporary fix. Nice one umarth! Does it work the other way also?

commented

same here