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

Method getPotionId

src/main/java/net/optifine/CustomColors.java:1668–1690  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

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 {

Callers 1

readPotionColorsMethod · 0.95

Calls 3

getNameMethod · 0.95
getIdMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected