1
1
package org .bukkit ;
2
2
3
- import static org .bukkit .support .MatcherAssert .*;
4
- import static org .hamcrest .Matchers .*;
5
- import static org .junit .jupiter .api .Assertions .*;
6
-
7
- import net .minecraft .core .component .DataComponents ;
8
3
import org .bukkit .block .data .BlockData ;
9
- import org .bukkit .craftbukkit .util .CraftMagicNumbers ;
10
- import org .bukkit .enchantments .EnchantmentTarget ;
11
4
import org .bukkit .material .MaterialData ;
12
5
import org .bukkit .support .environment .AllFeatures ;
13
6
import org .junit .jupiter .api .Disabled ;
14
7
import org .junit .jupiter .params .ParameterizedTest ;
15
8
import org .junit .jupiter .params .provider .EnumSource ;
16
9
10
+ import static org .junit .jupiter .api .Assertions .assertFalse ;
11
+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
12
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
13
+
17
14
@ AllFeatures
18
15
public class PerMaterialTest {
19
16
@@ -30,16 +27,6 @@ public void isTransparent(Material material) {
30
27
}
31
28
}
32
29
33
- @ ParameterizedTest
34
- @ EnumSource (value = Material .class , names = "LEGACY_.*" , mode = EnumSource .Mode .MATCH_NONE )
35
- public void usesDurability (Material material ) {
36
- if (!material .isBlock ()) {
37
- assertThat (EnchantmentTarget .BREAKABLE .includes (material ), is (CraftMagicNumbers .getItem (material ).components ().getOrDefault (DataComponents .MAX_DAMAGE , 0 ) > 0 ));
38
- } else {
39
- assertFalse (EnchantmentTarget .BREAKABLE .includes (material ));
40
- }
41
- }
42
-
43
30
@ ParameterizedTest
44
31
@ EnumSource (value = Material .class , names = "LEGACY_.*" , mode = EnumSource .Mode .MATCH_NONE )
45
32
public void testBlockDataCreation (Material material ) {
0 commit comments