Jump to content

Recommended Posts

Posted

Hi!

 

I created a new crafting Table with new recipes which take Mana from the Player.

Everything works fine except from one fact:

If I perform a shift-klick to craft as much Items as possible, neither the Crafting result is placed in the Inventory of the player, nor the Mana is reduced by the specified amount. Only the Crafting-items are removed. Can anybody tell me, why?

 

The Slot for the Crafting result:

 

  Reveal hidden contents

 

The Container:

 

  Reveal hidden contents

 

Write if you need more code!

Posted

OK, I solved it now, but I really don't understand y´why:

I just put addPlayerInventory(inventoryPlayer); to the Top. Now it works..

Such a little problem  :-\

 

But now, I got another Problem:

 

If I do a shift klick, I craft as much Items as possible from the Item Count. But if I got maybe the Mana for 2 Items and the Items for 4, it will craft 4. How can I add a Control for the Mana when performing a Shiftklick?

 

Posted

Its just me who's posting..

I now solved the problem. Final Code:

ContainerMagicCrafting:

  Reveal hidden contents

ModSlotCrafting:

  Reveal hidden contents

 

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.