From 85c906e896cbf8cd23d4fb296376096c6b2fec27 Mon Sep 17 00:00:00 2001 From: HexedHero <6012891+HexedHero@users.noreply.github.com> Date: Fri, 27 Nov 2020 15:26:52 +0000 Subject: [PATCH] Add Material Tags for Coral, Coral Fangs and Coral Blocks --- .../0153-Add-Material-Tags.patch | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Spigot-API-Patches/0153-Add-Material-Tags.patch b/Spigot-API-Patches/0153-Add-Material-Tags.patch index 8f9aee922c..7b9c60c564 100644 --- a/Spigot-API-Patches/0153-Add-Material-Tags.patch +++ b/Spigot-API-Patches/0153-Add-Material-Tags.patch @@ -204,10 +204,10 @@ index 0000000000000000000000000000000000000000..c91ea2a0679a7f3a5627b5a008e0b39d +} diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java new file mode 100644 -index 0000000000000000000000000000000000000000..552ba6b90b6dc1ae586af10cd8a8d4833693dea9 +index 0000000000000000000000000000000000000000..0328532bb4848d55a719c96ea3df4ac545b5b05a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java -@@ -0,0 +1,511 @@ +@@ -0,0 +1,533 @@ +/* + * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License + * @@ -718,6 +718,28 @@ index 0000000000000000000000000000000000000000..552ba6b90b6dc1ae586af10cd8a8d483 + public static final MaterialSetTag COLORABLE = new MaterialSetTag(keyFor("colorable")) + .add(Tag.WOOL, Tag.CARPETS).add(SHULKER_BOXES, STAINED_GLASS, STAINED_GLASS_PANES, CONCRETES, BEDS); + //.ensureSize("COLORABLE", 81); unit test don't have the vanilla item tags, so counts don't line up for real ++ ++ /** ++ * Covers the variants of coral. ++ */ ++ public static final MaterialSetTag CORAL = new MaterialSetTag(keyFor("coral")) ++ .endsWith("_CORAL") ++ .ensureSize("CORAL", 10); ++ ++ /** ++ * Covers the variants of coral fans. ++ */ ++ public static final MaterialSetTag CORAL_FANS = new MaterialSetTag(keyFor("coral_fans")) ++ .endsWith("_CORAL_FAN") ++ .endsWith("_CORAL_WALL_FAN") ++ .ensureSize("CORAL_FANS", 20); ++ ++ /** ++ * Covers the variants of coral blocks. ++ */ ++ public static final MaterialSetTag CORAL_BLOCKS = new MaterialSetTag(keyFor("coral_blocks")) ++ .endsWith("_CORAL_BLOCK") ++ .ensureSize("CORAL_BLOCKS", 10); +} diff --git a/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java b/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java new file mode 100644