Search in sources :

Example 21 with Zombie

use of org.bukkit.entity.Zombie in project Village_Defense by Plajer.

the class ArenaInitializer1_8_R3 method spawnPlayerBuster.

public void spawnPlayerBuster(Random random) {
    Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size() - 1));
    net.minecraft.server.v1_8_R3.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
    PlayerBuster fastZombie = new PlayerBuster(location.getWorld());
    fastZombie.setPosition(location.getX(), location.getY(), location.getZ());
    McWorld.addEntity(fastZombie, CreatureSpawnEvent.SpawnReason.CUSTOM);
    Zombie zombie = (Zombie) fastZombie.getBukkitEntity();
    zombie.getEquipment().setHelmet(new ItemStack(Material.TNT));
    zombie.getEquipment().setHelmetDropChance(0.0F);
    zombie.getEquipment().setItemInHandDropChance(0F);
    zombie.getEquipment().setBoots(new ItemStack(Material.GOLD_BOOTS));
    zombie.getEquipment().setLeggings(new ItemStack(Material.GOLD_LEGGINGS));
    zombie.getEquipment().setChestplate(new ItemStack(Material.GOLD_CHESTPLATE));
    CreatureUtils.applyHealthBar(zombie);
    this.addZombie(zombie);
    CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
    super.subtractZombiesToSpawn();
}
Also used : HardZombie(pl.plajer.villagedefense3.creatures.v1_8_R3.HardZombie) Zombie(org.bukkit.entity.Zombie) FastZombie(pl.plajer.villagedefense3.creatures.v1_8_R3.FastZombie) BabyZombie(pl.plajer.villagedefense3.creatures.v1_8_R3.BabyZombie) TankerZombie(pl.plajer.villagedefense3.creatures.v1_8_R3.TankerZombie) ItemStack(org.bukkit.inventory.ItemStack) CraftWorld(org.bukkit.craftbukkit.v1_8_R3.CraftWorld) PlayerBuster(pl.plajer.villagedefense3.creatures.v1_8_R3.PlayerBuster) Location(org.bukkit.Location)

Example 22 with Zombie

use of org.bukkit.entity.Zombie in project Village_Defense by Plajer.

the class ArenaInitializer1_8_R3 method spawnHardZombie.

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

Example 23 with Zombie

use of org.bukkit.entity.Zombie in project Village_Defense by Plajer.

the class ArenaInitializer1_9_R1 method spawnHardZombie.

public void spawnHardZombie(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.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);
    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 24 with Zombie

use of org.bukkit.entity.Zombie in project Village_Defense by Plajer.

the class ArenaInitializer1_9_R1 method spawnFastZombie.

public void spawnFastZombie(Random random) {
    Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size() - 1));
    net.minecraft.server.v1_9_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();
}
Also used : FastZombie(pl.plajer.villagedefense3.creatures.v1_9_R1.FastZombie) 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) CraftWorld(org.bukkit.craftbukkit.v1_9_R1.CraftWorld) Location(org.bukkit.Location)

Example 25 with Zombie

use of org.bukkit.entity.Zombie in project Village_Defense by Plajer.

the class ArenaInitializer1_9_R1 method spawnBabyZombie.

public void spawnBabyZombie(Random random) {
    Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size() - 1));
    net.minecraft.server.v1_9_R1.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
    BabyZombie fastZombie = new BabyZombie(location.getWorld());
    fastZombie.setPosition(location.getX(), location.getY(), location.getZ());
    Zombie zombie = (Zombie) fastZombie.getBukkitEntity();
    CreatureUtils.applyHealthBar(zombie);
    zombie.setRemoveWhenFarAway(false);
    McWorld.addEntity(fastZombie, CreatureSpawnEvent.SpawnReason.CUSTOM);
    this.addZombie((Zombie) fastZombie.getBukkitEntity());
    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) BabyZombie(pl.plajer.villagedefense3.creatures.v1_9_R1.BabyZombie) CraftWorld(org.bukkit.craftbukkit.v1_9_R1.CraftWorld) Location(org.bukkit.Location)

Aggregations

Zombie (org.bukkit.entity.Zombie)56 Location (org.bukkit.Location)39 ItemStack (org.bukkit.inventory.ItemStack)27 Player (org.bukkit.entity.Player)12 Entity (org.bukkit.entity.Entity)10 LivingEntity (org.bukkit.entity.LivingEntity)9 CraftWorld (org.bukkit.craftbukkit.v1_11_R1.CraftWorld)8 CraftWorld (org.bukkit.craftbukkit.v1_12_R1.CraftWorld)8 CraftWorld (org.bukkit.craftbukkit.v1_8_R3.CraftWorld)8 CraftWorld (org.bukkit.craftbukkit.v1_9_R1.CraftWorld)8 Ageable (org.bukkit.entity.Ageable)8 BabyZombie (pl.plajer.villagedefense3.creatures.v1_11_R1.BabyZombie)8 FastZombie (pl.plajer.villagedefense3.creatures.v1_11_R1.FastZombie)8 HardZombie (pl.plajer.villagedefense3.creatures.v1_11_R1.HardZombie)8 TankerZombie (pl.plajer.villagedefense3.creatures.v1_11_R1.TankerZombie)8 BabyZombie (pl.plajer.villagedefense3.creatures.v1_12_R1.BabyZombie)8 FastZombie (pl.plajer.villagedefense3.creatures.v1_12_R1.FastZombie)8 HardZombie (pl.plajer.villagedefense3.creatures.v1_12_R1.HardZombie)8 TankerZombie (pl.plajer.villagedefense3.creatures.v1_12_R1.TankerZombie)8 BabyZombie (pl.plajer.villagedefense3.creatures.v1_8_R3.BabyZombie)8