Jump to content

[1.8][SOLVED] Custom Crafting Table doesn't remove Items after crafting


Recommended Posts

Posted

So the title should say most of it but basically I am updating my mod from 1.7.10 to 1.8 and I have ran into a problem that I didn't have in 1.7.10. When I craft an Item in the table, it doesn't remove the Items from the craftMatrix allowing infinite items to be made.

 

Here is the container code:

 

  Reveal hidden contents

 

 

Block code:

 

  Reveal hidden contents

 

 

Crafting Manager:

 

  Reveal hidden contents

 

 

Shaped Recipes:

 

  Reveal hidden contents

 

 

Shapeless Recipes

 

  Reveal hidden contents

 

Posted

Hi

 

The vanilla CraftingManager has a function to remove the items (in conjunction with SlotCrafting.onPickupFromSlot())

func_180303_b

 

Your crafting manager doesn't appear to have any code which does the same thing.  Are you using a SlotCrafting equivalent in your container? Perhaps responsibility for removing the items has moved during the upgrade from 1.7.10 to 1.8?

 

-TGG

Posted

Most of my code is from the Vanilla Crafting Table so I would assume most of it except for the parts I changed for my crafting table would be the same because I'm sure I use the func_180303_b, would I require to create my own SlotCrafting for it to work?

Posted

So I have figured it, in order to fix this you must create your own SlotCrafting and edit the onPickupFromSlot method. You can copy the entire method from vanilla but you have to change this one line of code:

 

ItemStack[] aitemstack = CraftingManager.getInstance().func_180303_b(this.craftMatrix, player.worldObj)

 

Change the CraftingManager.getInstance() to YourCraftingManager.getInstance()

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.