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

you don't need a block holder

you can get any object from the registry by calling RegistryObject#get()

  • Author

Maybe but I kinda like the ObjectHolder, do you think it has anything to do with the bug?
What are you supposed to use Objectholders for?

50 minutes ago, GloriousAlpaca said:

Maybe but I kinda like the ObjectHolder, do you think it has anything to do with the bug?
What are you supposed to use Objectholders for?

oh, actually it's probably because you're passing the wrong player to the isWithinUsableDistance method

 

Edit: this also doesn't solve the problem, but in the ContainerScreen class you don't need to draw the container and player inventory titles to the screen, the method in the super class already does that, so you would be writing it twice

Edited by kiou.23

  • Author
10 hours ago, kiou.23 said:

oh, actually it's probably because you're passing the wrong player to the isWithinUsableDistance method

 

Edit: this also doesn't solve the problem, but in the ContainerScreen class you don't need to draw the container and player inventory titles to the screen, the method in the super class already does that, so you would be writing it twice

Thank you I removed them and edited the player.

 

14 minutes ago, diesieben07 said:

You open the container for the tank controller block. The container then checks, that a tank block exists at its position. It of course never does, because you open the GUI for the tank controller position - so the container instantly closes.

I'm not sure if I understand correctly, but the Tank Controller Block extends the Tank Block, so shouldn't it still work?

Regardless I have changed the Block to the Tank Controller and it works now.
Thank you for your help!

Edited by GloriousAlpaca

  • Author
Just now, diesieben07 said:

Inheritance is not involved here. You are using isWithinUsableDistance which checks for a specific block.

Ahhh okay thanks!
The gui is working now (except for the player Slots which are shifted up a little).
I am trying to make a multiblock and I'm just opening the gui on the position of the controller when I activate the slaveblocks, do you think that will lead to bugs within the isWithinUsableDistance method?

  • Author
Just now, diesieben07 said:

You don't have to use that method.

You're right I'll just do a custom check.
I'll mark this as solved.
Thank you for your replies!

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.