Fixed bug that allowed duplication of Fluids with redstone dust. Closes #1279
This commit is contained in:
parent
bc8374d71c
commit
10192959f9
1 changed files with 23 additions and 26 deletions
|
@ -31,29 +31,26 @@
|
|||
}
|
||||
|
||||
public Block func_150810_a(final int p_150810_1_, final int p_150810_2_, final int p_150810_3_)
|
||||
@@ -578,6 +584,8 @@
|
||||
|
||||
@@ -579,6 +585,8 @@
|
||||
int l1 = this.field_76635_g * 16 + p_150807_1_;
|
||||
int i2 = this.field_76647_h * 16 + p_150807_3_;
|
||||
+
|
||||
+ int k2 = block1.getLightOpacity(this.field_76637_e, l1, p_150807_2_, i2);
|
||||
|
||||
+ int k2 = block1.getLightOpacity(this.field_76637_e, l1, p_150807_2_, i2);
|
||||
+
|
||||
if (!this.field_76637_e.field_72995_K)
|
||||
{
|
||||
@@ -585,14 +593,19 @@
|
||||
}
|
||||
|
||||
extendedblockstorage.func_150818_a(p_150807_1_, p_150807_2_ & 15, p_150807_3_, p_150807_4_);
|
||||
+ extendedblockstorage.func_76654_b(p_150807_1_, p_150807_2_ & 15, p_150807_3_, p_150807_5_); // Move this above to prevent other mods/tile entites from creating invalid ones for the wrong metadata
|
||||
|
||||
block1.func_149725_f(this.field_76637_e, l1, p_150807_2_, i2, k1);
|
||||
@@ -589,10 +597,16 @@
|
||||
if (!this.field_76637_e.field_72995_K)
|
||||
{
|
||||
block1.func_149749_a(this.field_76637_e, l1, p_150807_2_, i2, block1, k1);
|
||||
+ extendedblockstorage.func_76654_b(p_150807_1_, p_150807_2_ & 15, p_150807_3_, p_150807_5_); // This needs to be below block break as it some breaks depend on this ordering {redstone/lava}
|
||||
}
|
||||
- else if (block1 instanceof ITileEntityProvider && block1 != p_150807_4_)
|
||||
+ else if (block1.hasTileEntity(k1))
|
||||
{
|
||||
- this.field_76637_e.func_147475_p(l1, p_150807_2_, i2);
|
||||
+ extendedblockstorage.func_76654_b(p_150807_1_, p_150807_2_ & 15, p_150807_3_, p_150807_5_); // Move this above to prevent other mods/tile entites from creating invalid ones for the wrong metadata
|
||||
+ TileEntity te = this.getTileEntityUnsafe(p_150807_1_ & 0x0F, p_150807_2_, p_150807_3_ & 0x0F);
|
||||
+ if (te != null && te.shouldRefresh(block1, p_150807_4_, k1, p_150807_5_, field_76637_e, l1, p_150807_2_, i2))
|
||||
+ {
|
||||
|
@ -62,7 +59,7 @@
|
|||
}
|
||||
|
||||
if (extendedblockstorage.func_150819_a(p_150807_1_, p_150807_2_ & 15, p_150807_3_) != p_150807_4_)
|
||||
@@ -601,16 +614,13 @@
|
||||
@@ -601,16 +615,13 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -80,7 +77,7 @@
|
|||
|
||||
if (j2 > 0)
|
||||
{
|
||||
@@ -632,34 +642,19 @@
|
||||
@@ -632,34 +643,19 @@
|
||||
|
||||
TileEntity tileentity;
|
||||
|
||||
|
@ -117,7 +114,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -690,7 +685,7 @@
|
||||
@@ -690,7 +686,7 @@
|
||||
this.field_76643_l = true;
|
||||
extendedblockstorage.func_76654_b(p_76589_1_, p_76589_2_ & 15, p_76589_3_, p_76589_4_);
|
||||
|
||||
|
@ -126,7 +123,7 @@
|
|||
{
|
||||
TileEntity tileentity = this.func_150806_e(p_76589_1_, p_76589_2_, p_76589_3_);
|
||||
|
||||
@@ -790,6 +785,7 @@
|
||||
@@ -790,6 +786,7 @@
|
||||
k = this.field_76645_j.length - 1;
|
||||
}
|
||||
|
||||
|
@ -134,7 +131,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;
|
||||
@@ -827,28 +823,27 @@
|
||||
@@ -827,28 +824,27 @@
|
||||
ChunkPosition chunkposition = new ChunkPosition(p_150806_1_, p_150806_2_, p_150806_3_);
|
||||
TileEntity tileentity = (TileEntity)this.field_150816_i.get(chunkposition);
|
||||
|
||||
|
@ -173,7 +170,7 @@
|
|||
}
|
||||
|
||||
public void func_150813_a(TileEntity p_150813_1_)
|
||||
@@ -860,7 +855,7 @@
|
||||
@@ -860,7 +856,7 @@
|
||||
|
||||
if (this.field_76636_d)
|
||||
{
|
||||
|
@ -182,7 +179,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +867,8 @@
|
||||
@@ -872,7 +868,8 @@
|
||||
p_150812_4_.field_145848_d = p_150812_2_;
|
||||
p_150812_4_.field_145849_e = this.field_76647_h * 16 + p_150812_3_;
|
||||
|
||||
|
@ -192,7 +189,7 @@
|
|||
{
|
||||
if (this.field_150816_i.containsKey(chunkposition))
|
||||
{
|
||||
@@ -916,6 +912,7 @@
|
||||
@@ -916,6 +913,7 @@
|
||||
|
||||
this.field_76637_e.func_72868_a(this.field_76645_j[i]);
|
||||
}
|
||||
|
@ -200,7 +197,7 @@
|
|||
}
|
||||
|
||||
public void func_76623_d()
|
||||
@@ -933,6 +930,7 @@
|
||||
@@ -933,6 +931,7 @@
|
||||
{
|
||||
this.field_76637_e.func_72828_b(this.field_76645_j[i]);
|
||||
}
|
||||
|
@ -208,7 +205,7 @@
|
|||
}
|
||||
|
||||
public void func_76630_e()
|
||||
@@ -942,8 +940,8 @@
|
||||
@@ -942,8 +941,8 @@
|
||||
|
||||
public void func_76588_a(Entity p_76588_1_, AxisAlignedBB p_76588_2_, List p_76588_3_, IEntitySelector p_76588_4_)
|
||||
{
|
||||
|
@ -219,7 +216,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);
|
||||
|
||||
@@ -979,8 +977,8 @@
|
||||
@@ -979,8 +978,8 @@
|
||||
|
||||
public void func_76618_a(Class p_76618_1_, AxisAlignedBB p_76618_2_, List p_76618_3_, IEntitySelector p_76618_4_)
|
||||
{
|
||||
|
@ -230,7 +227,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);
|
||||
|
||||
@@ -1139,6 +1137,15 @@
|
||||
@@ -1139,6 +1138,15 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void func_76607_a(byte[] p_76607_1_, int p_76607_2_, int p_76607_3_, boolean p_76607_4_)
|
||||
{
|
||||
|
@ -246,7 +243,7 @@
|
|||
int k = 0;
|
||||
boolean flag1 = !this.field_76637_e.field_73011_w.field_76576_e;
|
||||
int l;
|
||||
@@ -1241,13 +1248,27 @@
|
||||
@@ -1241,13 +1249,27 @@
|
||||
this.field_150814_l = true;
|
||||
this.field_76646_k = true;
|
||||
this.func_76590_a();
|
||||
|
@ -275,7 +272,7 @@
|
|||
}
|
||||
|
||||
public BiomeGenBase func_76591_a(int p_76591_1_, int p_76591_2_, WorldChunkManager p_76591_3_)
|
||||
@@ -1450,4 +1471,48 @@
|
||||
@@ -1450,4 +1472,48 @@
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -283,7 +280,7 @@
|
|||
+ /**
|
||||
+ * Retrieves the tile entity, WITHOUT creating it.
|
||||
+ * Good for checking if it exists.
|
||||
+ *
|
||||
+ *
|
||||
+ * @param x
|
||||
+ * @param y
|
||||
+ * @param z
|
||||
|
@ -306,7 +303,7 @@
|
|||
+ /**
|
||||
+ * Removes the tile entity at the specified position, only if it's
|
||||
+ * marked as invalid.
|
||||
+ *
|
||||
+ *
|
||||
+ * @param x
|
||||
+ * @param y
|
||||
+ * @param z
|
||||
|
|
Loading…
Reference in a new issue