Posted March 18, 20169 yr good days 1.9 has been realized so i set in the quest to update mi mod to 1.9 and then become the issues first of all i have to update the tools i made to work whith blocks and items for some reason they change the name of MovingObjectPosition to RayTraceResult but thats not to mod things i made a class to show mesages in screen as i use items public static void chatr(EntityPlayer playerIn, String mensaje){ playerIn.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + mensaje)); } this don't works anymore, from the bedBlock class i get this if (playerIn != null) { //ITextComponent chatComponent playerIn.addChatComponentMessage(new TextComponentTranslation("tile.bed.occupied", new Object[0])); } but this dont directly prints on screen custom text, this take the text from some lang file somewhere in the code i been folowing the classes but i dont understand how to set to show the content of just a plain text string ############# ? first i need the pieze of code to print on player chat a custom string mesage , just like the block coordinates of the block im looking at (things for i need to use the raytrace in several of mi items and entityes) ? the second is how i set in mi lang files customs strings to later retrive it whith the playerIn.addChatComponentMessage(new TextComponentTranslation("tile.bed.occupied", new Object[0])); thing i suppose something like "mercenarymod:mensaje001us" well thanks for reading
March 18, 20169 yr Author sip but is it'n deliverated just a recurrent accident, when came from google sometimes get bug mi mistake in the other side i been used to set the color from thext using EnumChatFormatting but dont find it i guest it also changes name can you help mi whith that ? playerIn.addChatComponentMessage(new TextComponentString(EnumChatFormatting.RED + mensaje));
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.