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

Hello, I am working on an item and I need to do something only once while the right click is pressed.

I looked at some vanilla items and some of them were calling OnItemStoppedUsing, I looked at some forge tutorials, the rifle tutorial is using the same function.

When I use it in my mod it never gets called, do I need to extend something special for it to work?

I'd recommend looking at the code in the Item class for that method, it should have the code for making the player slow down, use an at override method on the one in your class and remove that line of code slowing the player down. Should suffice for your purposes. :)

  • Author

I found the method but, overriding it, that never came into my mind, thank you for the idea:) Why it was slowing down the player it was because it was making the player have the same things as when eating, holding a sword, drinking potions.

  • Author

It was a good idea until I realized that the method that I need is in the player class :(

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.