Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

  • Author

Then you're not making sense. If I open the inventory with an ingame command, why would I open an inventory with code?

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

  • 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 *

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

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.

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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.