LikeABoss hooked-in natively #14


  • Enhancment
  • Accepted
Open
Assigned to feildmaster
  • _ForgeUser4439668 created this issue May 1, 2012

    What is the enhancement in mind? How should it look and feel?
    I was wondering if you would be interested in hooking this into likeaboss so that the custom experience control can stay with controlorble, and support more xp for bosses.

    So that in the config a new section would be:
    likeaboss: true/false (false default)
    monster-boss:
      Blaze: 20
      CaveSpider: 10
      Creeper: 10
      Enderman: 10
      EnderDragon: 40000
      Ghast: 10
      Giant: 10
      MagmaCube: 10
      PigZombie: 10
      Silverfish: 10
      Skeleton: 10
      Slime: 2
      Spider: 10
      Wolf: 10
      Zombie: 10

    (or whatever you want for values... this is just an example)

    Please provide any additional information below.

  • _ForgeUser4439668 added the tags New Enhancment May 1, 2012
  • feildmaster posted a comment May 10, 2012

    I usually don't make plugins that hook into other plugins... But would you know if they have a simple way of detecting if a monster is a boss?

  • feildmaster removed a tag New May 10, 2012
  • feildmaster added a tag Waiting May 10, 2012
  • _ForgeUser4439668 posted a comment Jun 2, 2012

    They must have because several other plugins have adapted likeaboss compatibility.

    mobhealth is a good example

  • _ForgeUser4439668 removed a tag Waiting Jun 2, 2012
  • _ForgeUser4439668 added a tag Replied Jun 2, 2012
  • _ForgeUser6968460 posted a comment Jun 16, 2012

    @feildmaster: Go

    More or less, you have to retrieve the Likeaboss instance, then call "instance".getBossManager().getBoss(LivingEntity), however it may change in the future. getBoss() returns null if the entity provided isn't a boss.

    You'll probably want to check if an entity is a boss after an EntityDeathEvent, but your listener's priority must be higher than "NORMAL" because bosses are also removed on this event.

    There's a custom event if you prefer (cam.event.BossDeathEvent) but I'm not sure if it's convenient enough. The original EntityDeathEvent isn't canceled (of course, since that isn't possible) so you would have to deal with both events, usually it requires more work.

    If you have any question feel free to send me a PM, I could even add a proper API if you think it's needed (like, static methods, maybe?).


    Edited Jun 16, 2012
  • feildmaster posted a comment Jun 20, 2012

    I'll see what I can do... I have an interesting idea for something like this.

  • feildmaster removed a tag Replied Jun 20, 2012
  • feildmaster added a tag Accepted Jun 20, 2012
  • feildmaster posted a comment Feb 18, 2013

    This will have to wait until the version 3.0 update.


To post a comment, please login or register a new account.