Fix crash when beehive is broken by fake player (#7566)
This commit is contained in:
parent
fc68b81b21
commit
830d9699e3
1 changed files with 9 additions and 1 deletions
|
@ -1,6 +1,14 @@
|
||||||
--- a/net/minecraft/block/BeehiveBlock.java
|
--- a/net/minecraft/block/BeehiveBlock.java
|
||||||
+++ b/net/minecraft/block/BeehiveBlock.java
|
+++ b/net/minecraft/block/BeehiveBlock.java
|
||||||
@@ -105,7 +105,7 @@
|
@@ -85,6 +85,7 @@
|
||||||
|
List<BeeEntity> list = p_226881_1_.func_217357_a(BeeEntity.class, (new AxisAlignedBB(p_226881_2_)).func_72314_b(8.0D, 6.0D, 8.0D));
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
List<PlayerEntity> list1 = p_226881_1_.func_217357_a(PlayerEntity.class, (new AxisAlignedBB(p_226881_2_)).func_72314_b(8.0D, 6.0D, 8.0D));
|
||||||
|
+ if (list1.isEmpty()) return; //Forge: Prevent Error when no players are around.
|
||||||
|
int i = list1.size();
|
||||||
|
|
||||||
|
for(BeeEntity beeentity : list) {
|
||||||
|
@@ -105,7 +106,7 @@
|
||||||
int i = p_225533_1_.func_177229_b(field_226873_c_);
|
int i = p_225533_1_.func_177229_b(field_226873_c_);
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if (i >= 5) {
|
if (i >= 5) {
|
||||||
|
|
Loading…
Reference in a new issue