Merge branch 'master' into 1.17
# Conflicts: # src/main/java/carpet/script/api/Auxiliary.java # src/main/java/carpet/script/api/Inventories.java # src/main/java/carpet/script/api/WorldAccess.java # src/main/java/carpet/script/value/EntityValue.java
This commit is contained in:
commit
33500dde29
7 files changed
+81
-62
No files matched your search
@@ -1,6 +1,9 @@
|
||||
package carpet.script.utils;
|
||||
|
||||
import carpet.script.exception.InternalExpressionException;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.InvalidIdentifierException;
|
||||
import org.lwjgl.system.CallbackI;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -13,4 +16,16 @@ public class InputValidator {
|
||||
return simplified;
|
||||
}
|
||||
|
||||
public static Identifier identifierOf(String string)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new Identifier(string);
|
||||
}
|
||||
catch (InvalidIdentifierException iie)
|
||||
{
|
||||
throw new InternalExpressionException("Incorrect identifier format '"+string+"': "+iie.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user