|
|
@ -239,7 +239,32 @@ |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void removeTileEntity(int p_150805_1_, int p_150805_2_, int p_150805_3_)
|
|
|
|
public void removeTileEntity(int p_150805_1_, int p_150805_2_, int p_150805_3_)
|
|
|
|
@@ -936,6 +1067,21 @@
|
|
|
|
@@ -915,6 +1046,7 @@
|
|
|
|
|
|
|
|
while (iterator.hasNext())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Entity entity = (Entity)iterator.next();
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
entity.onChunkLoad();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -931,11 +1063,50 @@
|
|
|
|
|
|
|
|
while (iterator.hasNext())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TileEntity tileentity = (TileEntity)iterator.next();
|
|
|
|
|
|
|
|
+ // Spigot Start
|
|
|
|
|
|
|
|
+ if ( tileentity instanceof IInventory )
|
|
|
|
|
|
|
|
+ {
|
|
|
|
|
|
|
|
+ for ( org.bukkit.entity.HumanEntity h : new ArrayList<org.bukkit.entity.HumanEntity>( (List) ( (IInventory) tileentity ).getViewers() ) )
|
|
|
|
|
|
|
|
+ {
|
|
|
|
|
|
|
|
+ if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
|
|
|
|
|
|
|
|
+ {
|
|
|
|
|
|
|
|
+ ( (org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeScreen();
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ // Spigot End
|
|
|
|
|
|
|
|
this.worldObj.func_147457_a(tileentity);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < this.entityLists.length; ++i)
|
|
|
|
for (int i = 0; i < this.entityLists.length; ++i)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -249,6 +274,18 @@ |
|
|
|
+ while (iter.hasNext())
|
|
|
|
+ while (iter.hasNext())
|
|
|
|
+ {
|
|
|
|
+ {
|
|
|
|
+ Entity entity = (Entity) iter.next();
|
|
|
|
+ Entity entity = (Entity) iter.next();
|
|
|
|
|
|
|
|
+ // Spigot Start
|
|
|
|
|
|
|
|
+ if ( entity instanceof IInventory )
|
|
|
|
|
|
|
|
+ {
|
|
|
|
|
|
|
|
+ for ( org.bukkit.entity.HumanEntity h : new ArrayList<org.bukkit.entity.HumanEntity>( (List) ( (IInventory) entity ).getViewers() ) )
|
|
|
|
|
|
|
|
+ {
|
|
|
|
|
|
|
|
+ if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
|
|
|
|
|
|
|
|
+ {
|
|
|
|
|
|
|
|
+ ( (org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeScreen();
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ // Spigot End
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // Do not pass along players, as doing so can get them stuck outside of time.
|
|
|
|
+ // Do not pass along players, as doing so can get them stuck outside of time.
|
|
|
|
+ // (which for example disables inventory icon updates and prevents block breaking)
|
|
|
|
+ // (which for example disables inventory icon updates and prevents block breaking)
|
|
|
@ -261,7 +298,7 @@ |
|
|
|
this.worldObj.unloadEntities(this.entityLists[i]);
|
|
|
|
this.worldObj.unloadEntities(this.entityLists[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MinecraftForge.EVENT_BUS.post(new ChunkEvent.Unload(this));
|
|
|
|
MinecraftForge.EVENT_BUS.post(new ChunkEvent.Unload(this));
|
|
|
|
@@ -1015,7 +1161,7 @@
|
|
|
|
@@ -1015,7 +1186,7 @@
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -270,7 +307,7 @@ |
|
|
|
{
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1025,7 +1171,7 @@
|
|
|
|
@@ -1025,7 +1196,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
public Random getRandomWithSeed(long p_76617_1_)
|
|
|
|
public Random getRandomWithSeed(long p_76617_1_)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -279,7 +316,7 @@ |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isEmpty()
|
|
|
|
public boolean isEmpty()
|
|
|
|
@@ -1035,6 +1181,7 @@
|
|
|
|
@@ -1035,6 +1206,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
public void populateChunk(IChunkProvider p_76624_1_, IChunkProvider p_76624_2_, int p_76624_3_, int p_76624_4_)
|
|
|
|
public void populateChunk(IChunkProvider p_76624_1_, IChunkProvider p_76624_2_, int p_76624_3_, int p_76624_4_)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -287,7 +324,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_))
|
|
|
|
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_);
|
|
|
|
p_76624_1_.populate(p_76624_2_, p_76624_3_, p_76624_4_);
|
|
|
|
@@ -1054,6 +1201,7 @@
|
|
|
|
@@ -1054,6 +1226,7 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
p_76624_1_.populate(p_76624_2_, p_76624_3_ - 1, p_76624_4_ - 1);
|
|
|
|
p_76624_1_.populate(p_76624_2_, p_76624_3_ - 1, p_76624_4_ - 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -295,7 +332,7 @@ |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int getPrecipitationHeight(int p_76626_1_, int p_76626_2_)
|
|
|
|
public int getPrecipitationHeight(int p_76626_1_, int p_76626_2_)
|
|
|
|
@@ -1091,7 +1239,7 @@
|
|
|
|
@@ -1091,7 +1264,7 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (this.isGapLightingUpdated && !this.worldObj.provider.hasNoSky && !p_150804_1_)
|
|
|
|
if (this.isGapLightingUpdated && !this.worldObj.provider.hasNoSky && !p_150804_1_)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -304,7 +341,7 @@ |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.field_150815_m = true;
|
|
|
|
this.field_150815_m = true;
|
|
|
|
@@ -1184,8 +1332,10 @@
|
|
|
|
@@ -1184,8 +1357,10 @@
|
|
|
|
if ((p_76607_2_ & 1 << l) != 0 && this.storageArrays[l] != null)
|
|
|
|
if ((p_76607_2_ & 1 << l) != 0 && this.storageArrays[l] != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nibblearray = this.storageArrays[l].getMetadataArray();
|
|
|
|
nibblearray = this.storageArrays[l].getMetadataArray();
|
|
|
@ -317,7 +354,7 @@ |
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1194,8 +1344,10 @@
|
|
|
|
@@ -1194,8 +1369,10 @@
|
|
|
|
if ((p_76607_2_ & 1 << l) != 0 && this.storageArrays[l] != null)
|
|
|
|
if ((p_76607_2_ & 1 << l) != 0 && this.storageArrays[l] != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nibblearray = this.storageArrays[l].getBlocklightArray();
|
|
|
|
nibblearray = this.storageArrays[l].getBlocklightArray();
|
|
|
@ -330,7 +367,7 @@ |
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1206,8 +1358,10 @@
|
|
|
|
@@ -1206,8 +1383,10 @@
|
|
|
|
if ((p_76607_2_ & 1 << l) != 0 && this.storageArrays[l] != null)
|
|
|
|
if ((p_76607_2_ & 1 << l) != 0 && this.storageArrays[l] != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nibblearray = this.storageArrays[l].getSkylightArray();
|
|
|
|
nibblearray = this.storageArrays[l].getSkylightArray();
|
|
|
@ -343,7 +380,7 @@ |
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1229,8 +1383,8 @@
|
|
|
|
@@ -1229,8 +1408,8 @@
|
|
|
|
nibblearray = this.storageArrays[l].createBlockMSBArray();
|
|
|
|
nibblearray = this.storageArrays[l].createBlockMSBArray();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -354,10 +391,11 @@ |
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (p_76607_4_ && this.storageArrays[l] != null && this.storageArrays[l].getBlockMSBArray() != null)
|
|
|
|
else if (p_76607_4_ && this.storageArrays[l] != null && this.storageArrays[l].getBlockMSBArray() != null)
|
|
|
|
@@ -1523,4 +1677,21 @@
|
|
|
|
@@ -1523,4 +1702,21 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
-}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ /**
|
|
|
|
+ * PaperSpigot - Recheck gaps asynchronously.
|
|
|
|
+ * PaperSpigot - Recheck gaps asynchronously.
|
|
|
@ -375,4 +413,4 @@ |
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
+}
|
|
|
|