[REQ] Eye of Ender finds players instead of strongholds [FORMATTED]

Discussion in 'Archived: Plugin Requests' started by mushroomhostage, Mar 18, 2012.

  1. Offline

    mushroomhostage

    Plugin category: MECH

    Suggested names: PlayerFinder+, PlayerLocator, PlayerTracker, BaseFinder, EyeOfPlayer, YouCantHide

    A bit about me: I recently became interested in "apocalypse/solitude" style servers, which are loosely defined as random spawn + local chat. Players start off alone and cannot talk to anyone, it is up to them to make progress on their own and/or seek out other players if they choose… or other potentially hostile players may find them too, whether or not they want to be found. However, on a large (16,000 x 16,000) map, it is fairly easy to hide underground and avoid other players. This plugin could change that.

    What I want: When an Eye of Ender is thrown, it should float towards the nearest player, instead of floating towards the nearest stronghold.

    To preserve the stronghold-finding ability of Eye of Ender, the player-finding ability could be activated only when holding shift when right-clicking, or only when left-clicking.

    To allow teaming up, the eye could only track other players not visible to the throwing player, or only track players beyond a configurable distance.

    If possible, the plugin should be posted on BukkitDev, open source under a permissive license, and continually updated for new builds.

    Ideas for commands: None needed

    Ideas for permissions: None needed

    When I'd like it by: Whenever possible.

    Similar plugin requests: Yes, the same idea was requested by 8 year old on 2012/01/14 here, but it seems to have morphed into a compass-based player tracking plugin. That's cool too, but I'm already using the compass for too many other purposes already, so I'm still interested in a Eye of Ender based tracking plugin. Also, I had a lot of fun locating strongholds using Eyes of Ender – plus, being crafted from blaze powder + ender pearls, only showing the general direction of the target, and having a chance to expire when thrown makes Eyes of Ender very well balanced.
     
    uyuyuy99 likes this.
  2. Offline

    mushroomhostage

    Anyone have any comments on the feasibility of this request?
     
  3. Offline

    ArcheCane

    I don't know if there's even an Event for that... if there was it surely would be possible... I think.
     
  4. Offline

    fromgate

    Nice idea, but I'm not sure it possible now...
     
  5. Offline

    mushroomhostage

    [/list]
    Maybe not… but what of these approaches?

    • Mod CraftBukkit to send an event on Eye of Ender throws (this means the plugin would require a custom build until the change is accepted, but that's okay with me..)
    • Use the Java reflection API to hook into the net.minecraft.server methods and alter the throwing action
    • Change the stronghold location as perceived by the Eye of Ender code so it automatically tracks the nearest player instead

    Anyone know if any of these are feasible?
     
  6. Offline

    uyuyuy99

    I could give this a shot. I'm on vacation though, so I can't start it for about 10 days. I'll let you know if I make any progress, though.

    - uyu
     
    mushroomhostage likes this.
  7. Offline

    uyuyuy99

    Hmm, would you be ok with ender pearls following players instead of eyes? Their original teleport ability is kinda useless, and I can disable the teleporting if you want.
     
  8. Offline

    mushroomhostage

    Well, that could be cool, too, but I really liked the idea of using Eyes of Ender, they seem to be more balanced than Enderpearls themselves, since you also have to go to The Nether and find a fortress and kill a blaze versus merely finding an (albeit rare) Enderman. Also enderpearls can be useful for negotiating rough terrain or for quick escapes or offensive tactical purposes during PvP, I rarely use them but they do come in handy some times. On the other hand Eyes of Ender are basically only useful for finding the strongholds, and there's only three per map, so especially after they are discovered their utility is limited.

    Hows it looking from a technical implementation perspective? Would using eyes be more difficult than pearls? I haven't looked into this too much myself but they are both just entities right?
     
  9. Offline

    uyuyuy99

    Well, that's why I'm not using eyes of ender; there is no entity for ender eyes, but there is for ender pearls. Also, when an ender eye is thrown, it does not register as an EntityLaunchEvent, while ender pearls do - so as far as I can tell, there is no way of knowing when an eye is thrown, or getting the entity for that matter.

    One solution is to make it so that when an ender eye is left clicked, delete that eye from the player's inventory and create a non-teleporting ender pearl projectile that floats towards the nearest player.

    Just so you know, I've finished making ender pearls float toward the nearest online player. The next steps are to make a config file with a configurable teaming-up distance, and to implement the above solution if you agree with it.
     
  10. Offline

    mushroomhostage

    Awesome, that's great progress! Looking forward to it, I think using thrown pearl entities would be fine as a starting point. Maybe it could be changed to use eyes later once the rest of the pieces are in place, I'd be willing to give it a shot if you post the source :). There is an entity for thrown ender eyes: entity ID 15 from http://www.minecraftwiki.net/wiki/Data_values#Entity_IDs , but it looks like Bukkit doesn't have a corresponding wrapper class for some reason..
     
  11. Offline

    mushroomhostage

    uyuyuy99 any update, mind releasing what you have so far? I could try to update it to use Eyes of Ender.. in my tests I was able to spawn them by hand.
     
  12. Offline

    mushroomhostage

    uyuyuy99, more specifically I was able to spawn using SilkSpawners.. which spawns entities manually, by ID instead of class. So I think I could change your code to thrown eyes of ender, if you wouldn't mind posting it :)
     

Share This Page