Posted September 18, 20196 yr 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.
September 18, 20196 yr 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.
September 18, 20196 yr 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?
September 18, 20196 yr 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.
September 18, 20196 yr 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.
September 18, 20196 yr 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#getItem. Is there a difference?
September 18, 20196 yr 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.