Commits
md_5 authored a6e485c28b3
1 1 | package org.bukkit.block.data.type; |
2 2 | |
3 3 | import org.bukkit.block.data.Orientable; |
4 4 | import org.jetbrains.annotations.ApiStatus; |
5 + | import org.jetbrains.annotations.NotNull; |
5 6 | |
6 7 | /** |
7 - | * 'active' is whether the block is active. |
8 + | * 'creaking_heart_state' indicates the current operational phase of the block. |
8 9 | * <br> |
9 10 | * 'natural' is whether this is a naturally generated block. |
10 11 | */ |
11 12 | Experimental | .
12 13 | public interface CreakingHeart extends Orientable { |
13 14 | |
14 15 | /** |
15 16 | * Gets the value of the 'active' property. |
16 17 | * |
17 18 | * @return the 'active' value |
19 + | * @deprecated use {@link #getCreakingHeartState()} |
18 20 | */ |
21 + | since = "1.21.5") | (
19 22 | boolean isActive(); |
20 23 | |
21 24 | /** |
22 25 | * Sets the value of the 'active' property. |
23 26 | * |
24 27 | * @param active the new 'active' value |
28 + | * @deprecated use {@link #setCreakingHeartState(org.bukkit.block.data.type.CreakingHeart.State)} |
25 29 | */ |
30 + | since = "1.21.5") | (
26 31 | void setActive(boolean active); |
27 32 | |
28 33 | /** |
29 34 | * Gets the value of the 'natural' property. |
30 35 | * |
31 36 | * @return the 'natural' value |
32 37 | */ |
33 38 | boolean isNatural(); |
34 39 | |
35 40 | /** |
36 41 | * Sets the value of the 'natural' property. |
37 42 | * |
38 43 | * @param natural the new 'natural' value |
39 44 | */ |
40 45 | void setNatural(boolean natural); |
46 + | |
47 + | /** |
48 + | * Gets the value of the 'creaking_heart_state' property. |
49 + | * |
50 + | * @return the 'creaking_heart_state' value |
51 + | */ |
52 + | |
53 + | State getCreakingHeartState(); |
54 + | |
55 + | /** |
56 + | * Sets the value of the 'creaking_heart_state' property. |
57 + | * |
58 + | * @param state the new 'creaking_heart_state' value |
59 + | */ |
60 + | void setCreakingHeartState( State state); |
61 + | |
62 + | public enum State { |
63 + | |
64 + | UPROOTED, |
65 + | DORMANT, |
66 + | AWAKE; |
67 + | } |
41 68 | } |