本文整理汇总了Java中net.minecraft.util.ChatMessageComponent.func_111082_b方法的典型用法代码示例。如果您正苦于以下问题:Java ChatMessageComponent.func_111082_b方法的具体用法?Java ChatMessageComponent.func_111082_b怎么用?Java ChatMessageComponent.func_111082_b使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.util.ChatMessageComponent
的用法示例。
在下文中一共展示了ChatMessageComponent.func_111082_b方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_72481_a
import net.minecraft.util.ChatMessageComponent; //导入方法依赖的package包/类
public void func_72481_a(Packet3Chat p_72481_1_) {
if(this.field_72574_e.func_71126_v() == 2) {
this.func_72567_b(new Packet3Chat(ChatMessageComponent.func_111077_e("chat.cannotSend").func_111059_a(EnumChatFormatting.RED)));
} else {
this.field_72574_e.func_143004_u();
String var2 = p_72481_1_.field_73476_b;
if(var2.length() > 100) {
this.func_72565_c("Chat message too long");
} else {
var2 = StringUtils.normalizeSpace(var2);
for(int var3 = 0; var3 < var2.length(); ++var3) {
if(!ChatAllowedCharacters.func_71566_a(var2.charAt(var3))) {
this.func_72565_c("Illegal characters in chat");
return;
}
}
if(var2.startsWith("/")) {
this.func_72566_d(var2);
} else {
if(this.field_72574_e.func_71126_v() == 1) {
this.func_72567_b(new Packet3Chat(ChatMessageComponent.func_111077_e("chat.cannotSend").func_111059_a(EnumChatFormatting.RED)));
return;
}
ChatMessageComponent var4 = ChatMessageComponent.func_111082_b("chat.type.text", new Object[]{this.field_72574_e.func_96090_ax(), var2});
this.field_72573_d.func_71203_ab().func_110459_a(var4, false);
}
this.field_72581_m += 20;
if(this.field_72581_m > 200 && !this.field_72573_d.func_71203_ab().func_72353_e(this.field_72574_e.func_70005_c_())) {
this.func_72565_c("disconnect.spam");
}
}
}
}
示例2: func_73875_a
import net.minecraft.util.ChatMessageComponent; //导入方法依赖的package包/类
protected void func_73875_a(GuiButton p_73875_1_) {
if(p_73875_1_.field_73741_f == 102) {
this.field_73882_e.func_71373_a(this.field_74092_a);
} else if(p_73875_1_.field_73741_f == 104) {
if(this.field_74089_d.equals("survival")) {
this.field_74089_d = "creative";
} else if(this.field_74089_d.equals("creative")) {
this.field_74089_d = "adventure";
} else {
this.field_74089_d = "survival";
}
this.func_74088_g();
} else if(p_73875_1_.field_73741_f == 103) {
this.field_74093_m = !this.field_74093_m;
this.func_74088_g();
} else if(p_73875_1_.field_73741_f == 101) {
this.field_73882_e.func_71373_a((GuiScreen)null);
String var2 = this.field_73882_e.func_71401_C().func_71206_a(EnumGameType.func_77142_a(this.field_74089_d), this.field_74093_m);
ChatMessageComponent var3;
if(var2 != null) {
var3 = ChatMessageComponent.func_111082_b("commands.publish.started", new Object[]{var2});
} else {
var3 = ChatMessageComponent.func_111066_d("commands.publish.failed");
}
this.field_73882_e.field_71456_v.func_73827_b().func_73765_a(var3.func_111068_a(true));
}
}
示例3: func_76360_b
import net.minecraft.util.ChatMessageComponent; //导入方法依赖的package包/类
public ChatMessageComponent func_76360_b(EntityLivingBase p_76360_1_) {
String var2 = this.field_76387_p == null?this.field_76386_o.func_96090_ax():this.field_76387_p.func_96090_ax();
ItemStack var3 = this.field_76387_p instanceof EntityLivingBase?((EntityLivingBase)this.field_76387_p).func_70694_bm():null;
String var4 = "death.attack." + this.field_76373_n;
String var5 = var4 + ".item";
return var3 != null && var3.func_82837_s() && StatCollector.func_94522_b(var5)?ChatMessageComponent.func_111082_b(var5, new Object[]{p_76360_1_.func_96090_ax(), var2, var3.func_82833_r()}):ChatMessageComponent.func_111082_b(var4, new Object[]{p_76360_1_.func_96090_ax(), var2});
}
示例4: func_94546_b
import net.minecraft.util.ChatMessageComponent; //导入方法依赖的package包/类
public ChatMessageComponent func_94546_b() {
if(this.field_94556_a.size() == 0) {
return ChatMessageComponent.func_111082_b("death.attack.generic", new Object[]{this.field_94554_b.func_96090_ax()});
} else {
CombatEntry var1 = this.func_94544_f();
CombatEntry var2 = (CombatEntry)this.field_94556_a.get(this.field_94556_a.size() - 1);
String var4 = var2.func_94558_h();
Entity var5 = var2.func_94560_a().func_76346_g();
ChatMessageComponent var3;
if(var1 != null && var2.func_94560_a() == DamageSource.field_76379_h) {
String var6 = var1.func_94558_h();
if(var1.func_94560_a() != DamageSource.field_76379_h && var1.func_94560_a() != DamageSource.field_76380_i) {
if(var6 != null && (var4 == null || !var6.equals(var4))) {
Entity var9 = var1.func_94560_a().func_76346_g();
ItemStack var8 = var9 instanceof EntityLivingBase?((EntityLivingBase)var9).func_70694_bm():null;
if(var8 != null && var8.func_82837_s()) {
var3 = ChatMessageComponent.func_111082_b("death.fell.assist.item", new Object[]{this.field_94554_b.func_96090_ax(), var6, var8.func_82833_r()});
} else {
var3 = ChatMessageComponent.func_111082_b("death.fell.assist", new Object[]{this.field_94554_b.func_96090_ax(), var6});
}
} else if(var4 != null) {
ItemStack var7 = var5 instanceof EntityLivingBase?((EntityLivingBase)var5).func_70694_bm():null;
if(var7 != null && var7.func_82837_s()) {
var3 = ChatMessageComponent.func_111082_b("death.fell.finish.item", new Object[]{this.field_94554_b.func_96090_ax(), var4, var7.func_82833_r()});
} else {
var3 = ChatMessageComponent.func_111082_b("death.fell.finish", new Object[]{this.field_94554_b.func_96090_ax(), var4});
}
} else {
var3 = ChatMessageComponent.func_111082_b("death.fell.killer", new Object[]{this.field_94554_b.func_96090_ax()});
}
} else {
var3 = ChatMessageComponent.func_111082_b("death.fell.accident." + this.func_94548_b(var1), new Object[]{this.field_94554_b.func_96090_ax()});
}
} else {
var3 = var2.func_94560_a().func_76360_b(this.field_94554_b);
}
return var3;
}
}
示例5: func_71563_a
import net.minecraft.util.ChatMessageComponent; //导入方法依赖的package包/类
public void func_71563_a(ICommandSender p_71563_1_, int p_71563_2_, String p_71563_3_, Object ... p_71563_4_) {
boolean var5 = true;
if(p_71563_1_ instanceof TileEntityCommandBlock && !MinecraftServer.func_71276_C().field_71305_c[0].func_82736_K().func_82766_b("commandBlockOutput")) {
var5 = false;
}
ChatMessageComponent var6 = ChatMessageComponent.func_111082_b("chat.type.admin", new Object[]{p_71563_1_.func_70005_c_(), ChatMessageComponent.func_111082_b(p_71563_3_, p_71563_4_)});
var6.func_111059_a(EnumChatFormatting.GRAY);
var6.func_111063_b(Boolean.valueOf(true));
if(var5) {
Iterator var7 = MinecraftServer.func_71276_C().func_71203_ab().field_72404_b.iterator();
while(var7.hasNext()) {
EntityPlayerMP var8 = (EntityPlayerMP)var7.next();
if(var8 != p_71563_1_ && MinecraftServer.func_71276_C().func_71203_ab().func_72353_e(var8.func_70005_c_())) {
var8.func_70006_a(var6);
}
}
}
if(p_71563_1_ != MinecraftServer.func_71276_C()) {
MinecraftServer.func_71276_C().func_70006_a(var6);
}
if((p_71563_2_ & 1) != 1) {
p_71563_1_.func_70006_a(ChatMessageComponent.func_111082_b(p_71563_3_, p_71563_4_));
}
}
示例6: func_76360_b
import net.minecraft.util.ChatMessageComponent; //导入方法依赖的package包/类
public ChatMessageComponent func_76360_b(EntityLivingBase p_76360_1_) {
ItemStack var2 = this.field_76386_o instanceof EntityLivingBase?((EntityLivingBase)this.field_76386_o).func_70694_bm():null;
String var3 = "death.attack." + this.field_76373_n;
String var4 = var3 + ".item";
return var2 != null && var2.func_82837_s() && StatCollector.func_94522_b(var4)?ChatMessageComponent.func_111082_b(var4, new Object[]{p_76360_1_.func_96090_ax(), this.field_76386_o.func_96090_ax(), var2.func_82833_r()}):ChatMessageComponent.func_111082_b(var3, new Object[]{p_76360_1_.func_96090_ax(), this.field_76386_o.func_96090_ax()});
}
示例7: func_76360_b
import net.minecraft.util.ChatMessageComponent; //导入方法依赖的package包/类
public ChatMessageComponent func_76360_b(EntityLivingBase p_76360_1_) {
EntityLivingBase var2 = p_76360_1_.func_94060_bK();
String var3 = "death.attack." + this.field_76373_n;
String var4 = var3 + ".player";
return var2 != null && StatCollector.func_94522_b(var4)?ChatMessageComponent.func_111082_b(var4, new Object[]{p_76360_1_.func_96090_ax(), var2.func_96090_ax()}):ChatMessageComponent.func_111082_b(var3, new Object[]{p_76360_1_.func_96090_ax()});
}