MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / call

Method call

Minecraft-Utils/1.12.2/src/ResourceManager.java:203–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201 try {
202 return moduleIds.get(modelId, new Callable<String>() {
203 @Override
204 public String call() throws Exception {
205 HttpURLConnection connection = null;
206 BufferedReader reader = null;
207 try {
208 connection = (HttpURLConnection) new URL(BASE_URL + "models/" + PLAYER_RESOURCE_VERSION + "/" + modelId).openConnection();
209 if (connection.getResponseCode() != 200) {
210 return null;
211 }
212 reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
213 return reader.readLine();
214 } finally {
215 IOUtils.closeQuietly(reader);
216 if (connection != null) {
217 connection.disconnect();
218 }
219 }
220 }
221 });
222 } catch (ExecutionException e) {
223 MinecraftFactory.getClassProxyCallback().getLogger().warn("Could not load model data with id " + modelId, e);

Callers

nothing calls this directly

Calls 2

disconnectMethod · 0.80
openConnectionMethod · 0.45

Tested by

no test coverage detected