blob: fb1c78979558a4e6d7949500cc7c3d2812e93121 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*
* Roughly Enough Items by Danielshe.
* Licensed under the MIT License.
*/
package me.shedaniel.rei.impl;
import me.shedaniel.rei.api.annotations.Internal;
@Internal
public enum Weather {
CLEAR(0, "text.rei.weather.clear"),
RAIN(1, "text.rei.weather.rain"),
THUNDER(2, "text.rei.weather.thunder");
private final int id;
private final String translateKey;
Weather(int id, String translateKey) {
this.id = id;
this.translateKey = translateKey;
}
public static Weather byId(int id) {
return byId(id, CLEAR);
}
public static Weather byId(int id, Weather defaultWeather) {
for (Weather weather : values()) {
if (weather.id == id)
return weather;
}
return defaultWeather;
}
public int getId() {
return id;
}
public String getTranslateKey() {
return translateKey;
}
}
|