private void sortEntities(){
			int square;
			//Go through every row and sorts the entityRows list 
			for(int i = 0; i < Constants.TILE_AMOUNT_Y; i++){
				square = (i)*32;
				
				for(Entity e: entities){
					if(e.getY() >= square && e.getY() < square+32){
					entityRows.get(i).add(e);
					}	

				}
			}
			
			
		//Removes all entities then adds them in the correct order	
			entities.removeAll(entities);		

			for(int j = 0; j < Constants.TILE_AMOUNT_Y; j++){
				
			for(int i=0;i< entityRows.size(); i++){
			Collections.sort(entityRows.get(i));
			
			}
			entities.addAll(entityRows.get(j));
			
			entityRows.get(j).removeAll(entityRows.get(j));
			}
				
		}