(ChunkWatchEvent.Watch aEvent)
| 916 | } |
| 917 | |
| 918 | @SubscribeEvent(priority = EventPriority.LOWEST) |
| 919 | public void onChunkWatchEvent(ChunkWatchEvent.Watch aEvent) { |
| 920 | Chunk tChunk = aEvent.player.worldObj.getChunkFromChunkCoords(aEvent.chunk.chunkXPos, aEvent.chunk.chunkZPos); |
| 921 | if (tChunk != null && tChunk.isTerrainPopulated) { |
| 922 | byte tIterations = 8; |
| 923 | HashSetNoNulls<Object> tSet = new HashSetNoNulls<>(); |
| 924 | while (tIterations-->0) try { |
| 925 | for (Object tTileEntity : tChunk.chunkTileEntityMap.values()) if (tTileEntity instanceof ITileEntitySynchronising) if (tSet.add(tTileEntity)) ((ITileEntitySynchronising)tTileEntity).sendUpdateToPlayer(aEvent.player); |
| 926 | tIterations = 0; |
| 927 | } catch(ConcurrentModificationException e) { |
| 928 | if (tIterations <= 0) ERR.println("Failed to Iterate 8 times. Giving up on sending Data to Client!"); |
| 929 | } |
| 930 | } |
| 931 | } |
| 932 | |
| 933 | @SubscribeEvent(priority = EventPriority.LOWEST) |
| 934 | public void onPlayerDestroyItem(PlayerDestroyItemEvent aEvent) { |
nothing calls this directly
no test coverage detected