Armor Defense Ratings

Discussion in 'Plugin Development' started by savagesun, Jun 25, 2013.

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

    savagesun

    So, what I was trying to accomplish previously was to change the armor ratings in minecraft by listening to the EntityDamageByEntityEvent. My first though was just set the damage done in the event to whatever it was initially minus the modification value of the armor. Sadly it doesn't seem to be that easy. When I do this it "works" but not in the way I want it to. When being attacked and the damage is say: 1, and I subtract 1 from that the damage becomes zero making any sort of low level attacks do no damage whatsoever. My question is: how would I calculate a modification value to change the damage done to a player in a manner befitting the current vanilla armor defense system? Should I be listening to a different event? Or perhaps there is no real way to do this? Any input is appreciated, thanks in advance!
     
  2. Offline

    Morrango

    I was thinking you could just change the scale of everything. Multiply everything's MaxHealth and Damage by 100. You would have to listen to every event involving hit points or damage and add one line of code multiplying it.
     
  3. Offline

    savagesun

    I don't think that would work out too well. You would just have to scale the numbers back down eventually, and wouldn't that just leave us with the same issue?
     
  4. Offline

    Morrango

    What reason would you have to scale it down for?
     
Thread Status:
Not open for further replies.

Share This Page