MCPcopy Create free account
hub / github.com/contariaa/seedqueue / playEntry

Method playEntry

src/main/java/me/contaria/seedqueue/SeedQueue.java:79–92  ·  view source on GitHub ↗

Polls a new SeedQueueEntry from the queue and plays it. @return True if a new SeedQueueEntry was successfully loaded.

()

Source from the content-addressed store, hash-verified

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.

Callers 2

playEntryMethod · 0.95

Calls 3

pingMethod · 0.95
playMethod · 0.95
getInstanceMethod · 0.80

Tested by

no test coverage detected