Polls a new SeedQueueEntry from the queue and plays it. @return True if a new SeedQueueEntry was successfully loaded.
()
| 77 | * @return True if a new {@link SeedQueueEntry} was successfully loaded. |
| 78 | */ |
| 79 | public static boolean playEntry() { |
| 80 | if (!MinecraftClient.getInstance().isOnThread()) { |
| 81 | throw new RuntimeException("Tried to load a SeedQueueEntry off-thread!"); |
| 82 | } |
| 83 | synchronized (LOCK) { |
| 84 | currentEntry = SEED_QUEUE.poll(); |
| 85 | } |
| 86 | if (currentEntry == null) { |
| 87 | return false; |
| 88 | } |
| 89 | ping(); |
| 90 | play(); |
| 91 | return true; |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * Removes the given {@link SeedQueueEntry} from the queue and plays it. |
no test coverage detected