Represents the three different types of Sandstone @deprecated use org.bukkit.block.data.BlockData
| 9 | * @deprecated use {@link org.bukkit.block.data.BlockData} |
| 10 | */ |
| 11 | @Deprecated(forRemoval = true, since = "1.13") |
| 12 | public enum SandstoneType { |
| 13 | CRACKED(0x0), |
| 14 | GLYPHED(0x1), |
| 15 | SMOOTH(0x2); |
| 16 | |
| 17 | private final byte data; |
| 18 | private static final Map<Byte, SandstoneType> BY_DATA = Maps.newHashMap(); |
| 19 | |
| 20 | private SandstoneType(final int data) { |
| 21 | this.data = (byte) data; |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Gets the associated data value representing this type of sandstone |
| 26 | * |
| 27 | * @return A byte containing the data value of this sandstone type |
| 28 | * @deprecated Magic value |
| 29 | */ |
| 30 | @Deprecated(since = "1.6.2") |
| 31 | public byte getData() { |
| 32 | return data; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Gets the type of sandstone with the given data value |
| 37 | * |
| 38 | * @param data Data value to fetch |
| 39 | * @return The {@link SandstoneType} representing the given value, or null |
| 40 | * if it doesn't exist |
| 41 | * @deprecated Magic value |
| 42 | */ |
| 43 | @Deprecated(since = "1.6.2") |
| 44 | @Nullable |
| 45 | public static SandstoneType getByData(final byte data) { |
| 46 | return BY_DATA.get(data); |
| 47 | } |
| 48 | |
| 49 | static { |
| 50 | for (SandstoneType type : values()) { |
| 51 | BY_DATA.put(type.data, type); |
| 52 | } |
| 53 | } |
| 54 | } |
nothing calls this directly
no test coverage detected