CraftBook 3

CraftBook 3

139k Downloads

Suggestion - Add random chance for results in custom crafting.

LadyCailinBot opened this issue ยท 12 comments

commented

CRAFTBOOK-2611 - Reported by condemned

Hi again!
Just a small feature request for Craftbook.
Would the inclusion of random results be possible with Custom crafting? Here is an example config for this..

crafting-recipes:
example:
type: shapeless
ingredients:
# light wooden plank
'wood:2': 1
# light wooden plank
'wood:2': 1
# brown wool
'35:12': 1
# brown wool
'35:12': 1
results:
#50% chance of 64 endstone
'121': 64: 0.50
#20% chance of 64 TNT
'46': 64: 0.20
#30% chance of 1 diamond sword
'276': 1: 0.30

commented

Comment by me4502

The syntax for this may be difficult to add, but I'll look into it.

commented

Comment by condemned

Thankyou. :)

commented

Comment by me4502

I have added this for extra-results. Not sure how to do it for the first item however.

commented

Comment by condemned

When you say "Not sure how to do it for the first item however.", what do you mean? Is it compulsory in the configuration to have this 'always given' first item, then there be a chance of getting the 'extra result' item? Can you think of any workarounds?

commented

Comment by me4502

Not at the moment, when I have more time in the next few days hopefully I can work it out. But it kinda does need the initial item there to show up in the table once crafted.

commented

Comment by condemned

Alright. Again, thankyou for this. :)

commented

Comment by condemned

Greetings. Had any luck?

commented

Comment by me4502

I have been and am incredibly busy, I'll look into it next chance I get.

commented

Comment by condemned

Understandable. Take as long as you like.

commented

Comment by condemned

Hi me4502. Any luck with polishing up on this feature?

commented

Comment by me4502

No sorry, I never was able to do so.

commented

Going to close this one as it was mostly implemented- The part that wasn't would not work with Spigot's crafting system, especially in its current very broken state