Search in sources :

Example 6 with HardZombie

use of pl.plajer.villagedefense3.creatures.v1_12_R1.HardZombie in project Village_Defense by Plajer.

the class ArenaInitializer1_9_R1 method spawnSoftHardZombie.

@Override
public void spawnSoftHardZombie(Random random) {
    Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size() - 1));
    net.minecraft.server.v1_9_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);
    this.addZombie(zombie);
    CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
    super.subtractZombiesToSpawn();
}
Also used : TankerZombie(pl.plajer.villagedefense3.creatures.v1_9_R1.TankerZombie) Zombie(org.bukkit.entity.Zombie) FastZombie(pl.plajer.villagedefense3.creatures.v1_9_R1.FastZombie) BabyZombie(pl.plajer.villagedefense3.creatures.v1_9_R1.BabyZombie) HardZombie(pl.plajer.villagedefense3.creatures.v1_9_R1.HardZombie) ItemStack(org.bukkit.inventory.ItemStack) CraftWorld(org.bukkit.craftbukkit.v1_9_R1.CraftWorld) Location(org.bukkit.Location) HardZombie(pl.plajer.villagedefense3.creatures.v1_9_R1.HardZombie)

Example 7 with HardZombie

use of pl.plajer.villagedefense3.creatures.v1_12_R1.HardZombie in project Village_Defense by Plajer.

the class ArenaInitializer1_11_R1 method spawnHardZombie.

public void spawnHardZombie(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.DIAMOND_BOOTS));
    zombie.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
    zombie.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
    zombie.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));
    zombie.setRemoveWhenFarAway(false);
    CreatureUtils.applyHealthBar(zombie);
    CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
    this.addZombie(zombie);
    super.subtractZombiesToSpawn();
}
Also used : Zombie(org.bukkit.entity.Zombie) TankerZombie(pl.plajer.villagedefense3.creatures.v1_11_R1.TankerZombie) HardZombie(pl.plajer.villagedefense3.creatures.v1_11_R1.HardZombie) BabyZombie(pl.plajer.villagedefense3.creatures.v1_11_R1.BabyZombie) FastZombie(pl.plajer.villagedefense3.creatures.v1_11_R1.FastZombie) ItemStack(org.bukkit.inventory.ItemStack) CraftWorld(org.bukkit.craftbukkit.v1_11_R1.CraftWorld) Location(org.bukkit.Location) HardZombie(pl.plajer.villagedefense3.creatures.v1_11_R1.HardZombie)

Example 8 with HardZombie

use of pl.plajer.villagedefense3.creatures.v1_12_R1.HardZombie 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();
}
Also used : Zombie(org.bukkit.entity.Zombie) TankerZombie(pl.plajer.villagedefense3.creatures.v1_11_R1.TankerZombie) HardZombie(pl.plajer.villagedefense3.creatures.v1_11_R1.HardZombie) BabyZombie(pl.plajer.villagedefense3.creatures.v1_11_R1.BabyZombie) FastZombie(pl.plajer.villagedefense3.creatures.v1_11_R1.FastZombie) ItemStack(org.bukkit.inventory.ItemStack) CraftWorld(org.bukkit.craftbukkit.v1_11_R1.CraftWorld) Location(org.bukkit.Location) HardZombie(pl.plajer.villagedefense3.creatures.v1_11_R1.HardZombie)

Aggregations

Location (org.bukkit.Location)8 Zombie (org.bukkit.entity.Zombie)8 ItemStack (org.bukkit.inventory.ItemStack)8 CraftWorld (org.bukkit.craftbukkit.v1_11_R1.CraftWorld)2 CraftWorld (org.bukkit.craftbukkit.v1_12_R1.CraftWorld)2 CraftWorld (org.bukkit.craftbukkit.v1_8_R3.CraftWorld)2 CraftWorld (org.bukkit.craftbukkit.v1_9_R1.CraftWorld)2 BabyZombie (pl.plajer.villagedefense3.creatures.v1_11_R1.BabyZombie)2 FastZombie (pl.plajer.villagedefense3.creatures.v1_11_R1.FastZombie)2 HardZombie (pl.plajer.villagedefense3.creatures.v1_11_R1.HardZombie)2 TankerZombie (pl.plajer.villagedefense3.creatures.v1_11_R1.TankerZombie)2 BabyZombie (pl.plajer.villagedefense3.creatures.v1_12_R1.BabyZombie)2 FastZombie (pl.plajer.villagedefense3.creatures.v1_12_R1.FastZombie)2 HardZombie (pl.plajer.villagedefense3.creatures.v1_12_R1.HardZombie)2 TankerZombie (pl.plajer.villagedefense3.creatures.v1_12_R1.TankerZombie)2 BabyZombie (pl.plajer.villagedefense3.creatures.v1_8_R3.BabyZombie)2 FastZombie (pl.plajer.villagedefense3.creatures.v1_8_R3.FastZombie)2 HardZombie (pl.plajer.villagedefense3.creatures.v1_8_R3.HardZombie)2 TankerZombie (pl.plajer.villagedefense3.creatures.v1_8_R3.TankerZombie)2 BabyZombie (pl.plajer.villagedefense3.creatures.v1_9_R1.BabyZombie)2