()
| 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 | { |
no test coverage detected