当前位置: 首页>>代码示例>>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;未经允许,请勿转载。