Fixed placing blocks on snow layers with more then one layer.
This commit is contained in:
parent
eb26b3ca0f
commit
81f9f3f20d
3 changed files with 11 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
||||||
IBlockState iblockstate = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b());
|
IBlockState iblockstate = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b());
|
||||||
Block block = iblockstate.func_177230_c();
|
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.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_)
|
public void func_176204_a(World p_176204_1_, BlockPos p_176204_2_, IBlockState p_176204_3_, Block p_176204_4_)
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
+ p_178890_3_.func_77973_b() != null &&
|
+ p_178890_3_.func_77973_b() != null &&
|
||||||
+ p_178890_3_.func_77973_b().onItemUseFirst(p_178890_3_, p_178890_1_, p_178890_2_, p_178890_4_, p_178890_5_, f, f1, f2))
|
+ p_178890_3_.func_77973_b().onItemUseFirst(p_178890_3_, p_178890_1_, p_178890_2_, p_178890_4_, p_178890_5_, f, f1, f2))
|
||||||
+ {
|
+ {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
IBlockState iblockstate = p_178890_2_.func_180495_p(p_178890_4_);
|
IBlockState iblockstate = p_178890_2_.func_180495_p(p_178890_4_);
|
||||||
|
|
|
@ -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_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;
|
--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 @@
|
@@ -162,4 +154,26 @@
|
||||||
{
|
{
|
||||||
return this.field_150939_a;
|
return this.field_150939_a;
|
||||||
|
|
Loading…
Reference in a new issue