Merge branch 'master' of ssh://dev.mineplex.com:7999/min/mineplex
This commit is contained in:
commit
a6eb7ea665
Binary file not shown.
@ -55,6 +55,7 @@ public class UtilEnt
|
||||
}
|
||||
|
||||
((CraftEntity)entity).getHandle().Invisible = invisible;
|
||||
((CraftEntity)entity).getHandle().setInvisible(invisible);
|
||||
}
|
||||
|
||||
public static void Leash(LivingEntity leashed, Entity holder, boolean pull, boolean breakable)
|
||||
@ -71,6 +72,11 @@ public class UtilEnt
|
||||
}
|
||||
|
||||
public static void Vegetate(Entity entity)
|
||||
{
|
||||
Vegetate(entity, false);
|
||||
}
|
||||
|
||||
public static void Vegetate(Entity entity, boolean mute)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -104,6 +110,7 @@ public class UtilEnt
|
||||
EntityInsentient creature = (EntityInsentient)((CraftEntity)entity).getHandle();
|
||||
|
||||
creature.Vegetated = true;
|
||||
creature.Silent = mute;
|
||||
PathfinderGoalSelector goalSelector = new PathfinderGoalSelector(((CraftWorld)entity.getWorld()).getHandle().methodProfiler);
|
||||
|
||||
goalSelector.a(7, new PathfinderGoalLookAtPlayer(creature, EntityHuman.class, 6.0F));
|
||||
|
@ -149,6 +149,7 @@ public abstract class Entity {
|
||||
public boolean valid; // CraftBukkit
|
||||
|
||||
public boolean Invisible;
|
||||
public boolean Silent;
|
||||
|
||||
public Entity(World world) {
|
||||
this.id = entityCount++;
|
||||
@ -708,7 +709,9 @@ public abstract class Entity {
|
||||
this.makeSound("liquid.swim", f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
|
||||
}
|
||||
|
||||
this.a(l, k, i1, j1);
|
||||
if (!Silent)
|
||||
a(l, k, i1, j1);
|
||||
|
||||
Block.byId[j1].b(this.world, l, k, i1, this);
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
public void y() {
|
||||
super.y();
|
||||
this.world.methodProfiler.a("mobBaseTick");
|
||||
if (this.isAlive() && this.random.nextInt(1000) < this.a_++) {
|
||||
if (this.isAlive() && !Silent && this.random.nextInt(1000) < this.a_++) {
|
||||
this.a_ = -this.o();
|
||||
this.p();
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class Sleigh
|
||||
Target = loc.clone();
|
||||
|
||||
CentralEntity = loc.getWorld().spawn(loc, Chicken.class);
|
||||
UtilEnt.Vegetate(CentralEntity);
|
||||
UtilEnt.Vegetate(CentralEntity, true);
|
||||
UtilEnt.ghost(CentralEntity, true, true);
|
||||
|
||||
//Presents
|
||||
@ -142,11 +142,6 @@ public class Sleigh
|
||||
|
||||
for (SleighHorse horse : SleighHorses)
|
||||
UtilEnt.Leash(horse.Ent, santa.GetTop(), false, false);
|
||||
|
||||
for (SleighPart part : SleighEnts)
|
||||
{
|
||||
((CraftEntity)part.Ent).getHandle().getDataWatcher().watch(0, Byte.valueOf((byte) 32));
|
||||
}
|
||||
}
|
||||
|
||||
public Location GetLocation()
|
||||
|
@ -37,7 +37,7 @@ public class SleighPart
|
||||
Ent = loc.getWorld().spawn(loc.add(x, 0, z), Chicken.class);
|
||||
Ent.setBaby();
|
||||
Ent.setAgeLock(true);
|
||||
UtilEnt.Vegetate(Ent);
|
||||
UtilEnt.Vegetate(Ent, true);
|
||||
UtilEnt.ghost(Ent, true, true);
|
||||
|
||||
//Height
|
||||
@ -47,7 +47,7 @@ public class SleighPart
|
||||
Chicken newTop = loc.getWorld().spawn(loc.add(x, 0, z), Chicken.class);
|
||||
newTop.setBaby();
|
||||
newTop.setAgeLock(true);
|
||||
UtilEnt.Vegetate(newTop);
|
||||
UtilEnt.Vegetate(newTop, true);
|
||||
UtilEnt.ghost(newTop, true, true);
|
||||
|
||||
top.setPassenger(newTop);
|
||||
|
Loading…
Reference in New Issue
Block a user