Jump to content

Controlling crafting


NuclearFej

Recommended Posts

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!

Link to comment
Share on other sites

  • 2 weeks later...

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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!

 

 

Link to comment
Share on other sites

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!

 

 

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.