@@ -8,10 +8,10 @@
|
||||
|
||||
public class EntityBat extends EntityAmbient {
|
||||
|
||||
@@ -94,12 +95,20 @@
|
||||
@@ -104,12 +105,20 @@
|
||||
}
|
||||
|
||||
if (this.world.b(this, 4.0D) != null) {
|
||||
if (this.world.a(EntityBat.c, (EntityLiving) this) != null) {
|
||||
+ // CraftBukkit Start - Call BatToggleSleepEvent
|
||||
+ if (CraftEventFactory.handleBatToggleSleepEvent(this, true)) {
|
||||
+ this.setAsleep(false);
|
||||
@@ -31,11 +31,11 @@
|
||||
+ // CraftBukkit End - Call BatToggleSleepEvent
|
||||
}
|
||||
} else {
|
||||
if (this.b != null && (!this.world.isEmpty(this.b) || this.b.getY() < 1)) {
|
||||
@@ -123,7 +132,11 @@
|
||||
this.bj = 0.5F;
|
||||
if (this.d != null && (!this.world.isEmpty(this.d) || this.d.getY() < 1)) {
|
||||
@@ -133,7 +142,11 @@
|
||||
this.bd = 0.5F;
|
||||
this.yaw += f1;
|
||||
if (this.random.nextInt(100) == 0 && this.world.getType(blockposition1).isOccluding()) {
|
||||
if (this.random.nextInt(100) == 0 && this.world.getType(blockposition1).isOccluding(this.world, blockposition1)) {
|
||||
- this.setAsleep(true);
|
||||
+ // CraftBukkit Start - Call BatToggleSleepEvent
|
||||
+ if (CraftEventFactory.handleBatToggleSleepEvent(this, false)) {
|
||||
@@ -45,7 +45,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +159,11 @@
|
||||
@@ -161,7 +174,11 @@
|
||||
return false;
|
||||
} else {
|
||||
if (!this.world.isClientSide && this.isAsleep()) {
|
||||
|
||||
Reference in New Issue
Block a user