Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.TideFactions.CustomMobD;
- import org.bukkit.entity.Zombie;
- import org.bukkit.potion.PotionEffect;
- import org.bukkit.potion.PotionEffectType;
- import net.md_5.bungee.api.ChatColor;
- import net.minecraft.server.v1_8_R3.EntityPlayer;
- import net.minecraft.server.v1_8_R3.EntityZombie;
- import net.minecraft.server.v1_8_R3.PathfinderGoalNearestAttackableTarget;
- import net.minecraft.server.v1_8_R3.World;
- public class CustomZombie extends EntityZombie{
- public CustomZombie(World world) {
- super(world);
- Zombie craftZombie = (Zombie) this.getBukkitEntity();
- PotionEffect effect = new PotionEffect(PotionEffectType.FIRE_RESISTANCE, Integer.MAX_VALUE, 1);
- craftZombie.addPotionEffect(effect);
- craftZombie.setMaxHealth(50.0);
- craftZombie.setHealth(50.0);
- craftZombie.setCustomName(ChatColor.RED + "ZombieMam@");
- craftZombie.setCustomNameVisible(true);
- this.targetSelector.a(0, new PathfinderGoalNearestAttackableTarget<EntityPlayer>(this, EntityPlayer.class, true));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement