Gets the DyeColor with the given wool data value. @param data Wool data value to fetch @return The DyeColor representing the given value, or null if it doesn't exist @see #getByDyeData(byte) @apiNote Internal Use Only
(final byte data)
| 145 | * @apiNote Internal Use Only |
| 146 | */ |
| 147 | @org.jetbrains.annotations.ApiStatus.Internal // Paper |
| 148 | @Nullable |
| 149 | public static DyeColor getByWoolData(final byte data) { |
| 150 | int i = 0xff & data; |
| 151 | if (i >= BY_WOOL_DATA.length) { |
| 152 | return null; |
| 153 | } |
| 154 | return BY_WOOL_DATA[i]; |
| 155 | } |
| 156 | |
| 157 | /** |
| 158 | * Gets the DyeColor with the given dye data value. |
no outgoing calls