Attempt at fixing super zombies again.

devAnvil
sigonasr2 11 years ago
parent 15a67d4836
commit fd55550308
  1. 16
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java

@ -6725,20 +6725,30 @@ public ItemStack getGoodie() {
if (l instanceof Player) { if (l instanceof Player) {
e.setDamage(e.getDamage()*1.45d); e.setDamage(e.getDamage()*1.45d);
if (e.getDamager() instanceof Wither) { if (e.getDamager() instanceof Wither) {
if (Math.random()<=0.25) { if (Math.random()<=0.75) {
l.getWorld().spawnEntity(l.getLocation(), EntityType.CREEPER); l.getWorld().spawnEntity(l.getLocation(), EntityType.CREEPER);
l.getWorld().spawnEntity(l.getLocation(), EntityType.ZOMBIE);
} }
} }
} }
if (e.getEntity() instanceof Wither) { if (e.getEntity() instanceof Wither) {
e.setDamage(e.getDamage()*0.2d); e.setDamage(e.getDamage()*0.075d);
}
if (e.getEntity().getType()==EntityType.ZOMBIE) {
Zombie z = (Zombie)e.getEntity();
if (z.getCustomName()==null && z.getMaxHealth()>65) {
//If it's a normal zombie with too much HP, something wrong. Lower it.
z.setMaxHealth(65);
z.setHealth(z.getMaxHealth());
}
} }
if (e.getDamager() instanceof Projectile) { if (e.getDamager() instanceof Projectile) {
Projectile pp = (Projectile)(e.getDamager()); Projectile pp = (Projectile)(e.getDamager());
if (pp.getShooter() instanceof Player && l instanceof Wither) { if (pp.getShooter() instanceof Player && l instanceof Wither) {
Player p = (Player)(pp.getShooter()); Player p = (Player)(pp.getShooter());
if (Math.random()<=0.25) { if (Math.random()<=0.75) {
l.getWorld().spawnEntity(pp.getLocation(), EntityType.CREEPER); l.getWorld().spawnEntity(pp.getLocation(), EntityType.CREEPER);
l.getWorld().spawnEntity(l.getLocation(), EntityType.ZOMBIE);
} }
} }
} }

Loading…
Cancel
Save