warning cleanup

This commit is contained in:
gnembon committed 2023-02-08 21:13:15 +01:00
1 parent 5ab4a9e442
commit 277872b33c
106 files changed
+4495 -4345

No files matched your search

@@ -9,9 +9,9 @@ import net.minecraft.resources.ResourceLocation;
public class InputValidator
{
public static String validateSimpleString(final String input, final boolean strict)
public static String validateSimpleString(String input, boolean strict)
{
final String simplified = input.toLowerCase(Locale.ROOT).replaceAll("[^A-Za-z0-9+_]", "");
String simplified = input.toLowerCase(Locale.ROOT).replaceAll("[^A-Za-z0-9+_]", "");
if (simplified.isEmpty() || (strict && !simplified.equals(input)))
{
throw new InternalExpressionException("simple name can only contain numbers, letter and _");
@@ -19,13 +19,13 @@ public class InputValidator
return simplified;
}
public static ResourceLocation identifierOf(final String string)
public static ResourceLocation identifierOf(String string)
{
try
{
return new ResourceLocation(string);
}
catch (final ResourceLocationException iie)
catch (ResourceLocationException iie)
{
throw new InternalExpressionException("Incorrect identifier format '" + string + "': " + iie.getMessage());
}