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

Method parseColor

src/main/java/net/optifine/CustomColors.java:687–707  ·  view source on GitHub ↗
(String str)

Source from the content-addressed store, hash-verified

685 }
686
687 private static int parseColor(String str)
688 {
689 if (str == null)
690 {
691 return -1;
692 }
693 else
694 {
695 str = str.trim();
696
697 try
698 {
699 int i = Integer.parseInt(str, 16) & 16777215;
700 return i;
701 }
702 catch (NumberFormatException var2)
703 {
704 return -1;
705 }
706 }
707 }
708
709 private static Vec3 readColorVec3(Properties props, String name)
710 {

Callers 6

readColorMethod · 0.95
readSpawnEggColorsMethod · 0.95
readDyeColorsMethod · 0.95
readTextColorsMethod · 0.95
readMapColorsMethod · 0.95
readPotionColorsMethod · 0.95

Calls 2

trimMethod · 0.80
parseIntMethod · 0.45

Tested by

no test coverage detected