#1058: Add tests for Minecraft registry <-> Bukkit fields

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
Bukkit/Spigot
2024-09-27 08:15:05 +10:00
parent 49d12d442a
commit 42cd6c82ff
21 changed files with 147 additions and 121 deletions

View File

@@ -100,11 +100,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
@NotNull
private static PatternType getType(@NotNull String key) {
NamespacedKey namespacedKey = NamespacedKey.minecraft(key);
PatternType type = Registry.BANNER_PATTERN.get(namespacedKey);
Preconditions.checkNotNull(type, "No Banner Pattern found for %s. This is a bug.", namespacedKey);
return type;
return Registry.BANNER_PATTERN.getOrThrow(NamespacedKey.minecraft(key));
}
/**