Update to Minecraft 1.16.1

This commit is contained in:
md_5
2020-06-25 10:00:00 +10:00
parent be6aaf046e
commit 7ea3c040bc
424 changed files with 5960 additions and 5636 deletions

View File

@@ -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()) {