use of pl.plajer.villagedefense3.creatures.v1_11_R1.FastZombie in project Village_Defense by Plajer.
the class ArenaInitializer1_11_R1 method spawnFastZombie.
public void spawnFastZombie(Random random) {
Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size()));
net.minecraft.server.v1_11_R1.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
FastZombie fastZombie = new FastZombie(location.getWorld());
fastZombie.setPosition(location.getX(), location.getY(), location.getZ());
McWorld.addEntity(fastZombie, CreatureSpawnEvent.SpawnReason.CUSTOM);
Zombie zombie = (Zombie) fastZombie.getBukkitEntity();
zombie.setRemoveWhenFarAway(false);
CreatureUtils.applyHealthBar(zombie);
this.addZombie((Zombie) fastZombie.getBukkitEntity());
CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
super.subtractZombiesToSpawn();
}
use of pl.plajer.villagedefense3.creatures.v1_11_R1.FastZombie in project Village_Defense by Plajer.
the class ArenaInitializer1_11_R1 method spawnSoftHardZombie.
@Override
public void spawnSoftHardZombie(Random random) {
Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size()));
net.minecraft.server.v1_11_R1.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
HardZombie fastZombie = new HardZombie(location.getWorld());
fastZombie.setPosition(location.getX(), location.getY(), location.getZ());
McWorld.addEntity(fastZombie, CreatureSpawnEvent.SpawnReason.CUSTOM);
Zombie zombie = (Zombie) fastZombie.getBukkitEntity();
zombie.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));
zombie.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));
zombie.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));
zombie.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));
zombie.setRemoveWhenFarAway(false);
CreatureUtils.applyHealthBar(zombie);
CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
this.addZombie(zombie);
super.subtractZombiesToSpawn();
}
Aggregations