()
| 3581 | } |
| 3582 | |
| 3583 | private static void loadEntityDataMap() |
| 3584 | { |
| 3585 | mapBlockToEntityData = new IdentityHashMap(300); |
| 3586 | |
| 3587 | if (mapBlockToEntityData.isEmpty()) |
| 3588 | { |
| 3589 | for (ResourceLocation resourcelocation : Block.blockRegistry.getKeys()) |
| 3590 | { |
| 3591 | Block block = (Block)Block.blockRegistry.getObject(resourcelocation); |
| 3592 | int i = Block.blockRegistry.getIDForObject(block); |
| 3593 | mapBlockToEntityData.put(block, Integer.valueOf(i)); |
| 3594 | } |
| 3595 | } |
| 3596 | |
| 3597 | BufferedReader bufferedreader = null; |
| 3598 | |
| 3599 | try |
| 3600 | { |
| 3601 | bufferedreader = new BufferedReader(new InputStreamReader(shaderPack.getResourceAsStream("/mc_Entity_x.txt"))); |
| 3602 | } |
| 3603 | catch (Exception var8) |
| 3604 | { |
| 3605 | ; |
| 3606 | } |
| 3607 | |
| 3608 | if (bufferedreader != null) |
| 3609 | { |
| 3610 | String s1; |
| 3611 | |
| 3612 | try |
| 3613 | { |
| 3614 | while ((s1 = bufferedreader.readLine()) != null) |
| 3615 | { |
| 3616 | Matcher matcher = patternLoadEntityDataMap.matcher(s1); |
| 3617 | |
| 3618 | if (matcher.matches()) |
| 3619 | { |
| 3620 | String s2 = matcher.group(1); |
| 3621 | String s = matcher.group(2); |
| 3622 | int j = Integer.parseInt(s); |
| 3623 | Block block1 = Block.getBlockFromName(s2); |
| 3624 | |
| 3625 | if (block1 != null) |
| 3626 | { |
| 3627 | mapBlockToEntityData.put(block1, Integer.valueOf(j)); |
| 3628 | } |
| 3629 | else |
| 3630 | { |
| 3631 | SMCLog.warning("Unknown block name %s", new Object[] {s2}); |
| 3632 | } |
| 3633 | } |
| 3634 | else |
| 3635 | { |
| 3636 | SMCLog.warning("unmatched %s\n", new Object[] {s1}); |
| 3637 | } |
| 3638 | } |
| 3639 | } |
| 3640 | catch (Exception var9) |
no test coverage detected