mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Fix finding of spawn location for mobs. Closes #1546
This commit is contained in:
1 parent
c683bce659
commit
07db77401d
2 files changed
+8
-8
No files matched your search
@@ -49,12 +49,12 @@
|
||||
{
|
||||
continue label115;
|
||||
}
|
||||
@@ -228,6 +237,8 @@
|
||||
@@ -220,7 +229,7 @@
|
||||
{
|
||||
BlockPos blockpos1 = p_180267_2_.func_177977_b();
|
||||
|
||||
- if (!World.func_175683_a(p_180267_1_, blockpos1))
|
||||
+ if (!p_180267_1_.func_180495_p(blockpos1).func_177230_c().canCreatureSpawn(p_180267_1_, blockpos1, p_180267_0_))
|
||||
{
|
||||
Block block1 = p_180267_1_.func_180495_p(blockpos1).func_177230_c();
|
||||
boolean flag = block1 != Blocks.field_150357_h && block1 != Blocks.field_180401_cv;
|
||||
+ BlockPos down = blockpos1.func_177977_b();
|
||||
+ flag |= p_180267_1_.func_180495_p(down).func_177230_c().canCreatureSpawn(p_180267_1_, down, p_180267_0_);
|
||||
return flag && !block.func_149721_r() && !block.func_149688_o().func_76224_d() && !p_180267_1_.func_180495_p(p_180267_2_.func_177984_a()).func_177230_c().func_149721_r();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -319,7 +319,7 @@
|
||||
+ Block block = chunk.func_177428_a(blockpos2);
|
||||
|
||||
- if (material.func_76230_c() && material != Material.field_151584_j)
|
||||
+ if (block.func_149688_o().func_76230_c() && block.isLeaves(this, blockpos2) && !block.isFoliage(this, blockpos2))
|
||||
+ if (block.func_149688_o().func_76230_c() && !block.isLeaves(this, blockpos2) && !block.isFoliage(this, blockpos2))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user