Cleanup length and size checks (#10108)

This commit is contained in:
Tygyh authored and GitHub committed 2024-09-12 14:14:19 +01:00
1 parent 44a158a714
commit eeb3eb3689
11 files changed
+20 -20

No files matched your search

@@ -206,7 +206,7 @@ public abstract class ParticleDescriptionProvider implements DataProvider {
"Texture '%s' does not exist in any known resource pack", texture);
desc.add(texture.toString());
}
Preconditions.checkArgument(desc.size() > 0, "The particle type '%s' must have one texture", particle);
Preconditions.checkArgument(!desc.isEmpty(), "The particle type '%s' must have one texture", particle);
// Insert into map
if (this.descriptions.putIfAbsent(particle, desc) != null) {