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've got a custom player inventory set up and good to go, I'm setting up a multi-tabbed survival inventory but am having trouble hiding certain slots depending on the tab currently clicked. So there are 3 tabs: one of them is the default survival, one of them has the crafting slots, and the other has slots for player armor, as well as slots that reference my itemhandler. Currently, if player is in tab 0, I draw the normal 3x9 player inventory slots and don't draw the crafting, custom, or armor slots, and also mask them when the mouse is interacted with. Then when they press tabs 1 or 2, the others are drawn.

 

I've recreated the default player inventory perfectly, but when my mouse click method is called on slots that reference my custom item handler using windowClick, not the default player inventory slots, there's a class cast exception with the item handler. What are my options here?

 

EDIT: Make sure you implement the correct classes when creating your slots for your registered item handlers, and override the correct methods. 

Edited by Turtledove

  • Author

So as it turns out I wasn't actually using my itemhandler capability, I'd been calling the vanilla one, which was why it was acting weird, another silly mistake.

 

But now that I am using it, calling windowClick causes a class cast exception with my ItemHandler. Huh.

Edited by Turtledove

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.