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

Method isValid

src/main/java/net/optifine/CustomColormap.java:100–144  ·  view source on GitHub ↗
(String path)

Source from the content-addressed store, hash-verified

98 }
99
100 public boolean isValid(String path)
101 {
102 if (this.format != 0 && this.format != 1)
103 {
104 if (this.format != 2)
105 {
106 return false;
107 }
108
109 if (this.color < 0)
110 {
111 this.color = 16777215;
112 }
113 }
114 else
115 {
116 if (this.source == null)
117 {
118 warn("Source not defined: " + path);
119 return false;
120 }
121
122 this.readColors();
123
124 if (this.colors == null)
125 {
126 return false;
127 }
128
129 if (this.color < 0)
130 {
131 if (this.format == 0)
132 {
133 this.color = this.getColor(127, 127);
134 }
135
136 if (this.format == 1)
137 {
138 this.color = this.getColorGrid(BiomeGenBase.plains, new BlockPos(0, 64, 0));
139 }
140 }
141 }
142
143 return true;
144 }
145
146 public boolean isValidMatchBlocks(String path)
147 {

Callers 2

readBlockColormapsMethod · 0.95
getCustomColorsMethod · 0.95

Calls 4

warnMethod · 0.95
readColorsMethod · 0.95
getColorMethod · 0.95
getColorGridMethod · 0.95

Tested by

no test coverage detected