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

How can I stop a player from crafting any particular item? Including vanilla items?

 

There doesn't seem to be any Event for this particular purpose. I figured I'd just be able to cancel an event but no dice.

 

Thanks!

  • Author

This is going to be fun. The ones I need to wrap? All of them! :D (Well, not all of them, but a lot)

 

I'll let you know if this works.

  • Author

I've run into a problem. When I need to access the private fields eventHandler and thePlayer, well, they're private. (Duh.)

 

Am I going to need to use access transformers to get this to work? (Not quite familiar with them. Although it seems it's time for me to learn.) Or am I missing something obvious?

 

Thanks!

  • 2 weeks later...
  • Author

I got the code written, but I'm having a problem. I'm trying to block players from crafting based on their level.

 

It would appear as if the matches method is not being overrode. I stuck a println statement in there and sure enough, my version of matches never seems to be called. It seems to be obvious, but I'll ask anyway: when is matches called?

 

Otherwise, can you see any different problems? Thanks!

 

Here's the relevant code:

 

FejRecipeShaped http://pastebin.com/Dy90uFb3

FejRecipeHandler http://pastebin.com/aHEWxKjz

 

  • Author

I got the code written, but I'm having a problem. I'm trying to block players from crafting based on their level.

 

It would appear as if the matches method is not being overrode. I stuck a println statement in there and sure enough, my version of matches never seems to be called. It seems to be obvious, but I'll ask anyway: when is matches called?

 

Otherwise, can you see any different problems? Thanks!

 

Here's the relevant code:

 

FejRecipeShaped http://pastebin.com/Dy90uFb3

FejRecipeHandler http://pastebin.com/aHEWxKjz

 

  • Author

Thanks for the recipe code!

 

As for the replacing code: as it turns out, after adding in the access transformers, the Init method is no longer called. -_- I forgot to add the @Mod annotation back in.

 

It's always the little things.

 

As for the recipe code itself, it works wonderfully so far! Thank you so much!

 

 

  • Author

Thanks for the recipe code!

 

As for the replacing code: as it turns out, after adding in the access transformers, the Init method is no longer called. -_- I forgot to add the @Mod annotation back in.

 

It's always the little things.

 

As for the recipe code itself, it works wonderfully so far! Thank you so much!

 

 

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.