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.

[1.16] Item operation of container is strange

Featured Replies

Posted

There are the following container slots, and items can be displayed in the slots by changing the backpack.

However, if you try to move an item in the backpack slot, you will not be able to pick it up, and if you move it from the inventory to the backpack slot, the item will disappear.

I looked through the code and couldn't figure out the cause of this bug. How can I get it to work properly?

 

Container class:

Reveal hidden contents

Slot class:

Reveal hidden contents

 

  • Author

I've fixed the code so that item operations can now be done normally. However, the backpack inventory operations that you were equipped with when you opened the inventory are saved, but the inventory operations for the backpack that you replaced in that inventory after opening the inventory are not saved. I was wondering if the inventory I changed later wouldn't be saved because the inventory I saved when I opened the container was saved somewhere else, but I couldn't find a match by tracing the code in the IDE. did. Does anyone know why the modified inventory isn't saved?

 

Container class:

Reveal hidden contents

Slot class:

Reveal hidden contents

 

Edited by Zemelua

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.