Switch boss health from ints to doubles - fixes "Health must be between" bugs for bosses.

This commit is contained in:
garbagemule 2014-08-01 20:01:52 +02:00
parent ebbc069128
commit 7766260154
3 changed files with 3 additions and 3 deletions

View File

@ -177,7 +177,7 @@ public class MASpawnThread implements Runnable
switch (w.getType()){
case BOSS:
BossWave bw = (BossWave) w;
int maxHealth = bw.getMaxHealth(playerCount);
double maxHealth = bw.getMaxHealth(playerCount);
MABoss boss = monsterManager.addBoss(e, maxHealth);
boss.setReward(bw.getReward());
bw.addMABoss(boss);

View File

@ -160,7 +160,7 @@ public class MonsterManager
return suppliers.get(e);
}
public MABoss addBoss(LivingEntity e, int maxHealth) {
public MABoss addBoss(LivingEntity e, double maxHealth) {
MABoss b = new MABoss(e, maxHealth);
bosses.put(e, b);
return b;

View File

@ -14,7 +14,7 @@ public class MABoss
* @param entity an entity
* @param maxHealth a max health value
*/
public MABoss(LivingEntity entity, int maxHealth) {
public MABoss(LivingEntity entity, double maxHealth) {
entity.setMaxHealth(maxHealth);
entity.setHealth(maxHealth);
this.entity = entity;