Jump to content

Recommended Posts

Posted

I'm creating a mod where it will run a command (that open's an inventory) and then click a slot in that inventory.
I'm using 
 

mc.playerController.windowClick(mc.thePlayer.openContainer.windowId, 13, 0, 0, mc.thePlayer);

 

The problem with this is (I think due to the inventory being server sided), it clicks the item but the action that follows doesn't happen. I could click the inventory normal and I receive x amount of credits but when this runs, it just moves the item to my cursor, then puts it back in the inventory slot. Any help is appreciated.

Posted (edited)

Uh... I think it is you that isn't making sense with that statement.

 

In order to open an inventory using a command, you'd need code to handle opening the inventory on the server. Please post full code so we can see what's wrong instead of wrongly claiming that people aren't making sense when all they are asking for is your code...

 

Of course, it could be the case that you don't have access to the server side code (as it isn't your server or mod) - in which case, please be clear about that. You haven't given much to go on, and one single line of code is difficult to diagnose any problems with.

 

Please post more code if you're able. 

 

Edited by Cloudy
Posted

Okay,

I have NO CODE to open an inventory since i open the inventory with a command ON THE SERVER. The server has a command /rewards WHICH OPENS AN INVENTORY GUI. I use mc.thePlayer.sendChatMessage("/rewards") TO OPEN THE INVENTORY. The server IS NOT A FORGE SERVER it is a BUKKIT SERVER and all I'm trying to do is CLICK A SLOT IN THAT INVENTORY. understand now?

* Important parts in caps *

Posted

There is literally no need to be rude about it, when it was lack of explaining on your part which got into this situation. We unfortunately cannot read minds. 

 

If you want help, for free, from people on forums being nice about it and not an asshole is more likely to get results :)

 

Can you show the parts of your code which 1. Opens the gui and 2. Clicks on the slot? Ideally in context, so we can see the execution flow - it could be something such as a timing issue, and without full code it is difficult to see such issues. One line of code is not enough to go on, especially as it is such a niche thing which is unlikely to have been done much before :P

Posted

So you're trying to create a mod that automates a rewards system implemented by another person on a server? That sounds... like you should probably be very careful about whether this is actually a good idea, ethically speaking.

Whatever Minecraft needs, it is most likely not yet another tool tier.

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.