[INACTIVE][TP] Nether v1.2 (2.0 in progress) - Super-Simple Nether Portals [1000]

Discussion in 'Inactive/Unsupported Plugins' started by SpaceManiac, Feb 14, 2011.

  1. Offline

    SpaceManiac

    Nether - Super-Simple Nether Portals
    Version: v1.2
    Tested on: should work on all RBs 450+; tested on 766. DOES NOT work on 1060.

    I'm updating Nether very soon to work on 1060+ and also adding some nifty new features!

    I use Bukkit, but have no plugins except a bit of my own tinkering installed. When multiworlds came out I decided that the denizens of my server could use some Nether action, but every plugin I could find came with too many frills, so I wrote up a simple one to use. There is no configuration and no commands. Figured I'd post it here in case somebody found it useful. It's basically designed to be used when you just want to add a classic Nether to your currently single-world server.

    Features:
    • World coordinates are scaled 8x like in single player.
    • No configuration, commands, or persistent storage - drop and go!
    • Teleportation is smooth and usually lag-free (especially when the chunks on the other side are already loaded)
    • Portals are auto-created when teleporting through a new portal, carving a small cavern and placing a platform if needed.
    • Dying in the Nether teleports you back to the Earth spawn!
    Known Issues:
    • Portal frames are not detected, only active portals, so if you try to portal through to an inactive portal, a new portal might be generated a few blocks off.
    • Both sides of a portal must be uncovered or there is a risk of suffocation when teleporting in.
    • The area carved around new portals can sometimes cut into existing structures if you're not careful, though this is unlikely.
    • Ghast noises can still be heard on Earth in some cases (Bukkit bug).
    Download: Nether v1.2
    Source code: GitHub (MIT License)

    Changelog:
    Version 1.2 (April 13)
    • Portals no longer make a giant platform and air bubble and instead seek vertically for a suitable location (thanks Acru).
    • The Nether world name is now configurable (thanks Acru).
    • The Nether world is now loaded on startup instead of first portal use.
    Version 1.1 (February 25)
    • Removed some vestigial debugging methods.
    • Dying in the Nether now respawns players on Earth.
    • Fixed TSLPC.
    Version 1.0 (February 15)
    • Initial release.
     
  2. Offline

    RchGrav

    Boot to the head. lol.
     
  3. Offline

    alexander_q

    Whoever is first through the portal fails to update the visibility of subsequent visitors through the portal, and thus they remain invisible for the duration. Can anyone confirm this bug?

    Keep up the good work.

    "Also, To emulate SSP portals, can you get it to generate only the portal itself and a small (2 block) ledge of obisidian if in air and avoid the large pocket of air it creates? That could rip into existing structures decently and minimizing the pocket it creates not only emulates SSP but minimizes potential damage..."

    I think it would be ideal if one had to right-click to activate the portals. Then you could spawn them inside the portal structure itself, and then you'd not need to carve out any area or build any platforms at all.
     
  4. Offline

    EdGruberman

    I was going to be all slick and figure github out and fork, and send you a pull request and all that jazz. Then I suddenly realized I'm not a programmer and ran screaming in pain after msysgit and TortoisGit threatened to rape me.

    However, I did manage to figure Eclipse out and test this out... maybe you can make use of it if you want.
    In NetherPortal.java I changed the portal generation code to only clear out a 2x3x3 space of air and only generate the small obsidian ledges on either side if the blocks were air. Might be smarter to detect if blocks are more than the safe fall distance or something like that, but I figure this is simple enough right now and gets closer to simulating SSP.
    Code:
            // Define area directly in front of and behind portal
            ArrayList<Block> columns = new ArrayList<Block>();
            columns.add(world.getBlockAt(x, 0, z));
            columns.add(world.getBlockAt(x, 0, z + 1));
            columns.add(world.getBlockAt(x, 0, z - 1));
            columns.add(world.getBlockAt(x + 1, 0, z));
            columns.add(world.getBlockAt(x + 1, 0, z + 1));
            columns.add(world.getBlockAt(x + 1, 0, z - 1));
    
            // Clear area directly in front of and behind portal
            for (Block col : columns) {
                // Obsidian base ledge if air
                if (world.getBlockAt(col.getX(), y - 1, col.getZ()).getType().equals(Material.AIR)) {
                    world.getBlockAt(col.getX(), y - 1, col.getZ()).setType(Material.OBSIDIAN);
                }
                for (int yd = 0; yd <= 2; ++yd) {
                    world.getBlockAt(col.getX(), y + yd, col.getZ()).setType(Material.AIR);
                }
            }
    Also I think you are missing an import in NetherPlayerListener.java
    Code:
    import org.bukkit.event.player.PlayerRespawnEvent;
    Eclipse was complaining and adding this line made it stop.

    Thank you for motivating me to try goofing around with plugins. I've been a long time wannabe programmer (I started on TurboBasic and TurboPascal. Eventually moved into VB6. I've spent more time than I care to admit with VBS. Now, I'm learning PowerShell and VB.NET). And although I've toyed very lightly with C++ and C# I only know enough to know I don't know anything. Java scares me. Your plugin motivates me.

    Again, Thank you! I look forward to your updates and the ability to complain to you more! :)
     
  5. Offline

    Shados

    Start from here and you'll be fine :p. Git's workflow is indeed much nicer overall.
     
  6. Offline

    DamnMersault

    I'd like to see the ability to change the world/directory name for the nether world. I'm running across a few other tools that make assumptions about the naming convention for the nether.
     
  7. Offline

    Joshf

    Two problems with me

    I can still hear all the nether monsters once I am back in the real world,and see them floating.
    As someone said before,if you die you spawn in a random place in the nether,and if someone tries to teleport you out,you suffocate. Making you basically lost in the nether
     
  8. Offline

    ZaroSath

    i think i'll use this, thanks.
     
  9. Offline

    Realityshow

    Hm, is the plugin broken? It want work on my server :(
     
  10. Offline

    SpaceManiac

    Ladies and gentlemen, I give you the new official build of Nether v1.1:
    Nether.jar - tested against CraftBukkit 450, will definitely work on 1.3 builds, should work on earlier.

    Precise fixes are detailed in first post (basically just respawning and such). I'll get to work on some of the other improvements when I can.
     
  11. Offline

    DIENER

  12. Offline

    alexander_q

    From where can I obtain 450? The wiki only links to 454 and 458
     
  13. Offline

    DIENER

  14. Offline

    SpaceManiac

    @alexander_q You don't need 450 precisely in all likelihood, it's just what I was able to test against.
     
  15. Offline

    alexander_q

    [BUG] If you die in the nether, after you respawn you cannot successfully break blocks (they regenerate), and dropped items are invisible to you. Logging out and in again fixes this problem.

    Using 450
     
  16. Offline

    nonentity

    I'm not sure if this is a bug or if I'm just doing something wrong, but after the first portal I created, any further portals I make don't work. If I stop and start the server, the new portals start working - but then, any further portals after that point don't work, until I stop and restart.

    Tested on both craftbukkit 450 and 445, and tested with no other plugins enabled.
     
  17. Offline

    RchGrav

    Dude.. you sound like me.. haha...

    Btw... Ed Gruberman = Just wanna beat people up w/ Tai Kwan Leep? Lol (Boot to the head?)

    I might be dating myself with that reference.

    Rich
     
  18. Offline

    WegFetZ

    Thank you for sharing this great plugin with us!

    There is only one thing that could make it even
    more awesome: being able to go through portals while sitting in a minecart :D
    Do you think it is possible to do this?
     
  19. Offline

    DIENER

    That is not possible until Notch make it possible and I don't think he will because in SSP you need to stay in the portal a few seconds before getting teleported.
     
  20. Offline

    SpaceManiac

    Actually, depending on how well CraftBukkit handles vehicle teleportation, it could be almost trivial.
     
  21. Offline

    alexander_q

    It would be better if it generated the chunks you were standing on straight away, and then worked its way out. Then you could start moving almost straight away after entering a portal
     
  22. Offline

    EdGruberman

    This is a core Bukkit issue I believe they are working on.
     
  23. Offline

    nonentity

    I made a separate server and reproduced my problem with multiple portals... and then, after several teleports and some dying, things suddenly started working for me. I thought for a little while that it might have been because I went a much farther distance before making another portal, but testing gave me two working portals next to each other. So this seems to be a really inconsistent issue.

    I am also seeing the issue of not being able to break blocks after respawn in the normal world. Making a trip to the nether and back also solves this.
     
  24. Offline

    EdGruberman

    The block breaking problem is also going to be a core Bukkit issue (might also be a Minecraft Beta 1.3 issue itself) actually. I'm unclear. But I do know this plugin itself isn't doing anything related to letting a player break a block or not.
     
  25. Offline

    nonentity

    Certainly could be.. I haven't had the time to try digging into the code of either bukkit or the plugin, so I've just been testing as many combinations as I can think of. I can clear it up both with by using a portal to the nether and back, and by using the essentials /world command to teleport there and back. So it seems like it's directly related to respawning in a different world.
     
  26. Offline

    BlueJayofEvil

    Is there a way to turn off mob spawning in the netherworld? I used the WorldEdit /butcher command (several times, repeatedly) but they just keep spawning. I have monsters and animals turned off in my server.properties, and I tried loading the netherworld with those settings and saved it, but when loading from my normal world it still spawns mobs. Is there a way around this?

    EDIT: Using CrowdControl helps disable the Nether mobs.
     
  27. Offline

    dakotahawkins

    I forked the project and sent a pull request, hopefully to have some improvements integrated into Nether. No real functional changes (except portals in the normal world can be closer together now), but hopefully I've sped up the search on either side for portals that already exist. I've also added orientation awareness so any portal created will be created with the same orientation as the portal you stepped through. I think I forgot to mention that in the pull request.

    https://github.com/SpaceManiac/Nether/pull/1
     
  28. Offline

    EdGruberman

    Awesome to see some more collaboration on this effort.

    I do like your solution @dakotahawkins. Though, it does make me wonder what the exact SP implementation is. Does anyone have how SP portals work documented in detail anywhere? I'm curious to put effort into defining logic that mimics SP as close as possible.

    (I'm jealous that you are using github LOL. I've gotta to put a bit more effort into figuring that out I guess. I sent @SpaceManiac a few source files I modified that allows using any name for either nether or normal worlds through a plugin.properties file.)
     
  29. Offline

    dakotahawkins

    @EdGruberman, yeah, I have no idea about that. I haven't played SP since my friends set up a SMP server a while back. I had an idea that portals in the nether should be created as soon as you create the portals in the normal world, however one of my friends told me that's not how they work in single player, they also wait until you step through them.

    I agree about git, last night I messed it up so badly between git and eclipse that today I just deleted that fork and re-forked. I'm used to different tools at work, I guess.

    If anybody's curious to test my version, it has the latest changes from Nether and is available here: https://github.com/downloads/dakotahawkins/Nether/NetherNude.jar
    --- merged: Feb 27, 2011 4:05 AM ---
    It appears that in single player there is not such an exact correlation between nether space and world space. I have yet to get a portal to generate in the air or too near to lava or water, and I can move my portal in the nether several blocks yet it still ports to my original portal in the normal world.

    I'm not sure how easily we could replicate this logic. There would have to be some rule that if you were going to be put into a dangerous place, go a certain direction until you found a safe location for the portal. Likewise it may be worthwhile or necessary to expand the valid search areas in the nether and normal world to something more like whatever they are in SP.

    I suspect in SP there is some persistence helping map the portals to one another. Since for this plugin that is undesired, we may have to come up with some novel strategies to replicate SP behavior more closely.
     
  30. Offline

    Xon

    Heads up, onPlayerTeleport & multiworld support. The event doesn't correctly populate the 'to' world correctly.

    Here is a dump of grabbing; PlayerMoveEvent.getFrom().getWorld().getName();
    12:46:48 [INFO] Xon portals to normal world
    12:46:48 [INFO] from:netherworld,-2,0
    12:46:48 [INFO] to:netherworld,-9,4

    Changing how you try to call getWorld() doesn't appear to matter. I need to figure out how to use yet another bug reporting system to figure out how to file this one.

    The reason I've posting this, is I think I'm mostly done with a plugin which detects when a player teleports between chunks and then tags both chunks as linked. So it will prevent Minecraft from unloading one side of a portal if someone is near the other side as well as load all linked chunks when a player gets near to a tagged chunk. There is some code which ignores when a player teleports right next to a player to filter out false positives, but it needs more work before it can handle private warp points correctly.

    Basically, making the chunk cache respect non-euclidean geometry.
     
  31. if a obsidian block is removed the portal is visually deactivated, but stepping through still takes me to the nether!
     

Share This Page