mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 09:41:29 +01:00
MC-151364, SPIGOT-5494: Feeding dolphin hangs if generate-structures=false
By: md_5 <git@md-5.net>
This commit is contained in:
parent
b0aa0e2871
commit
4a6962f0ba
@ -21,6 +21,15 @@
|
|||||||
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
|
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
|
||||||
this.dropChanceHand[EnumItemSlot.MAINHAND.b()] = 2.0F;
|
this.dropChanceHand[EnumItemSlot.MAINHAND.b()] = 2.0F;
|
||||||
this.receive(entityitem, itemstack.getCount());
|
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 @@
|
@@ -425,7 +430,7 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user