use of org.bukkit.craftbukkit.v1_18_R1.CraftWorld in project Village_Defense by Plajer.
the class ArenaInitializer1_12_R1 method spawnHalfInvisibleZombie.
@Override
public void spawnHalfInvisibleZombie(Random random) {
Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size()));
net.minecraft.server.v1_12_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);
zombie.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));
zombie.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1));
CreatureUtils.applyHealthBar(zombie);
this.addZombie((Zombie) fastZombie.getBukkitEntity());
CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
super.subtractZombiesToSpawn();
}
use of org.bukkit.craftbukkit.v1_18_R1.CraftWorld in project Village_Defense by Plajer.
the class ArenaInitializer1_12_R1 method spawnGolemBuster.
public void spawnGolemBuster(Random random) {
Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size()));
net.minecraft.server.v1_12_R1.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
GolemBuster fastZombie = new GolemBuster(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.setRemoveWhenFarAway(false);
CreatureUtils.applyHealthBar(zombie);
this.addZombie(zombie);
CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
super.subtractZombiesToSpawn();
}
use of org.bukkit.craftbukkit.v1_18_R1.CraftWorld in project Village_Defense by Plajer.
the class ArenaInitializer1_12_R1 method spawnVillager.
public void spawnVillager(Location location) {
net.minecraft.server.v1_12_R1.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
RidableVillager ridableVillager = new RidableVillager(location.getWorld());
ridableVillager.setPosition(location.getX(), location.getY(), location.getZ());
McWorld.addEntity(ridableVillager, CreatureSpawnEvent.SpawnReason.CUSTOM);
Villager villager = (Villager) ridableVillager.getBukkitEntity();
villager.setRemoveWhenFarAway(false);
this.addVillager((Villager) ridableVillager.getBukkitEntity());
CreatureUtils.applyMetadata(ridableVillager.getBukkitEntity(), this);
}
use of org.bukkit.craftbukkit.v1_18_R1.CraftWorld in project Village_Defense by Plajer.
the class ArenaInitializer1_12_R1 method spawnFastZombie.
public void spawnFastZombie(Random random) {
Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size()));
net.minecraft.server.v1_12_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 org.bukkit.craftbukkit.v1_18_R1.CraftWorld in project Village_Defense by Plajer.
the class ArenaInitializer1_12_R1 method spawnBabyZombie.
public void spawnBabyZombie(Random random) {
Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size()));
net.minecraft.server.v1_12_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();
}
Aggregations