Gets the DyeColor with the given dye data value. @param data Dye data value to fetch @return The DyeColor representing the given value, or null if it doesn't exist @see #getByWoolData(byte) @deprecated Magic value
(final byte data)
| 164 | * @deprecated Magic value |
| 165 | */ |
| 166 | @Deprecated |
| 167 | @Nullable |
| 168 | public static DyeColor getByDyeData(final byte data) { |
| 169 | int i = 0xff & data; |
| 170 | if (i >= BY_DYE_DATA.length) { |
| 171 | return null; |
| 172 | } |
| 173 | return BY_DYE_DATA[i]; |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * Gets the DyeColor with the given color value. |