Jump to content

Recommended Posts

Posted

I have been modding on this mod for a few days now.

(I've got a nice tad of experience modding. dont worry )

 

Evertything works fine, apart from one thing.

 

Here's the idea :

When the Player opens the Vanilla Inventory, I open an ALternative gui, with two buttons : close and Rpg Inventory.

I got that working fine trought the ClientTickHandler.

 

The second button, the one that makes us go to a new Gui : My Rpg Inventory, is where the problems are.

 

I've tried opening it with ModLoader.openGui().

I've tried opening trough EntityPlayer.openGui().

I've tried sending a packet to the ServerPacketHandler opening either ModLoader.openGui or EntityPlayer.openGui().

I've tried going trough the Client and Commen Proxy to open the new gui, with gui client and server side, and container trough server side.

 

In any of those ways, either it wont show the gui, and just pops me back in to the 'playng minecraft' mode, or it shows the gui, with container, which is completely (sorry for the word) f**ked up.*

 

*definition of that word : I can pick up items 1 chance out of 100. if i can, i can or not put it back, or put it back, but it will pop in another slot. or i can take out items, but the whole inventory gets mixed up, or i click a slot, and the item 4 slots away will be taken out.

 

I've been told this is a server/client problem, which I do think it is too.

 

I would show you my code, but it's completly messed up atm.

 

Though, here are a few of them.

 

CommonProxy

 

  Reveal hidden contents

 

 

ClientProxy

 

  Reveal hidden contents

 

 

Alternative Gui

 

  Reveal hidden contents

 

 

RpgGui

 

  Reveal hidden contents

 

 

and offcourse, the @mod

 

  Reveal hidden contents

 

 

 

 

Posted

the gui may not work because you will need to register your guihandler in you mod.class and the instance is just YourMod instance = new YourMod()

The Korecraft Mod

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.