Fix tests

This commit is contained in:
Nassim Jahnke
2022-06-08 17:31:27 +02:00
parent f07398f8ae
commit ce4dbaa014
6 changed files with 31 additions and 29 deletions

View File

@@ -176,7 +176,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ public static final MaterialSetTag BUCKETS = new MaterialSetTag(keyFor("buckets"))
+ .endsWith("BUCKET")
+ .ensureSize("BUCKETS", 10).lock();
+ .ensureSize("BUCKETS", 11).lock();
+
+ /**
+ * Covers coal and charcoal.
@@ -222,7 +222,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ public static final MaterialSetTag DOORS = new MaterialSetTag(keyFor("doors"))
+ .endsWith("_DOOR")
+ .ensureSize("DOORS", 9).lock();
+ .ensureSize("DOORS", 10).lock();
+
+ /**
+ * Covers all dyes.
@@ -236,14 +236,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ public static final MaterialSetTag FENCE_GATES = new MaterialSetTag(keyFor("fence_gates"))
+ .endsWith("_GATE")
+ .ensureSize("FENCE_GATES", 8).lock();
+ .ensureSize("FENCE_GATES", 9).lock();
+
+ /**
+ * Covers all variants of fences.
+ */
+ public static final MaterialSetTag FENCES = new MaterialSetTag(keyFor("fences"))
+ .endsWith("_FENCE")
+ .ensureSize("FENCES", 9).lock();
+ .ensureSize("FENCES", 10).lock();
+
+ /**
+ * Covers all variants of fish buckets.
@@ -357,7 +357,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ public static final MaterialSetTag PRESSURE_PLATES = new MaterialSetTag(keyFor("pressure_plates"))
+ .endsWith("_PRESSURE_PLATE")
+ .ensureSize("PRESSURE_PLATES", 12).lock();
+ .ensureSize("PRESSURE_PLATES", 13).lock();
+
+ /**
+ * Covers the variants of prismarine blocks.
@@ -436,7 +436,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs"))
+ .endsWith("_SPAWN_EGG")
+ .ensureSize("SPAWN_EGGS", 67).lock();
+ .ensureSize("SPAWN_EGGS", 71).lock();
+
+ /**
+ * Covers all colors of stained glass.
@@ -457,7 +457,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ public static final MaterialSetTag TRAPDOORS = new MaterialSetTag(keyFor("trapdoors"))
+ .endsWith("_TRAPDOOR")
+ .ensureSize("TRAPDOORS", 9).lock();
+ .ensureSize("TRAPDOORS", 10).lock();
+
+ /**
+ * Covers all wood variants of doors.
@@ -465,7 +465,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public static final MaterialSetTag WOODEN_DOORS = new MaterialSetTag(keyFor("wooden_doors"))
+ .endsWith("_DOOR")
+ .not(Material.IRON_DOOR)
+ .ensureSize("WOODEN_DOORS", 8).lock();
+ .ensureSize("WOODEN_DOORS", 9).lock();
+
+ /**
+ * Covers all wood variants of fences.
@@ -473,7 +473,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public static final MaterialSetTag WOODEN_FENCES = new MaterialSetTag(keyFor("wooden_fences"))
+ .endsWith("_FENCE")
+ .not(Material.NETHER_BRICK_FENCE)
+ .ensureSize("WOODEN_FENCES", 8).lock();
+ .ensureSize("WOODEN_FENCES", 9).lock();
+
+ /**
+ * Covers all wood variants of trapdoors.
@@ -481,14 +481,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public static final MaterialSetTag WOODEN_TRAPDOORS = new MaterialSetTag(keyFor("wooden_trapdoors"))
+ .endsWith("_TRAPDOOR")
+ .not(Material.IRON_TRAPDOOR)
+ .ensureSize("WOODEN_TRAPDOORS", 8).lock();
+ .ensureSize("WOODEN_TRAPDOORS", 9).lock();
+
+ /**
+ * Covers the wood variants of gates.
+ */
+ public static final MaterialSetTag WOODEN_GATES = new MaterialSetTag(keyFor("wooden_gates"))
+ .endsWith("_GATE")
+ .ensureSize("WOODEN_GATES", 8).lock();
+ .ensureSize("WOODEN_GATES", 9).lock();
+
+ /**
+ * Covers the variants of purpur.
@@ -502,7 +502,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ public static final MaterialSetTag SIGNS = new MaterialSetTag(keyFor("signs"))
+ .endsWith("_SIGN")
+ .ensureSize("SIGNS", 16).lock();
+ .ensureSize("SIGNS", 18).lock();
+
+ /**
+ * Covers the variants of a regular torch.
@@ -646,7 +646,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @SuppressWarnings("unchecked")
+ public static final MaterialSetTag COLORABLE = new MaterialSetTag(keyFor("colorable"))
+ .add(Tag.WOOL, Tag.CARPETS).add(SHULKER_BOXES, STAINED_GLASS, STAINED_GLASS_PANES, CONCRETES, BEDS).lock();
+ //.ensureSize("COLORABLE", 81).lock(); unit test don't have the vanilla item tags, so counts don't line up for real
+ //.ensureSize("COLORABLE", 81).lock(); unit test don't have the vanilla item tags, so counts don't line up for real
+
+ /**
+ * Covers the variants of coral.
@@ -674,28 +674,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * Covers all items that can be enchanted from the enchantment table or anvil.
+ */
+ public static final MaterialSetTag ENCHANTABLE = new MaterialSetTag(keyFor("enchantable"))
+ .add(PICKAXES, SWORDS, SHOVELS, AXES, HOES, HELMETS, CHEST_EQUIPPABLE, LEGGINGS, BOOTS, BOWS)
+ .add(Material.TRIDENT, Material.SHIELD, Material.FISHING_ROD, Material.SHEARS, Material.FLINT_AND_STEEL, Material.CARROT_ON_A_STICK, Material.WARPED_FUNGUS_ON_A_STICK)
+ .ensureSize("ENCHANTABLE", 65).lock();
+ .add(PICKAXES, SWORDS, SHOVELS, AXES, HOES, HELMETS, CHEST_EQUIPPABLE, LEGGINGS, BOOTS, BOWS)
+ .add(Material.TRIDENT, Material.SHIELD, Material.FISHING_ROD, Material.SHEARS, Material.FLINT_AND_STEEL, Material.CARROT_ON_A_STICK, Material.WARPED_FUNGUS_ON_A_STICK)
+ .ensureSize("ENCHANTABLE", 65).lock();
+
+ /**
+ * Covers the variants of raw ores.
+ */
+ public static final MaterialSetTag RAW_ORES = new MaterialSetTag(keyFor("raw_ores"))
+ .add(Material.RAW_COPPER, Material.RAW_GOLD, Material.RAW_IRON).lock();
+ .add(Material.RAW_COPPER, Material.RAW_GOLD, Material.RAW_IRON).lock();
+
+ /**
+ * Covers the variants of deepslate ores.
+ */
+ public static final MaterialSetTag DEEPSLATE_ORES = new MaterialSetTag(keyFor("deepslate_ores"))
+ .add(material -> material.name().startsWith("DEEPSLATE_") && material.name().endsWith("_ORE"))
+ .ensureSize("DEEPSLATE_ORES", 8).lock();
+ .add(material -> material.name().startsWith("DEEPSLATE_") && material.name().endsWith("_ORE"))
+ .ensureSize("DEEPSLATE_ORES", 8).lock();
+
+ /**
+ * Covers the variants of raw ore blocks.
+ */
+ public static final MaterialSetTag RAW_ORE_BLOCKS = new MaterialSetTag(keyFor("raw_ore_blocks"))
+ .add(Material.RAW_COPPER_BLOCK, Material.RAW_GOLD_BLOCK, Material.RAW_IRON_BLOCK).lock();
+ .add(Material.RAW_COPPER_BLOCK, Material.RAW_GOLD_BLOCK, Material.RAW_IRON_BLOCK).lock();
+
+ /**
+ * Covers all oxidized copper blocks.

View File

@@ -34,9 +34,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ testCompileOnly(checkerQual)
+ // Paper end
+
testImplementation("org.apache.commons:commons-lang3:3.12.0")
testImplementation("junit:junit:4.13.2")
testImplementation("org.hamcrest:hamcrest-library:1.3")
testImplementation("org.ow2.asm:asm-tree:9.3")
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> {
options.links(
"https://guava.dev/releases/31.0.1-jre/api/docs/",

View File

@@ -56,6 +56,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ compileOnly(annotations)
+ testCompileOnly(annotations)
+
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
+ testImplementation("junit:junit:4.13.2")
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
+ testImplementation("org.ow2.asm:asm-tree:9.3")