diff --git a/patches/api/Add-Material-Tags.patch b/patches/api/Add-Material-Tags.patch index 840c646fa6..b05eec7a1c 100644 --- a/patches/api/Add-Material-Tags.patch +++ b/patches/api/Add-Material-Tags.patch @@ -686,6 +686,82 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + 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); ++ ++ ++ /** ++ * Covers all oxidized copper blocks. ++ */ ++ public static final MaterialSetTag OXIDIZED_COPPER_BLOCKS = new MaterialSetTag(keyFor("oxidized_copper_blocks")) ++ .startsWith("OXIDIZED_").startsWith("WAXED_OXIDIZED_").ensureSize("OXIDIZED_COPPER_BLOCKS", 8); ++ ++ /** ++ * Covers all weathered copper blocks. ++ */ ++ public static final MaterialSetTag WEATHERED_COPPER_BLOCKS = new MaterialSetTag(keyFor("weathered_copper_blocks")) ++ .startsWith("WEATHERED_").startsWith("WAXED_WEATHERED_").ensureSize("WEATHERED_COPPER_BLOCKS", 8); ++ ++ /** ++ * Covers all exposed copper blocks. ++ */ ++ public static final MaterialSetTag EXPOSED_COPPER_BLOCKS = new MaterialSetTag(keyFor("exposed_copper_blocks")) ++ .startsWith("EXPOSED_").startsWith("WAXED_EXPOSED_").ensureSize("EXPOSED_COPPER_BLOCKS", 8); ++ ++ /** ++ * Covers all un-weathered copper blocks. ++ */ ++ public static final MaterialSetTag UNAFFECTED_COPPER_BLOCKS = new MaterialSetTag(keyFor("unaffected_copper_blocks")) ++ .startsWith("CUT_COPPER").startsWith("WAXED_CUT_COPPER").add(Material.COPPER_BLOCK).add(Material.WAXED_COPPER_BLOCK).ensureSize("UNAFFECTED_COPPER_BLOCKS", 8); ++ ++ /** ++ * Covers all waxed copper blocks. ++ *
++ * Combine with other copper-related tags to filter is-waxed or not. ++ */ ++ public static final MaterialSetTag WAXED_COPPER_BLOCKS = new MaterialSetTag(keyFor("waxed_copper_blocks")) ++ .add(m -> m.name().startsWith("WAXED_") && m.name().contains("COPPER")).ensureSize("WAXED_COPPER_BLOCKS", 16); ++ ++ /** ++ * Covers all un-waxed copper blocks. ++ *
++ * Combine with other copper-related tags to filter is-un-waxed or not. ++ */ ++ public static final MaterialSetTag UNWAXED_COPPER_BLOCKS = new MaterialSetTag(keyFor("unwaxed_copper_blocks")) ++ .contains("CUT_COPPER").endsWith("_COPPER").notContains("WAXED").ensureSize("UNWAXED_COPPER_BLOCKS", 16); ++ ++ /** ++ * Covers all copper block variants. ++ */ ++ public static final MaterialSetTag COPPER_BLOCKS = new MaterialSetTag(keyFor("copper_blocks")) ++ .add(WAXED_COPPER_BLOCKS).add(UNWAXED_COPPER_BLOCKS).ensureSize("COPPER_BLOCKS", 32); ++ ++ /** ++ * Covers all weathering/waxed states of the plain copper block. ++ */ ++ public static final MaterialSetTag FULL_COPPER_BLOCKS = new MaterialSetTag(keyFor("full_copper_blocks")) ++ .contains("OXIDIZED_COPPER") ++ .contains("WEATHERED_COPPER") ++ .contains("EXPOSED_COPPER") ++ .contains("COPPER_BLOCK") ++ .not(Material.RAW_COPPER_BLOCK) ++ .ensureSize("FULL_COPPER_BLOCKS", 8); ++ ++ /** ++ * Covers all weathering/waxed states of the cut copper block. ++ */ ++ public static final MaterialSetTag CUT_COPPER_BLOCKS = new MaterialSetTag(keyFor("cut_copper_blocks")) ++ .endsWith("CUT_COPPER").ensureSize("CUT_COPPER_BLOCKS", 8); ++ ++ /** ++ * Covers all weathering/waxed states of the cut copper stairs. ++ */ ++ public static final MaterialSetTag CUT_COPPER_STAIRS = new MaterialSetTag(keyFor("cut_copper_stairs")) ++ .endsWith("CUT_COPPER_STAIRS").ensureSize("CUT_COPPER_STAIRS", 8); ++ ++ /** ++ * Covers all weathering/waxed states of the cut copper slab. ++ */ ++ public static final MaterialSetTag CUT_COPPER_SLABS = new MaterialSetTag(keyFor("cut_copper_slabs")) ++ .endsWith("CUT_COPPER_SLAB").ensureSize("CUT_COPPER_SLABS", 8); +} diff --git a/src/main/java/io/papermc/paper/tag/BaseTag.java b/src/main/java/io/papermc/paper/tag/BaseTag.java new file mode 100644