Fixed chunk loading causing crash
Also might have increased pocket generation time
This commit is contained in:
parent
180720c04b
commit
a0d0f6e19b
3 changed files with 2 additions and 5 deletions
|
@ -194,7 +194,6 @@ public class TileEntityRift extends TileEntity
|
|||
if (count2 > 40)
|
||||
{
|
||||
this.invalidate();
|
||||
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
|
||||
if (dimension.getLink(xCoord, yCoord, zCoord) != null)
|
||||
{
|
||||
if(!this.worldObj.isRemote)
|
||||
|
@ -202,6 +201,7 @@ public class TileEntityRift extends TileEntity
|
|||
dimension.deleteLink(xCoord, yCoord, zCoord);
|
||||
}
|
||||
worldObj.playSound(xCoord, yCoord, zCoord, "mods.DimDoors.sfx.riftClose", (float) .7, 1, true);
|
||||
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
|
||||
}
|
||||
}
|
||||
count2++;
|
||||
|
|
|
@ -25,7 +25,6 @@ import StevenDimDoors.mod_pocketDim.util.Pair;
|
|||
import StevenDimDoors.mod_pocketDim.util.Point4D;
|
||||
import StevenDimDoors.mod_pocketDim.items.ItemDimensionalDoor;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PocketBuilder
|
||||
{
|
||||
public static final int MIN_POCKET_SIZE = 5;
|
||||
|
|
|
@ -42,7 +42,6 @@ public class PocketGenerator extends ChunkProviderGenerate
|
|||
public Chunk provideChunk(int chunkX, int chunkZ)
|
||||
{
|
||||
byte[] var3 = new byte[32768];
|
||||
|
||||
Chunk chunk = new Chunk(worldObj, var3, chunkX, chunkZ);
|
||||
|
||||
if(!chunk.isTerrainPopulated)
|
||||
|
@ -50,14 +49,13 @@ public class PocketGenerator extends ChunkProviderGenerate
|
|||
chunk.isTerrainPopulated = true;
|
||||
spawner.registerChunkForPopulation(worldObj.provider.dimensionId, chunkX, chunkZ);
|
||||
}
|
||||
|
||||
return chunk;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Chunk loadChunk(int var1, int var2)
|
||||
{
|
||||
return super.loadChunk(var1, var2);
|
||||
return this.provideChunk(var1, var2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue