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 made a mod which can open a remote TileEntity (previously right-clicked) and you can have full interaction with it. But a lot of them like Furnaces and Workbenches have a function that checks for player position called isUsableByPlayer(EntityPlayer player), I want to make it return true, however I cannot override a vanilla class so, what how can I fix this?

 

Thank you, Alvaro.

Subscribe to net.minecraftforge.event.entity.player.PlayerOpenContainerEvent, you can ALLOW/DENY opening any type of container of any mod or vanilla itself.

 

Note: It also allows you to DENY opening given container and do any other action (e.g write chat msg or open other container).

 

Hopefully you know how to use events, if not - use google (plenty of tuts).

  Quote

1.7.10 is no longer supported by forge, you are on your own.

  • Author
  On 7/30/2015 at 2:58 AM, Ernio said:

Subscribe to net.minecraftforge.event.entity.player.PlayerOpenContainerEvent, you can ALLOW/DENY opening any type of container of any mod or vanilla itself.

 

Note: It also allows you to DENY opening given container and do any other action (e.g write chat msg or open other container).

 

Hopefully you know how to use events, if not - use google (plenty of tuts).

 

Thank you, I register the event and created and it works but the event is being called all the time not just when the player opens a container is that normal?. I just dont want to create unnecessary checks but if its normal Im good. Thanks

  • Author
  On 7/30/2015 at 1:20 PM, diesieben07 said:

Yes, that is normal. The player checks if the container can be open every tick and you can intercept it every tick.

 

Thank you!

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.