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

Method getByData

paper-api/src/test/java/org/bukkit/DyeColorTest.java:13–21  ·  view source on GitHub ↗
(DyeColor dye)

Source from the content-addressed store, hash-verified

11public class DyeColorTest {
12
13 @ParameterizedTest
14 @EnumSource(DyeColor.class)
15 @SuppressWarnings("deprecation")
16 public void getByData(DyeColor dye) {
17 byte data = dye.getWoolData();
18
19 DyeColor byData = DyeColor.getByWoolData(data);
20 assertThat(byData, is(dye));
21 }
22
23 @ParameterizedTest
24 @EnumSource(DyeColor.class)

Callers

nothing calls this directly

Calls 4

getByWoolDataMethod · 0.95
getWoolDataMethod · 0.80
isMethod · 0.65
assertThatMethod · 0.45

Tested by

no test coverage detected