Update to Minecraft 1.16.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-06-25 10:00:00 +10:00
parent 3862d2811e
commit 50503fd516
424 changed files with 5960 additions and 5636 deletions

View File

@@ -8,29 +8,29 @@
+ this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityGuardian.class})).a(new Class[0])); // CraftBukkit - decompile error
}
@Override
@@ -179,6 +179,11 @@
public static AttributeProvider.Builder eN() {
@@ -174,6 +174,11 @@
ItemStack itemstack = entityitem.getItemStack();
if (this.g(itemstack)) {
if (this.canPickup(itemstack)) {
+ // CraftBukkit start - call EntityPickupItemEvent
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(this, entityitem, 0, false).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
this.a(entityitem);
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
this.dropChanceHand[EnumItemSlot.MAINHAND.b()] = 2.0F;
this.receive(entityitem, itemstack.getCount());
@@ -317,7 +322,7 @@
@@ -315,7 +320,7 @@
@Override
public boolean a() {
- return this.a.eq() && this.a.getAirTicks() >= 100;
+ return this.a.eq() && this.a.getAirTicks() >= 100 && this.a.world.getWorld().canGenerateStructures(); // MC-151364, SPIGOT-5494: hangs if generate-structures=false
- return this.a.gotFish() && this.a.getAirTicks() >= 100;
+ return this.a.gotFish() && this.a.getAirTicks() >= 100 && this.a.world.getWorld().canGenerateStructures(); // MC-151364, SPIGOT-5494: hangs if generate-structures=false
}
@Override
@@ -425,7 +430,7 @@
@@ -424,7 +429,7 @@
@Override
public void c() {
@@ -39,7 +39,7 @@
}
@Override
@@ -444,7 +449,7 @@
@@ -443,7 +448,7 @@
}
if (this.c.isSwimming() && this.c.world.random.nextInt(6) == 0) {