(String name)
| 1666 | } |
| 1667 | |
| 1668 | private static int getPotionId(String name) |
| 1669 | { |
| 1670 | if (name.equals("potion.water")) |
| 1671 | { |
| 1672 | return 0; |
| 1673 | } |
| 1674 | else |
| 1675 | { |
| 1676 | Potion[] apotion = Potion.potionTypes; |
| 1677 | |
| 1678 | for (int i = 0; i < apotion.length; ++i) |
| 1679 | { |
| 1680 | Potion potion = apotion[i]; |
| 1681 | |
| 1682 | if (potion != null && potion.getName().equals(name)) |
| 1683 | { |
| 1684 | return potion.getId(); |
| 1685 | } |
| 1686 | } |
| 1687 | |
| 1688 | return -1; |
| 1689 | } |
| 1690 | } |
| 1691 | |
| 1692 | public static int getPotionColor(int potionId, int color) |
| 1693 | { |
no test coverage detected