Posted October 5, 201410 yr Hello everyone. I would like to know if it is possible, and if so, how I can use EnumChatFormatting for an item/block name that is named from a .lang file. I would like to colour the name of the block, and I know that this was possible with LanguageRegistry Thanks. I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.
October 5, 201410 yr Author Like this? public String getItemStackDisplayName(ItemStack stack) { return EnumChatFormatting.FormatCode + this.getItemStackDisplayName(stack); } I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.
October 5, 201410 yr Author Nevermind.... that caused a stackoverflow. I guess I should have seen that that was a recursive method. I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.
October 5, 201410 yr Author So... public String getItemStackDisplayName(ItemStack stack) { return EnumChatFormatting.AQUA + super.getItemStackDisplayName(stack); } Using the super method. I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.
October 5, 201410 yr Author Okay, that worked. Solved. I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.