3
0

Apply fixes from binary patches.

This commit is contained in:
gamerforEA
2015-03-25 08:24:42 +03:00
parent 16773ead6a
commit 099d1a7732
23 changed files with 604 additions and 431 deletions

View File

@ -63,7 +63,7 @@
extendedblockstorage.func_150818_a(p_150807_1_, p_150807_2_ & 15, p_150807_3_, p_150807_4_);
extendedblockstorage.setExtBlockMetadata(p_150807_1_, p_150807_2_ & 15, p_150807_3_, p_150807_5_); // This line duplicates the one below, so breakBlock fires with valid worldstate
@@ -777,8 +800,14 @@
@@ -777,8 +800,20 @@
if (i != this.xPosition || j != this.zPosition)
{
@ -76,11 +76,17 @@
+ Bukkit.getLogger().warning(
+ "Entity is at " + p_76612_1_.posX + "," + p_76612_1_.posZ + " (chunk " + i + "," + j + ") but was stored in chunk " + this.xPosition + ","
+ + this.zPosition);
+ if (!(p_76612_1_ instanceof EntityPlayerMP))
+ {
+ Bukkit.getLogger().warning("Cauldron has removed " + p_76612_1_ + " to prevent a server crash.");
+ p_76612_1_.setDead();
+ return;
+ }
+ // CraftBukkit end
}
int k = MathHelper.floor_double(p_76612_1_.posY / 16.0D);
@@ -799,6 +828,26 @@
@@ -799,6 +834,26 @@
p_76612_1_.chunkCoordY = k;
p_76612_1_.chunkCoordZ = this.zPosition;
this.entityLists[k].add(p_76612_1_);
@ -107,7 +113,7 @@
}
public void removeEntity(Entity p_76622_1_)
@@ -819,6 +868,26 @@
@@ -819,6 +874,26 @@
}
this.entityLists[p_76608_2_].remove(p_76608_1_);
@ -134,7 +140,7 @@
}
public boolean canBlockSeeTheSky(int p_76619_1_, int p_76619_2_, int p_76619_3_)
@@ -874,9 +943,23 @@
@@ -874,9 +949,23 @@
p_150812_4_.xCoord = this.xPosition * 16 + p_150812_1_;
p_150812_4_.yCoord = p_150812_2_;
p_150812_4_.zCoord = this.zPosition * 16 + p_150812_3_;
@ -159,7 +165,7 @@
{
if (this.chunkTileEntityMap.containsKey(chunkposition))
{
@@ -886,6 +969,16 @@
@@ -886,6 +975,16 @@
p_150812_4_.validate();
this.chunkTileEntityMap.put(chunkposition, p_150812_4_);
}
@ -176,7 +182,7 @@
}
public void removeTileEntity(int p_150805_1_, int p_150805_2_, int p_150805_3_)
@@ -936,6 +1029,21 @@
@@ -936,6 +1035,21 @@
for (int i = 0; i < this.entityLists.length; ++i)
{
@ -198,7 +204,7 @@
this.worldObj.unloadEntities(this.entityLists[i]);
}
MinecraftForge.EVENT_BUS.post(new ChunkEvent.Unload(this));
@@ -1035,6 +1143,7 @@
@@ -1035,6 +1149,7 @@
public void populateChunk(IChunkProvider p_76624_1_, IChunkProvider p_76624_2_, int p_76624_3_, int p_76624_4_)
{
@ -206,7 +212,7 @@
if (!this.isTerrainPopulated && p_76624_1_.chunkExists(p_76624_3_ + 1, p_76624_4_ + 1) && p_76624_1_.chunkExists(p_76624_3_, p_76624_4_ + 1) && p_76624_1_.chunkExists(p_76624_3_ + 1, p_76624_4_))
{
p_76624_1_.populate(p_76624_2_, p_76624_3_, p_76624_4_);
@@ -1054,6 +1163,7 @@
@@ -1054,6 +1169,7 @@
{
p_76624_1_.populate(p_76624_2_, p_76624_3_ - 1, p_76624_4_ - 1);
}
@ -214,7 +220,7 @@
}
public int getPrecipitationHeight(int p_76626_1_, int p_76626_2_)
@@ -1184,8 +1294,10 @@
@@ -1184,8 +1300,10 @@
if ((p_76607_2_ & 1 << l) != 0 && this.storageArrays[l] != null)
{
nibblearray = this.storageArrays[l].getMetadataArray();
@ -227,7 +233,7 @@
}
}
@@ -1194,8 +1306,10 @@
@@ -1194,8 +1312,10 @@
if ((p_76607_2_ & 1 << l) != 0 && this.storageArrays[l] != null)
{
nibblearray = this.storageArrays[l].getBlocklightArray();
@ -240,7 +246,7 @@
}
}
@@ -1206,8 +1320,10 @@
@@ -1206,8 +1326,10 @@
if ((p_76607_2_ & 1 << l) != 0 && this.storageArrays[l] != null)
{
nibblearray = this.storageArrays[l].getSkylightArray();
@ -253,7 +259,7 @@
}
}
}
@@ -1229,8 +1345,8 @@
@@ -1229,8 +1351,8 @@
nibblearray = this.storageArrays[l].createBlockMSBArray();
}