Changing a mobs knockback resistance

Discussion in 'Plugin Development' started by TheMintyMate, Dec 30, 2014.

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

    TheMintyMate

    I have recently had a play with NMS, and therefore changed mobs speeds, attack damage e.t.c
    After taking a look in GenericAttributes I noticed this:
    Code:
    public static final IAttribute c = (new AttributeRanged("generic.knockbackResistance", 0.0D, 0.0D, 1.0D)).a("Knockback Resistance");
    
    I have tried unsuccessfully to change this IAttribute. Anyone got any suggestions?

    Thanks,
    - Minty :)
     
  2. Offline

    TheMintyMate

    Bumpity Bumpity Boo

    Bumpity Bumpity Boo #2

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
  3. Offline

    TheMintyMate

    Bump
    __________________________________________________________

    I guess Ill ask on Spigot's forums. they seem to have more activity...
    - Minty
     
  4. Offline

    AlphaRLee

    MC 1.7.10, you can edit a mob's attribute under it's aD() method, rather than changing the whole definition
    Code:
    this.getAttributeInstance(GenericAttributes.c).setValue(/*value*/D);
    In MC 1.7.9 (my version), it's called aC() instead of aD().
     
    TheMintyMate likes this.
  5. Offline

    TheMintyMate

    @AlphaRLee
    Thanks :) Ill give it a go shortly :)
    - Minty
     
Thread Status:
Not open for further replies.

Share This Page