mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-19 14:23:48 -07:00
Update to Minecraft 1.16.1
This commit is contained in:
@@ -8,14 +8,16 @@
|
||||
|
||||
public class EntityBat extends EntityAmbient {
|
||||
|
||||
@@ -105,12 +106,20 @@
|
||||
@@ -105,16 +106,24 @@
|
||||
}
|
||||
|
||||
if (this.world.a(EntityBat.c, (EntityLiving) this) != null) {
|
||||
+ // CraftBukkit Start - Call BatToggleSleepEvent
|
||||
+ if (CraftEventFactory.handleBatToggleSleepEvent(this, true)) {
|
||||
+ this.setAsleep(false);
|
||||
+ this.world.a((EntityHuman) null, 1025, blockposition, 0);
|
||||
+ if (!flag) {
|
||||
+ this.world.a((EntityHuman) null, 1025, blockposition, 0);
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit End
|
||||
+ }
|
||||
@@ -23,17 +25,21 @@
|
||||
+ // CraftBukkit Start - Call BatToggleSleepEvent
|
||||
+ if (CraftEventFactory.handleBatToggleSleepEvent(this, true)) {
|
||||
this.setAsleep(false);
|
||||
this.world.a((EntityHuman) null, 1025, blockposition, 0);
|
||||
if (!flag) {
|
||||
this.world.a((EntityHuman) null, 1025, blockposition, 0);
|
||||
}
|
||||
}
|
||||
- } else {
|
||||
- this.setAsleep(false);
|
||||
- this.world.a((EntityHuman) null, 1025, blockposition, 0);
|
||||
- if (!flag) {
|
||||
- this.world.a((EntityHuman) null, 1025, blockposition, 0);
|
||||
- }
|
||||
+ // CraftBukkit End - Call BatToggleSleepEvent
|
||||
}
|
||||
} else {
|
||||
if (this.d != null && (!this.world.isEmpty(this.d) || this.d.getY() < 1)) {
|
||||
@@ -134,7 +143,11 @@
|
||||
this.bb = 0.5F;
|
||||
@@ -138,7 +147,11 @@
|
||||
this.ba = 0.5F;
|
||||
this.yaw += f1;
|
||||
if (this.random.nextInt(100) == 0 && this.world.getType(blockposition1).isOccluding(this.world, blockposition1)) {
|
||||
- this.setAsleep(true);
|
||||
@@ -45,7 +51,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +177,11 @@
|
||||
@@ -168,7 +181,11 @@
|
||||
return false;
|
||||
} else {
|
||||
if (!this.world.isClientSide && this.isAsleep()) {
|
||||
|
Reference in New Issue
Block a user