Jump to content

IEEP update client [Solved]


UberAffe

Recommended Posts

Here is a link to my code on github.

 

Messagedrafting gets called by a keybinding and alters the players IEEP on the server. MessageIEEPchanged is getting called in messagedrafting to update the client.

 

This setup is not updating the client. If I use the return of Messagedrafting the client freezes indefinitely.

Any advice is appreciated.

 

Solved:

-----------------------

The solution is more of a trouble shooting list so if you have a similar problem take a look at the steps we took here.

Current Project: Armerger 

Planned mods: Light Drafter  | Ore Swords

Looking for help getting a mod off the ground? Coding  | Textures

Link to comment
Share on other sites

Finally home again, and yes it is getting received. I guess that means there is something wrong with my save and load. Can you look over how I am passing the nbt information to make sure I didn't mess that up.

 

Message code

DraftingManager

ExtendedProperties save and load are at the bottom.

Current Project: Armerger 

Planned mods: Light Drafter  | Ore Swords

Looking for help getting a mod off the ground? Coding  | Textures

Link to comment
Share on other sites

Can I send the message from inside that runnable with:

CommonProxy.network.sendTo(new MessageIEEPChanged(DraftingManager.PerformDrafting(player)), (EntityPlayerMP) player);

 

or should I send the message from inside PerformDrafting?

Current Project: Armerger 

Planned mods: Light Drafter  | Ore Swords

Looking for help getting a mod off the ground? Coding  | Textures

Link to comment
Share on other sites

So I have been following this tutorial on IEEP.

 

But my get seems to be returning something other than what I registered.

I say this because all values that were set in the instructor are now set to 0.

 

IEEP class

Event Hooks

Class that uses the get

Current Project: Armerger 

Planned mods: Light Drafter  | Ore Swords

Looking for help getting a mod off the ground? Coding  | Textures

Link to comment
Share on other sites

Ok, so I stepped through things and I am getting this error

java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Empty string not allowed

 

When I try to step over this

-> nbtExtendedProperties.setString("drafting_selection", draftingSelection);
    for(String luxin : luxinLevel.keySet())

 

If I look at the contents of LuxinLevel before stepping over I see this

{Blue=0.0, Green=0.0}

Which is what I expect to be there.

 

This is the declaration/ instantiation

private HashMap<String, Float> luxinLevel = new HashMap<String, Float>();

 

any ideas as to why this is reporting an empty string?

 

 

 

Edit:

------------------------------------

I'm dumb ... I was so fixated on the for loop that i didn't even notice that it was a string on the line before. I even included it in the code here ... had to instantiate that and once I did everything started working beautifully.

 

Thanks for the help!

Current Project: Armerger 

Planned mods: Light Drafter  | Ore Swords

Looking for help getting a mod off the ground? Coding  | Textures

Link to comment
Share on other sites

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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