3
0

Rollback to the state of .152 build with some critical fixes and updates

This commit is contained in:
Sergey Shatunov
2016-01-04 12:38:37 +07:00
parent 40c95e49c0
commit f722fccdce
38 changed files with 406 additions and 1452 deletions

View File

@ -334,15 +334,16 @@ public class CauldronHooks
writer.name("players").value(world.playerEntities.size());
writer.name("loadedChunks").value(world.theChunkProviderServer.loadedChunkHashMap_KC.size());
writer.name("activeChunks").value(world.activeChunkSet.size());
writer.name("entities").value(world.loadedEntityList_KC.size());
writer.name("tiles").value(world.loadedTileEntityList_KC.size());
writer.name("entities").value(world.loadedEntityList.size());
writer.name("tiles").value(world.loadedTileEntityList.size());
TObjectIntHashMap<ChunkCoordIntPair> chunkEntityCounts = new TObjectIntHashMap<ChunkCoordIntPair>();
TObjectIntHashMap<Class> classEntityCounts = new TObjectIntHashMap<Class>();
TObjectIntHashMap<Entity> entityCollisionCounts = new TObjectIntHashMap<Entity>();
Set<ChunkCoordinates> collidingCoords = new HashSet<ChunkCoordinates>();
for (Entity entity : world.loadedEntityList_KC)
for (int i = 0; i < world.loadedEntityList.size(); i++)
{
Entity entity = (Entity) world.loadedEntityList.get(i);
ChunkCoordIntPair chunkCoords = new ChunkCoordIntPair((int) entity.posX >> 4, (int) entity.posZ >> 4);
chunkEntityCounts.adjustOrPutValue(chunkCoords, 1, 1);
classEntityCounts.adjustOrPutValue(entity.getClass(), 1, 1);
@ -365,8 +366,9 @@ public class CauldronHooks
TObjectIntHashMap<ChunkCoordIntPair> chunkTileCounts = new TObjectIntHashMap<ChunkCoordIntPair>();
TObjectIntHashMap<Class> classTileCounts = new TObjectIntHashMap<Class>();
writer.name("tiles").beginArray();
for (TileEntity tile : world.loadedTileEntityList_KC)
for (int i = 0; i < world.loadedTileEntityList.size(); i++)
{
TileEntity tile = (TileEntity) world.loadedTileEntityList.get(i);
if (logAll)
{
writer.beginObject();