MCPcopy Create free account
hub / github.com/BuildCraft/BuildCraft / fillEntries

Method fillEntries

common/buildcraft/lib/BCLibDatabase.java:77–88  ·  view source on GitHub ↗

Re-populates the #allEntries list from the available databases. Call this after changing one of them.

()

Source from the content-addressed store, hash-verified

75
76 /** Re-populates the {@link #allEntries} list from the available databases. Call this after changing one of them. */
77 public static void fillEntries() {
78 allEntries.clear();
79 allEntries.addAll(BCLibDatabase.LOCAL_DB.getAllHeaders());
80 if (BCLibDatabase.remoteDB != null) {
81 for (LibraryEntryHeader header : BCLibDatabase.remoteDB.getAllHeaders()) {
82 if (!allEntries.contains(header)) {
83 allEntries.add(header);
84 }
85 }
86 }
87 allEntries.sort(Comparator.naturalOrder());
88 }
89
90 public static EntryStatus getStatus(LibraryEntryHeader header) {
91 boolean local = LOCAL_DB.getAllHeaders().contains(header);

Callers 5

onServerStartedMethod · 0.95
connectToServerMethod · 0.95
onMessageMethod · 0.95
onMessageMethod · 0.95
updateMethod · 0.95

Calls 5

addAllMethod · 0.80
clearMethod · 0.65
containsMethod · 0.65
getAllHeadersMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected