From d4f44e988c29a954442e9bb75e5b2c831ab9ba1d Mon Sep 17 00:00:00 2001 From: Video Date: Fri, 15 Apr 2022 05:08:11 -0600 Subject: [PATCH] Additional future-proofing --- .../totalfreedommod/util/Groups.java | 76 +------------------ 1 file changed, 3 insertions(+), 73 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java b/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java index 0df27d99..5c1b7c9b 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java @@ -8,81 +8,11 @@ import org.bukkit.entity.EntityType; public class Groups { - public static final List WOOL_COLORS = Arrays.asList( - Material.WHITE_WOOL, - Material.RED_WOOL, - Material.ORANGE_WOOL, - Material.YELLOW_WOOL, - Material.GREEN_WOOL, - Material.LIME_WOOL, - Material.LIGHT_BLUE_WOOL, - Material.CYAN_WOOL, - Material.BLUE_WOOL, - Material.PURPLE_WOOL, - Material.MAGENTA_WOOL, - Material.PINK_WOOL, - Material.BROWN_WOOL, - Material.GRAY_WOOL, - Material.LIGHT_GRAY_WOOL, - Material.BLACK_WOOL); - - public static final List SHULKER_BOXES = Arrays.asList( - Material.SHULKER_BOX, - Material.WHITE_SHULKER_BOX, - Material.RED_SHULKER_BOX, - Material.ORANGE_SHULKER_BOX, - Material.YELLOW_SHULKER_BOX, - Material.GREEN_SHULKER_BOX, - Material.LIME_SHULKER_BOX, - Material.LIGHT_BLUE_SHULKER_BOX, - Material.CYAN_SHULKER_BOX, - Material.BLUE_SHULKER_BOX, - Material.PURPLE_SHULKER_BOX, - Material.MAGENTA_SHULKER_BOX, - Material.PINK_SHULKER_BOX, - Material.BROWN_SHULKER_BOX, - Material.GRAY_SHULKER_BOX, - Material.LIGHT_GRAY_SHULKER_BOX, - Material.BLACK_SHULKER_BOX); - + public static final List WOOL_COLORS = Arrays.stream(Material.values()).filter((m) -> m.name().endsWith("_WOOL")).toList(); + public static final List SHULKER_BOXES = Arrays.stream(Material.values()).filter((m) -> m.name().endsWith("SHULKER_BOX")).toList(); public static final List MOB_TYPES = Arrays.stream(EntityType.values()).filter(EntityType::isAlive).filter(EntityType::isSpawnable).toList(); - public static final List SPAWN_EGGS = Arrays.stream(Material.values()).filter((mat) -> mat.name().endsWith("_SPAWN_EGG")).toList(); - - public static final List BANNERS = Arrays.asList( - Material.BLACK_BANNER, - Material.BLACK_WALL_BANNER, - Material.BLUE_BANNER, - Material.BLUE_WALL_BANNER, - Material.BROWN_BANNER, - Material.BROWN_WALL_BANNER, - Material.CYAN_BANNER, - Material.CYAN_WALL_BANNER, - Material.GRAY_BANNER, - Material.GRAY_WALL_BANNER, - Material.GREEN_BANNER, - Material.GREEN_WALL_BANNER, - Material.LIGHT_BLUE_BANNER, - Material.LIGHT_BLUE_WALL_BANNER, - Material.LIGHT_GRAY_BANNER, - Material.LIGHT_GRAY_WALL_BANNER, - Material.LIME_BANNER, - Material.LIME_WALL_BANNER, - Material.MAGENTA_BANNER, - Material.MAGENTA_WALL_BANNER, - Material.ORANGE_BANNER, - Material.ORANGE_WALL_BANNER, - Material.PINK_BANNER, - Material.PINK_WALL_BANNER, - Material.PURPLE_BANNER, - Material.PURPLE_WALL_BANNER, - Material.RED_BANNER, - Material.RED_WALL_BANNER, - Material.WHITE_BANNER, - Material.WHITE_WALL_BANNER, - Material.YELLOW_BANNER, - Material.YELLOW_WALL_BANNER); - + public static final List BANNERS = Arrays.stream(Material.values()).filter((m) -> m.name().endsWith("_BANNER")).toList(); public static final List EXPLOSIVE_BED_BIOMES = Arrays.asList( Biome.NETHER_WASTES, Biome.CRIMSON_FOREST,