Posted October 21, 20177 yr 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.
October 28, 20177 yr Author Then you're not making sense. If I open the inventory with an ingame command, why would I open an inventory with code?
October 28, 20177 yr 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 October 28, 20177 yr by Cloudy
October 28, 20177 yr Author 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 *
October 28, 20177 yr 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
October 28, 20177 yr 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.
October 28, 20177 yr 2 hours ago, Cloudy said: 1. Opens the gui I think he was trying to say that there is a plugin which has the command /rewards that opens a gui which he calls by doing mc.thePlayer.sendChatMessage("/rewards"); Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
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.