Class Mob

java.lang.Object
  extended by BaseEntity
      extended by LivingEntity
          extended by Mob

public class Mob
extends LivingEntity

Mob.java - Interface for mobs


Constructor Summary
Constructor and Description
Mob(mj locallb)
          Creates a mob interface
Mob(java.lang.String mob)
          Creates a mob interface
Mob(java.lang.String mobName, Location location)
          Creates a mob interface
 
Method Summary
Modifier and Type Method and Description
 void dropLoot()
          Drops this mob's loot.
 mj getMob()
          Returns the actual mob
 java.lang.String getName()
          Returns this mob's name
static boolean isValid(java.lang.String mob)
          Checks to see if the mob is a valid mob
 void setHealth(int health)
          Sets the entity's health.
 void spawn()
          Spawns this mob
 void spawn(Mob rider)
          Spawns this mob with a rider
 
Methods inherited from class LivingEntity
getBaseNoDamageTicks, getDeathTicks, getEntity, getHealth, getLastDamage, increaseHealth, setBaseNoDamageTicks, setDeathTicks, setLastDamage
 
Methods inherited from class BaseEntity
getAirTicks, getBaseAirTicks, getFireTicks, getId, getNoDamageTicks, getPitch, getPlayer, getRotation, getX, getY, getZ, isAnimal, isLiving, isMob, isPlayer, setAirTicks, setBaseAirTicks, setFireTicks, setNoDamageTicks, setPitch, setRotation, setX, setY, setZ, teleportTo, teleportTo, teleportTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mob

public Mob(mj locallb)
Creates a mob interface

Parameters:
locallb - name of mob

Mob

public Mob(java.lang.String mob)
Creates a mob interface

Parameters:
mob - name of mob

Mob

public Mob(java.lang.String mobName,
           Location location)
Creates a mob interface

Parameters:
mobName - name of mob
location - location of mob
Method Detail

spawn

public void spawn()
Spawns this mob


spawn

public void spawn(Mob rider)
Spawns this mob with a rider

Parameters:
rider -

getName

public java.lang.String getName()
Returns this mob's name

Returns:
name

dropLoot

public void dropLoot()
Drops this mob's loot. Automatically called if health is set to 0.


setHealth

public void setHealth(int health)
Description copied from class: LivingEntity
Sets the entity's health. 20 = max health 1 = 1/2 heart 2 = 1 heart

Overrides:
setHealth in class LivingEntity

getMob

public mj getMob()
Returns the actual mob

Returns:

isValid

public static boolean isValid(java.lang.String mob)
Checks to see if the mob is a valid mob

Parameters:
mob - the mob to check
Returns:
true of mob is valid