MC-151364, SPIGOT-5494: Feeding dolphin hangs if generate-structures=false

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2020-01-03 16:56:58 +11:00
parent b0aa0e2871
commit 4a6962f0ba

View File

@ -21,6 +21,15 @@
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
this.dropChanceHand[EnumItemSlot.MAINHAND.b()] = 2.0F;
this.receive(entityitem, itemstack.getCount());
@@ -317,7 +322,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
}
@Override
@@ -425,7 +430,7 @@
@Override