| data | ||
| .gitignore | ||
| colors.py | ||
| find_recipe.py | ||
| generate_recipes.py | ||
| leatherColorCombinationsCalculator.cpp | ||
| LICENSE | ||
| README.md | ||
| utils.py | ||
LuckyColorRecipeCalculator
A luckycolor recipe calculator for islet to get maximum protection.
What is this?
Islet is a minecraft server that have been playing lately and it has a special armor system. In short, only leather armor could reduce the damage and the degree of the reduction depends on the manhattan distance between the color of the leather armor and a randomly generated color named "luckycolor".
To this end, inspired by ANRAR4's repo ANRAR4/DyeLeatherArmor, I re-write the code that calculate the craftable colors in c++ and wrote a python script that helps to find the closest color to "luckycolor".
How to use?
I just want to calculat my luckycolor:
- decompress the file
./data/recipes.7z, you will getrecipes.json. Put it in the current floder. - run
python find_recipe.py
How can I get recipe.json from scratch:
-
compile
leatherColorCombinationsCalculator.cppwithg++ -O3 -Wall leatherColorCombinationsCalculator.cpp -lpthread -o leatherColorCombinationsCalculator -
run
./leatherColorCombinationsCalculator <numThreads>, it will producelayer1-14.bin(the generated file is also provided in ./data/layers.7z) -
run
python generate_recipes.pyto generaterecipes.json.