mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-23 11:06:14 +01:00
Switch boss health from ints to doubles - fixes "Health must be between" bugs for bosses.
This commit is contained in:
parent
ebbc069128
commit
7766260154
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user