use of com.teamresourceful.resourcefulbees.api.beedata.centrifuge.CentrifugeData in project ResourcefulBees by Resourceful-Bees.
the class RecipeBuilder method onResourceManagerReload.
@Override
public void onResourceManagerReload(@NotNull ResourceManager resourceManager) {
LOGGER.info("Loading comb recipes for {} bees...", BEE_REGISTRY.getBees().size());
BEE_REGISTRY.getBees().forEach((s, beeData) -> {
CentrifugeData centrifugeData = beeData.getCentrifugeData();
HoneycombData honeycombData = beeData.getHoneycombData();
if (centrifugeData.hasCentrifugeOutput() && honeycombData.getHoneycombType().equals(HoneycombType.DEFAULT)) {
Recipe<?> honeycombCentrifuge = this.centrifugeRecipe(s, centrifugeData, honeycombData, 1);
Recipe<?> honeycombBlockCentrifuge = this.centrifugeRecipe(s, centrifugeData, honeycombData, 9);
getRecipeManager().recipes.computeIfAbsent(honeycombCentrifuge.getType(), t -> new HashMap<>()).put(honeycombCentrifuge.getId(), honeycombCentrifuge);
getRecipeManager().recipes.computeIfAbsent(honeycombBlockCentrifuge.getType(), t -> new HashMap<>()).put(honeycombBlockCentrifuge.getId(), honeycombBlockCentrifuge);
}
if (Config.HONEYCOMB_BLOCK_RECIPES.get() && honeycombData.getHoneycombType().equals(HoneycombType.DEFAULT)) {
Recipe<?> honeycombBlock = this.makeHoneycombRecipe(s, honeycombData);
Recipe<?> honeycomb = this.combBlockToCombRecipe(s, honeycombData);
getRecipeManager().recipes.computeIfAbsent(honeycombBlock.getType(), t -> new HashMap<>()).put(honeycombBlock.getId(), honeycombBlock);
getRecipeManager().recipes.computeIfAbsent(honeycomb.getType(), t -> new HashMap<>()).put(honeycomb.getId(), honeycomb);
}
});
if (Config.HONEY_BLOCK_RECIPES.get() && Config.HONEY_GENERATE_BLOCKS.get()) {
HoneyRegistry.getRegistry().getHoneyBottles().forEach((s, honeyData) -> {
if (honeyData.doGenerateHoneyBlock() && honeyData.doHoneyBlockRecipe()) {
Recipe<?> honeyBlock = this.makeHoneyBlockRecipe(honeyData);
Recipe<?> honeyBottle = this.makeHoneyBottleRecipe(honeyData);
Recipe<?> bottleToBucket = this.makeBottleToBucketRecipe(honeyData);
Recipe<?> bucketToBottle = this.makeBucketToBottleRecipe(honeyData);
Recipe<?> blockToBucket = this.makeBlockToBucketRecipe(honeyData);
Recipe<?> bucketToBlock = this.makeBucketToBlockRecipe(honeyData);
getBottleRecipes(honeyBlock, honeyBottle, bottleToBucket);
getBottleRecipes(bucketToBottle, blockToBucket, bucketToBlock);
}
});
}
}
Aggregations