MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / initialize

Method initialize

src/main/java/net/optifine/RandomEntities.java:416–461  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

414 }
415
416 private static void initialize()
417 {
418 renderGlobal = Config.getRenderGlobal();
419 tileEntityRendererDispatcher = TileEntityRendererDispatcher.instance;
420 String[] astring = new String[] {"optifine/random/", "mcpatcher/mob/"};
421 String[] astring1 = new String[] {".png", ".properties"};
422 String[] astring2 = ResUtils.collectFiles(astring, astring1);
423 Set set = new HashSet();
424
425 for (int i = 0; i < astring2.length; ++i)
426 {
427 String s = astring2[i];
428 s = StrUtils.removeSuffix(s, astring1);
429 s = StrUtils.trimTrailing(s, "0123456789");
430 s = s + ".png";
431 String s1 = getPathBase(s);
432
433 if (!set.contains(s1))
434 {
435 set.add(s1);
436 ResourceLocation resourcelocation = new ResourceLocation(s1);
437
438 if (Config.hasResource(resourcelocation))
439 {
440 RandomEntityProperties randomentityproperties = (RandomEntityProperties)mapProperties.get(s1);
441
442 if (randomentityproperties == null)
443 {
444 randomentityproperties = makeProperties(resourcelocation, false);
445
446 if (randomentityproperties == null)
447 {
448 randomentityproperties = makeProperties(resourcelocation, true);
449 }
450
451 if (randomentityproperties != null)
452 {
453 mapProperties.put(s1, randomentityproperties);
454 }
455 }
456 }
457 }
458 }
459
460 active = !mapProperties.isEmpty();
461 }
462
463 public static void dbg(String str)
464 {

Callers 1

updateMethod · 0.95

Calls 12

getRenderGlobalMethod · 0.95
collectFilesMethod · 0.95
removeSuffixMethod · 0.95
trimTrailingMethod · 0.95
getPathBaseMethod · 0.95
hasResourceMethod · 0.95
makePropertiesMethod · 0.95
getMethod · 0.65
putMethod · 0.65
containsMethod · 0.45
addMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected