MCPcopy Create free account
hub / github.com/PaperMC/Paper / CropState

Enum CropState

paper-api/src/main/java/org/bukkit/CropState.java:10–83  ·  view source on GitHub ↗

Represents the different growth states of crops

Source from the content-addressed store, hash-verified

8 * Represents the different growth states of crops
9 */
10@Deprecated(forRemoval = true, since = "1.13")
11public enum CropState {
12
13 /**
14 * State when first seeded
15 */
16 SEEDED(0x0),
17 /**
18 * First growth stage
19 */
20 GERMINATED(0x1),
21 /**
22 * Second growth stage
23 */
24 VERY_SMALL(0x2),
25 /**
26 * Third growth stage
27 */
28 SMALL(0x3),
29 /**
30 * Fourth growth stage
31 */
32 MEDIUM(0x4),
33 /**
34 * Fifth growth stage
35 */
36 TALL(0x5),
37 /**
38 * Almost ripe stage
39 */
40 VERY_TALL(0x6),
41 /**
42 * Ripe stage
43 */
44 RIPE(0x7);
45
46 private final byte data;
47 private static final Map<Byte, CropState> BY_DATA = Maps.newHashMap();
48
49 private CropState(final int data) {
50 this.data = (byte) data;
51 }
52
53 /**
54 * Gets the associated data value representing this growth state
55 *
56 * @return A byte containing the data value of this growth state
57 * @deprecated Magic value
58 */
59 @Deprecated(since = "1.6.2")
60 public byte getData() {
61 return data;
62 }
63
64 /**
65 * Gets the CropState with the given data value
66 *
67 * @param data Data value to fetch

Callers

nothing calls this directly

Calls 4

newHashMapMethod · 0.80
valuesMethod · 0.65
putMethod · 0.65
getDataMethod · 0.65

Tested by

no test coverage detected