本文整理匯總了Java中net.minecraft.util.ChatAllowedCharacters.ILLEGAL_FILE_CHARACTERS屬性的典型用法代碼示例。如果您正苦於以下問題:Java ChatAllowedCharacters.ILLEGAL_FILE_CHARACTERS屬性的具體用法?Java ChatAllowedCharacters.ILLEGAL_FILE_CHARACTERS怎麽用?Java ChatAllowedCharacters.ILLEGAL_FILE_CHARACTERS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類net.minecraft.util.ChatAllowedCharacters
的用法示例。
在下文中一共展示了ChatAllowedCharacters.ILLEGAL_FILE_CHARACTERS屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: calcSaveDirName
/**
* Determine a save-directory name from the world name
*/
private void calcSaveDirName()
{
this.saveDirName = this.worldNameField.getText().trim();
for (char c0 : ChatAllowedCharacters.ILLEGAL_FILE_CHARACTERS)
{
this.saveDirName = this.saveDirName.replace(c0, '_');
}
if (StringUtils.isEmpty(this.saveDirName))
{
this.saveDirName = "World";
}
this.saveDirName = getUncollidingSaveDirName(this.mc.getSaveLoader(), this.saveDirName);
}
示例2: func_146314_g
private void func_146314_g()
{
this.field_146336_i = this.dimensionNameTextField.getText().trim();
char[] achar = ChatAllowedCharacters.ILLEGAL_FILE_CHARACTERS;
int i = achar.length;
for (int j = 0; j < i; ++j)
{
char c0 = achar[j];
this.field_146336_i = this.field_146336_i.replace(c0, '_');
}
if (StringUtils.isEmpty(this.field_146336_i))
{
this.field_146336_i = "World";
}
this.field_146336_i = func_146317_a(this.mc.getSaveLoader(), this.field_146336_i);
}