(String path)
| 248 | } |
| 249 | |
| 250 | public boolean isValid(String path) |
| 251 | { |
| 252 | if (this.source == null) |
| 253 | { |
| 254 | Config.warn("No source texture: " + path); |
| 255 | return false; |
| 256 | } |
| 257 | else |
| 258 | { |
| 259 | this.source = TextureUtils.fixResourcePath(this.source, TextureUtils.getBasePath(path)); |
| 260 | |
| 261 | if (this.startFadeIn >= 0 && this.endFadeIn >= 0 && this.endFadeOut >= 0) |
| 262 | { |
| 263 | int i = this.normalizeTime(this.endFadeIn - this.startFadeIn); |
| 264 | |
| 265 | if (this.startFadeOut < 0) |
| 266 | { |
| 267 | this.startFadeOut = this.normalizeTime(this.endFadeOut - i); |
| 268 | |
| 269 | if (this.timeBetween(this.startFadeOut, this.startFadeIn, this.endFadeIn)) |
| 270 | { |
| 271 | this.startFadeOut = this.endFadeIn; |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | int j = this.normalizeTime(this.startFadeOut - this.endFadeIn); |
| 276 | int k = this.normalizeTime(this.endFadeOut - this.startFadeOut); |
| 277 | int l = this.normalizeTime(this.startFadeIn - this.endFadeOut); |
| 278 | int i1 = i + j + k + l; |
| 279 | |
| 280 | if (i1 != 24000) |
| 281 | { |
| 282 | Config.warn("Invalid fadeIn/fadeOut times, sum is not 24h: " + i1); |
| 283 | return false; |
| 284 | } |
| 285 | else if (this.speed < 0.0F) |
| 286 | { |
| 287 | Config.warn("Invalid speed: " + this.speed); |
| 288 | return false; |
| 289 | } |
| 290 | else if (this.daysLoop <= 0) |
| 291 | { |
| 292 | Config.warn("Invalid daysLoop: " + this.daysLoop); |
| 293 | return false; |
| 294 | } |
| 295 | else |
| 296 | { |
| 297 | return true; |
| 298 | } |
| 299 | } |
| 300 | else |
| 301 | { |
| 302 | Config.warn("Invalid times, required are: startFadeIn, endFadeIn and endFadeOut."); |
| 303 | return false; |
| 304 | } |
| 305 | } |
| 306 | } |
| 307 |
no test coverage detected