use of com.ldtteam.structurize.blocks.types.WoodType in project minecolonies by ldtteam.
the class SawmillTimberFrameRecipeProvider method registerRecipes.
@Override
protected void registerRecipes(final Consumer<IFinishedRecipe> consumer) {
for (final WoodType frameType : WoodType.values()) {
for (final TimberFrameCentreType centreType : TimberFrameCentreType.values()) {
final String id = String.format("%s_%s_timber_frame", frameType.getSerializedName(), centreType.getSerializedName());
final ItemStorage frame = new ItemStorage(new ItemStack(frameType.getMaterial(), 1));
final ItemStorage centre = new ItemStorage(new ItemStack(centreType.getMaterial()));
final List<ItemStack> results = Arrays.stream(TimberFrameType.values()).map(type -> idToStructurize(BlockTimberFrame.getName(type, frameType, centreType), 4)).collect(Collectors.toList());
CustomRecipeBuilder.create("sawmill_crafting", id).inputs(Lists.newArrayList(frame, centre, new ItemStorage(new ItemStack(buildTool.get())))).alternateOutputs(results.subList(1, results.size())).result(results.get(0)).mustExist(true).build(consumer);
}
}
}
use of com.ldtteam.structurize.blocks.types.WoodType in project minecolonies by Minecolonies.
the class SawmillTimberFrameRecipeProvider method registerRecipes.
@Override
protected void registerRecipes(final Consumer<IFinishedRecipe> consumer) {
for (final WoodType frameType : WoodType.values()) {
for (final TimberFrameCentreType centreType : TimberFrameCentreType.values()) {
final String id = String.format("%s_%s_timber_frame", frameType.getSerializedName(), centreType.getSerializedName());
final ItemStorage frame = new ItemStorage(new ItemStack(frameType.getMaterial(), 1));
final ItemStorage centre = new ItemStorage(new ItemStack(centreType.getMaterial()));
final List<ItemStack> results = Arrays.stream(TimberFrameType.values()).map(type -> idToStructurize(BlockTimberFrame.getName(type, frameType, centreType), 4)).collect(Collectors.toList());
CustomRecipeBuilder.create("sawmill_crafting", id).inputs(Lists.newArrayList(frame, centre, new ItemStorage(new ItemStack(buildTool.get())))).alternateOutputs(results.subList(1, results.size())).result(results.get(0)).mustExist(true).build(consumer);
}
}
}
Aggregations