Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

 

 

 

 

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.