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

Alright, so this one's been quite a tricky bit and I can't quite figure it out.

I'm working on the Geolosys Prospector's Pick, which is having a localization issue with blocks not from Geolosys when prospecting on a server. I figured this was because the server doesn't translate anything, but I could be wrong. Overall, I've been working on this for hours and I have absolutely no idea what I'm doing wrong. I've thought it out, and have tried using Packets to transmit the localized name from the client to the server before the server sends the notification to the player using player.sendStatusMessage(msg, true);. I'm not sure what I'm doing wrong, but for some reason, I'm getting this error

Overall, I'm confused as to why I'm having this problem in the first place and the back-and-forth between client and server is starting to confuse me. You can see my network code (and other stuff) on GitHub. And don't hesitate to call me an idiot, sidedness is not my expertise. 

  • Author
3 minutes ago, diesieben07 said:

You should send an ITextComponent (which can represent a thing to be translated) to the client instead of the already translated string.

Do you mean when I do player.sendStatusMessage(msg, true);? msg is a TextComponentTranslation, so I believe it should be translated once it gets to the client unless I'm using it all entirely wrong. And that's the thing - any translations that come from Geolosys itself worked (before I attempted all this packet stuff that isn't working) -- but other mods' blocks would come through unlocalized.

  • Author

To your first point: Fair - how would you suggest I go about getting a localized name for a block? I haven't really found any good, fully dynamic solutions.

 

And to your second: You make a good point -- so then I should reverse my logic, have the server send the BlockState to the client, and then have the client packet handler handle the localization (which as mentioned needs improvement) since that's where it should be done?

2 hours ago, diesieben07 said:

Do not ever call other methods like Block#getItemDropped, they are not accurate.

As an example: Wheat returns Items.WHEAT_SEEDS not Items.WHEAT and cake probably returns null or air. I haven't checked 1.12 lately.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author
19 minutes ago, Draco18s said:

As an example: Wheat returns Items.WHEAT_SEEDS not Items.WHEAT and cake probably returns null or air. I haven't checked 1.12 lately.

Right, this I knew - plus I want to report the block itself not what it drops -- that being said, Block#getPickBlock is closest to desireable.

  • Author

So, I can't figure out the difference between Block#getItem and Block#getPickBlock; Block#getPickBlock requires more arguments I don't readily have and just returns the value from Block#getItemIs there a difference?

Just now, oitsjustjose said:

 Is there a difference?

Yes. There are vanilla blocks that utilize similar things, like wool and carpet.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.