Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the probability system for centrifuge outputs #703

Closed
TinkerWorX opened this issue Jun 6, 2015 · 1 comment
Closed

Improve the probability system for centrifuge outputs #703

TinkerWorX opened this issue Jun 6, 2015 · 1 comment
Labels
enhancement New feature or request

Comments

@TinkerWorX
Copy link

Current, we are limited to an integer in the [1; 100] range. It would be great with a float in the [0.00;1:00] range to give us more freedom to create very low chance outputs. So basically add support for HashMap<ItemStack, float>.

Another improvement would be a way to add multiple things in the same probability range, but limited to only one output. Something like HashMap<ItemStack[], float> where it will pick a random ItemStack from the ItemStack[]. For example, I could add ItemStack[dirt, sand, gravel], 0.10f, which would give a 10% chance to get either one dirt or one sand or one gravel, but never two at a time.

@mezz mezz added the enhancement New feature or request label Jun 6, 2015
@mezz mezz closed this as completed in e70d598 Jun 7, 2015
@mezz
Copy link
Member

mezz commented Jun 7, 2015

Thanks for the suggestion!
I added float support to the CentrifugeManager, and also created a way to make custom recipes that implement whatever logic you want for their output (with getProducts).

https://github.com/ForestryMC/ForestryAPI/blob/master/forestry/api/recipes/ICentrifugeManager.java

https://github.com/ForestryMC/ForestryAPI/blob/master/forestry/api/recipes/ICentrifugeRecipe.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants