Solved NMS Damage help needed

Discussion in 'Plugin Development' started by Cryices, Sep 24, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Cryices

    Hello bukkit community,
    I'm trying to damage an EntityLiving[instance(class)] with armor calculated in. In the class I see the d(DamageSource, float) but I can never find where that traces back to.
    Code:
          if (!d(damagesource, f - this.lastDamage)) {
            return false;
          }
    and that's at line 675 of EntityLiving.class. Also when you do player.damage(amount, player), that sends off the EntityDamageEvent event and I need to bypass this for the plugin I'm working on. Any help would be much appreciated. If you need to look at it, just decompile craftbukkit :p Maybe I could be doing this all wrong?, any suggestions on how I could do this?

    So what I need is a way to damage the player while calculating in armor, and it can't set off any of the damage events. Also it would be preferred if the way that armor gets calculated in uses nms. I'm look ing for an nms class method I believe?
     
  2. Offline

    bennie3211

    you can get the given damage, and multiply it with some value that can be found on the wiki for all armor types.
     
  3. Offline

    fireblast709

  4. Offline

    Cryices

    Edit: (it doesn't let my edit my message btw) I was looking at the craftbukkit 1.6.4 version -_-, I'll update you when I change my code to make it work for 1.7.10
     
Thread Status:
Not open for further replies.

Share This Page