Only call blockBreak when block itself changes, not just meta. Fixes bottles poping out of brewing stands.
This commit is contained in:
parent
07db77401d
commit
1fc1570663
2 changed files with 19 additions and 16 deletions
|
@ -39,7 +39,7 @@
|
|||
+ */
|
||||
+ public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newSate)
|
||||
+ {
|
||||
+ return !isVanilla || (oldState != newSate);
|
||||
+ return !isVanilla || (oldState.func_177230_c() != newSate.func_177230_c());
|
||||
+ }
|
||||
+
|
||||
+ public boolean shouldRenderInPass(int pass)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
}
|
||||
|
||||
private Block func_150810_a(int p_150810_1_, int p_150810_2_, int p_150810_3_)
|
||||
@@ -653,16 +656,20 @@
|
||||
@@ -653,16 +656,23 @@
|
||||
flag = j >= i1;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,10 @@
|
|||
{
|
||||
if (!this.field_76637_e.field_72995_K)
|
||||
{
|
||||
+ if (iblockstate1.func_177230_c() != p_177436_2_.func_177230_c()) //Only fire block breaks when the block changes.
|
||||
block1.func_180663_b(this.field_76637_e, p_177436_1_, iblockstate1);
|
||||
+ TileEntity te = this.func_177424_a(p_177436_1_, Chunk.EnumCreateEntityType.CHECK);
|
||||
+ if (te != null && te.shouldRefresh(this.field_76637_e, p_177436_1_, iblockstate1, p_177436_2_)) this.field_76637_e.func_175713_t(p_177436_1_);
|
||||
}
|
||||
- else if (block1 instanceof ITileEntityProvider)
|
||||
+ else if (block1.hasTileEntity(iblockstate1))
|
||||
|
@ -57,7 +60,7 @@
|
|||
this.field_76637_e.func_175713_t(p_177436_1_);
|
||||
}
|
||||
}
|
||||
@@ -679,8 +686,7 @@
|
||||
@@ -679,8 +689,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -67,7 +70,7 @@
|
|||
|
||||
if (j1 > 0)
|
||||
{
|
||||
@@ -702,28 +708,18 @@
|
||||
@@ -702,28 +711,18 @@
|
||||
|
||||
TileEntity tileentity;
|
||||
|
||||
|
@ -98,7 +101,7 @@
|
|||
this.field_76637_e.func_175690_a(p_177436_1_, tileentity);
|
||||
}
|
||||
|
||||
@@ -826,6 +822,7 @@
|
||||
@@ -826,6 +825,7 @@
|
||||
k = this.field_76645_j.length - 1;
|
||||
}
|
||||
|
||||
|
@ -106,7 +109,7 @@
|
|||
p_76612_1_.field_70175_ag = true;
|
||||
p_76612_1_.field_70176_ah = this.field_76635_g;
|
||||
p_76612_1_.field_70162_ai = k;
|
||||
@@ -864,13 +861,20 @@
|
||||
@@ -864,13 +864,20 @@
|
||||
private TileEntity func_177422_i(BlockPos p_177422_1_)
|
||||
{
|
||||
Block block = this.func_177428_a(p_177422_1_);
|
||||
|
@ -128,7 +131,7 @@
|
|||
if (tileentity == null)
|
||||
{
|
||||
if (p_177424_2_ == Chunk.EnumCreateEntityType.IMMEDIATE)
|
||||
@@ -883,11 +887,6 @@
|
||||
@@ -883,11 +890,6 @@
|
||||
this.field_177447_w.add(p_177424_1_);
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +143,7 @@
|
|||
|
||||
return tileentity;
|
||||
}
|
||||
@@ -907,7 +906,7 @@
|
||||
@@ -907,7 +909,7 @@
|
||||
p_177426_2_.func_145834_a(this.field_76637_e);
|
||||
p_177426_2_.func_174878_a(p_177426_1_);
|
||||
|
||||
|
@ -149,7 +152,7 @@
|
|||
{
|
||||
if (this.field_150816_i.containsKey(p_177426_1_))
|
||||
{
|
||||
@@ -949,6 +948,7 @@
|
||||
@@ -949,6 +951,7 @@
|
||||
|
||||
this.field_76637_e.func_175650_b(this.field_76645_j[i]);
|
||||
}
|
||||
|
@ -157,7 +160,7 @@
|
|||
}
|
||||
|
||||
public void func_76623_d()
|
||||
@@ -966,6 +966,7 @@
|
||||
@@ -966,6 +969,7 @@
|
||||
{
|
||||
this.field_76637_e.func_175681_c(this.field_76645_j[i]);
|
||||
}
|
||||
|
@ -165,7 +168,7 @@
|
|||
}
|
||||
|
||||
public void func_76630_e()
|
||||
@@ -975,8 +976,8 @@
|
||||
@@ -975,8 +979,8 @@
|
||||
|
||||
public void func_177414_a(Entity p_177414_1_, AxisAlignedBB p_177414_2_, List p_177414_3_, Predicate p_177414_4_)
|
||||
{
|
||||
|
@ -176,7 +179,7 @@
|
|||
i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1);
|
||||
j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1);
|
||||
|
||||
@@ -1012,8 +1013,8 @@
|
||||
@@ -1012,8 +1016,8 @@
|
||||
|
||||
public void func_177430_a(Class p_177430_1_, AxisAlignedBB p_177430_2_, List p_177430_3_, Predicate p_177430_4_)
|
||||
{
|
||||
|
@ -187,7 +190,7 @@
|
|||
i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1);
|
||||
j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1);
|
||||
|
||||
@@ -1179,8 +1180,10 @@
|
||||
@@ -1179,8 +1183,10 @@
|
||||
while (!this.field_177447_w.isEmpty())
|
||||
{
|
||||
BlockPos blockpos = (BlockPos)this.field_177447_w.poll();
|
||||
|
@ -199,7 +202,7 @@
|
|||
{
|
||||
TileEntity tileentity = this.func_177422_i(blockpos);
|
||||
this.field_76637_e.func_175690_a(blockpos, tileentity);
|
||||
@@ -1242,6 +1245,15 @@
|
||||
@@ -1242,6 +1248,15 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void func_177439_a(byte[] p_177439_1_, int p_177439_2_, boolean p_177439_3_)
|
||||
{
|
||||
|
@ -215,7 +218,7 @@
|
|||
int j = 0;
|
||||
boolean flag1 = !this.field_76637_e.field_73011_w.func_177495_o();
|
||||
int k;
|
||||
@@ -1311,13 +1323,18 @@
|
||||
@@ -1311,13 +1326,18 @@
|
||||
this.field_150814_l = true;
|
||||
this.field_76646_k = true;
|
||||
this.func_76590_a();
|
||||
|
@ -235,7 +238,7 @@
|
|||
}
|
||||
|
||||
public BiomeGenBase func_177411_a(BlockPos p_177411_1_, WorldChunkManager p_177411_2_)
|
||||
@@ -1644,4 +1661,20 @@
|
||||
@@ -1644,4 +1664,20 @@
|
||||
|
||||
private static final String __OBFID = "CL_00002009";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue