Fixed placing blocks on snow layers with more then one layer.

This commit is contained in:
LexManos 2015-11-26 19:36:38 -08:00
parent eb26b3ca0f
commit 81f9f3f20d
3 changed files with 11 additions and 2 deletions

View file

@ -5,7 +5,7 @@
IBlockState iblockstate = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b());
Block block = iblockstate.func_177230_c();
- return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (block.func_149688_o() == Material.field_151584_j ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() >= 7 ? true : block.func_149662_c() && block.field_149764_J.func_76230_c())) : false;
+ return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (block.isLeaves(p_176196_1_, p_176196_2_.func_177977_b()) ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() == 7 ? true : block.func_149662_c() && block.field_149764_J.func_76230_c())) : false;
+ return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (block.isLeaves(p_176196_1_, p_176196_2_.func_177977_b()) ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() >= 7 ? true : block.func_149662_c() && block.field_149764_J.func_76230_c())) : false;
}
public void func_176204_a(World p_176204_1_, BlockPos p_176204_2_, IBlockState p_176204_3_, Block p_176204_4_)

View file

@ -18,6 +18,15 @@
p_180614_3_.func_72908_a((double)((float)p_180614_4_.func_177958_n() + 0.5F), (double)((float)p_180614_4_.func_177956_o() + 0.5F), (double)((float)p_180614_4_.func_177952_p() + 0.5F), this.field_150939_a.field_149762_H.func_150496_b(), (this.field_150939_a.field_149762_H.func_150497_c() + 1.0F) / 2.0F, this.field_150939_a.field_149762_H.func_150494_d() * 0.8F);
--p_180614_1_.field_77994_a;
}
@@ -124,7 +116,7 @@
{
Block block = p_179222_1_.func_180495_p(p_179222_2_).func_177230_c();
- if (block == Blocks.field_150431_aC)
+ if (block == Blocks.field_150431_aC && block.func_176200_f(p_179222_1_, p_179222_2_))
{
p_179222_3_ = EnumFacing.UP;
}
@@ -162,4 +154,26 @@
{
return this.field_150939_a;