Fixed vegetate...derp.

This commit is contained in:
Jonathan Williams 2013-08-31 01:36:40 -07:00
parent 0f4facd407
commit c0198b1b1f
3 changed files with 5 additions and 14 deletions

View File

@ -69,21 +69,12 @@ public class UtilEnt
_bsRestrictionGoal.set(creature, new PathfinderGoalMoveTowardsRestriction(creature, 0D));
}
if (((CraftEntity)entity).getHandle() instanceof EntityMonster)
{
((EntityMonster)((CraftEntity)entity).getHandle()).Vegetated = true;
}
if (((CraftEntity)entity).getHandle() instanceof EntityMonster)
{
((EntityMonster)((CraftEntity)entity).getHandle()).Vegetated = true;
}
if (((CraftEntity)entity).getHandle() instanceof EntityInsentient)
{
EntityInsentient creature = (EntityInsentient)((CraftEntity)entity).getHandle();
creature.Vegetated = true;
PathfinderGoalSelector goalSelector = new PathfinderGoalSelector(((CraftWorld)entity.getWorld()).getHandle().methodProfiler);
goalSelector.a(7, new PathfinderGoalLookAtPlayer(creature, EntityHuman.class, 6.0F));

View File

@ -162,9 +162,9 @@ public class NpcManager extends MiniPlugin
_npcs.get(entity.getUniqueId().toString()).Name = ((LivingEntity)entity).getCustomName();
_npcs.get(entity.getUniqueId().toString()).Entity = entity;
if (_npcs.get(entity.getUniqueId().toString()).Radius == 0 && entity instanceof CraftCreature)
if (_npcs.get(entity.getUniqueId().toString()).Radius == 0)
{
UtilEnt.Vegetate((org.bukkit.entity.Creature)entity);
UtilEnt.Vegetate(entity);
}
}
}

View File

@ -32,7 +32,7 @@ public abstract class EntityInsentient extends EntityLiving {
private Entity bw;
private NBTTagCompound bx;
protected boolean Vegetated;
public boolean Vegetated;
public EntityInsentient(World world) {
super(world);