當前位置: 首頁>>代碼示例>>Java>>正文


Java ChatAllowedCharacters.allowedCharacters方法代碼示例

本文整理匯總了Java中net.minecraft.util.ChatAllowedCharacters.allowedCharacters方法的典型用法代碼示例。如果您正苦於以下問題:Java ChatAllowedCharacters.allowedCharacters方法的具體用法?Java ChatAllowedCharacters.allowedCharacters怎麽用?Java ChatAllowedCharacters.allowedCharacters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.util.ChatAllowedCharacters的用法示例。


在下文中一共展示了ChatAllowedCharacters.allowedCharacters方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: func_146314_g

import net.minecraft.util.ChatAllowedCharacters; //導入方法依賴的package包/類
private void func_146314_g()
{
    this.field_146336_i = this.field_146333_g.getText().trim();
    char[] var1 = ChatAllowedCharacters.allowedCharacters;
    int var2 = var1.length;

    for (int var3 = 0; var3 < var2; ++var3)
    {
        char var4 = var1[var3];
        this.field_146336_i = this.field_146336_i.replace(var4, '_');
    }

    if (MathHelper.stringNullOrLengthZero(this.field_146336_i))
    {
        this.field_146336_i = "World";
    }

    this.field_146336_i = func_146317_a(this.mc.getSaveLoader(), this.field_146336_i);
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:20,代碼來源:GuiCreateWorld.java

示例2: func_146314_g

import net.minecraft.util.ChatAllowedCharacters; //導入方法依賴的package包/類
private void func_146314_g()
{
    this.field_146336_i = this.field_146333_g.getText().trim();
    char[] achar = ChatAllowedCharacters.allowedCharacters;
    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 (MathHelper.stringNullOrLengthZero(this.field_146336_i))
    {
        this.field_146336_i = "World";
    }

    this.field_146336_i = func_146317_a(this.mc.getSaveLoader(), this.field_146336_i);
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:20,代碼來源:GuiCreateWorld.java

示例3: updateFolderName

import net.minecraft.util.ChatAllowedCharacters; //導入方法依賴的package包/類
private void updateFolderName() {
	folderName = textFieldName.getText().trim();
	char[] chars = ChatAllowedCharacters.allowedCharacters;		
	for(int j = 0; j < chars.length; ++j) {
		char c = chars[j];
		folderName = folderName.replace(c, '_');
	}
	if(MathHelper.stringNullOrLengthZero(folderName)) {
		folderName = "World";
	}
	folderName = formatFolderName(mc.getSaveLoader(), folderName);
}
 
開發者ID:AgeCraft,項目名稱:AgeCraft-Old,代碼行數:13,代碼來源:GuiCreateWorld.java


注:本文中的net.minecraft.util.ChatAllowedCharacters.allowedCharacters方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。