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

Ok, I admit I don't know what I am doing wrong now... Let me explain what I'm trying to achieve:

 

- I am trying to create an barrel that acts like a furnace. Instead of using items as fuel, the player must click the barrel with an water bucket, or add the bucket in the GUI... This will increase the progress bar (working fine).

 

- I have 1 slot (slot[0]) that accepts paper, one that gives me wet paper (slot[1]), another that accepts water buckets (slot[2]), and finally one that gives me the bucket back (slot[3]).

 

- As I already explained, I added an method that adds water if the player has an water bucket on hands, if so I increase the water stored in the barrel (working fine).

 

Problems:

1. Slots act very weird. I can add items, but they will show 2x more items (some thing about client, I think), and if I left-click to remove, they just disappear, and right-click remove only one item (I tried to create an custom Slot, but it didn't work as well).

 

2. All barrels have different stored water values and GUI interfaces, but when the method that decreases the stored water is called, all barrels act like one, and all water stored values get mess up.

 

I believe that both problems are connected... but I can't find a solution.

 

TileEntity, Container, and GuiContainer code:

https://gist.github.com/anonymous/5e4a6b8ece48b61d718a

 

I've tried so hard on this piece of code and nothing... T-T

  • Author

Wow, I haven't seen that! That explains why I could access the same items from different blocks, which was a bug that I haven't notices before, hahaha. Thanks diesieben07, you've just made my day!  :D

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.