类net.minecraft.util.InvalidIdentifierException源码实例Demo

下面列出了怎么用net.minecraft.util.InvalidIdentifierException的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: Wurst7   文件: GiveCmd.java
private Item getItem(String id) throws CmdSyntaxError
{
	try
	{
		return Registry.ITEM.get(new Identifier(id));
		
	}catch(InvalidIdentifierException e)
	{
		throw new CmdSyntaxError("Invalid item: " + id);
	}
}
 
源代码2 项目: Wurst7   文件: EditItemListScreen.java
private Identifier getItemIDFromField()
{
	try
	{
		return new Identifier(itemNameField.getText().toLowerCase());
		
	}catch(InvalidIdentifierException e)
	{
		return null;
	}
}
 
 类所在包
 同包方法