use of xyz.derkades.ublisk.mob.MobCode in project Ublisk by Derkades.
the class Zombie method getMobCode.
@Override
public MobCode getMobCode() {
return new MobCode() {
@Override
public void mobCode(LivingEntity entity) {
// We can safely cast, because this code will only run on zombies
org.bukkit.entity.Zombie zombie = (org.bukkit.entity.Zombie) entity;
// Clear equipment
EntityEquipment equipment = zombie.getEquipment();
ItemStack air = new ItemStack(Material.AIR);
equipment.setBoots(air);
equipment.setLeggings(air);
equipment.setChestplate(air);
equipment.setHelmet(air);
equipment.setItemInMainHand(air);
equipment.setItemInOffHand(air);
zombie.setBaby(isBaby());
}
};
}
Aggregations