Search in sources :

Example 1 with RECIPES

use of com.minecolonies.api.research.util.ResearchConstants.RECIPES in project minecolonies by Minecolonies.

the class AbstractCraftingBuildingModule method checkForWorkerSpecificRecipes.

@Override
public void checkForWorkerSpecificRecipes() {
    final IRecipeManager recipeManager = IColonyManager.getInstance().getRecipeManager();
    for (final CustomRecipe newRecipe : CustomRecipeManager.getInstance().getRecipes(getCustomRecipeKey())) {
        final IRecipeStorage recipeStorage = newRecipe.getRecipeStorage();
        final IToken<?> recipeToken = recipeManager.checkOrAddRecipe(recipeStorage);
        if (newRecipe.isValidForBuilding(building)) {
            IToken<?> duplicateFound = null;
            boolean forceReplace = false;
            for (IToken<?> token : recipes) {
                if (token == recipeToken) {
                    duplicateFound = token;
                    break;
                }
                final IRecipeStorage storage = recipeManager.getRecipes().get(token);
                // Let's verify that this recipe doesn't exist in an improved form
                if (storage != null && storage.getPrimaryOutput().equals(recipeStorage.getPrimaryOutput(), true)) {
                    List<ItemStorage> recipeInput1 = storage.getCleanedInput();
                    List<ItemStorage> recipeInput2 = recipeStorage.getCleanedInput();
                    if (recipeInput1.size() != recipeInput2.size()) {
                        continue;
                    }
                    if (recipeInput1.size() > 1) {
                        recipeInput1.sort(Comparator.comparing(item -> Objects.hash(item.hashCode(), item.getAmount())));
                        recipeInput2.sort(Comparator.comparing(item -> Objects.hash(item.hashCode(), item.getAmount())));
                    }
                    boolean allMatch = true;
                    for (int i = 0; i < recipeInput1.size(); i++) {
                        if (!recipeInput1.get(i).getItem().equals(recipeInput2.get(i).getItem())) {
                            allMatch = false;
                            break;
                        }
                    }
                    if (allMatch) {
                        duplicateFound = token;
                        if (storage.getRecipeType() instanceof ClassicRecipe && recipeStorage.getRecipeType() instanceof MultiOutputRecipe) {
                            // This catches the old custom recipes without a RecipeSource
                            forceReplace = true;
                        }
                        if (storage.getRecipeSource() != null && storage.getRecipeSource().equals(recipeStorage.getRecipeSource())) {
                            // This will only happen if the tokens don't match, aka: the recipe has changed.
                            forceReplace = true;
                        }
                        break;
                    }
                }
            }
            if (duplicateFound == null) {
                addRecipeToList(recipeToken, true);
                building.getColony().getRequestManager().onColonyUpdate(request -> request.getRequest() instanceof IDeliverable && ((IDeliverable) request.getRequest()).matches(recipeStorage.getPrimaryOutput()));
                markDirty();
            } else if ((forceReplace || newRecipe.getMustExist()) && !(duplicateFound.equals(recipeToken))) {
                // We found the base recipe for a multi-recipe, replace it with the multi-recipe
                replaceRecipe(duplicateFound, recipeToken);
                building.getColony().getRequestManager().onColonyUpdate(request -> request.getRequest() instanceof IDeliverable && ((IDeliverable) request.getRequest()).matches(recipeStorage.getPrimaryOutput()));
                // Clean up old 'classic' recipes that the new multi-recipe replaces
                final List<ItemStack> alternates = recipeStorage.getAlternateOutputs();
                for (IToken<?> token : recipes) {
                    final IRecipeStorage storage = recipeManager.getRecipes().get(token);
                    if (storage.getRecipeType() instanceof ClassicRecipe && ItemStackUtils.compareItemStackListIgnoreStackSize(alternates, storage.getPrimaryOutput(), false, true)) {
                        removeRecipe(token);
                    }
                }
                building.getColony().getRequestManager().onColonyUpdate(request -> request.getRequest() instanceof IDeliverable && recipeStorage.getAlternateOutputs().stream().anyMatch(i -> ((IDeliverable) request.getRequest()).matches(i)));
                markDirty();
            }
        } else {
            if (recipes.contains(recipeToken)) {
                removeRecipe(recipeToken);
                markDirty();
            }
        }
    }
}
Also used : ServerWorld(net.minecraft.world.server.ServerWorld) IItemHandler(net.minecraftforge.items.IItemHandler) IRequest(com.minecolonies.api.colony.requestsystem.request.IRequest) SettingKey(com.minecolonies.coremod.colony.buildings.modules.settings.SettingKey) Constants(net.minecraftforge.common.util.Constants) CompoundNBT(net.minecraft.nbt.CompoundNBT) IFormattableTextComponent(net.minecraft.util.text.IFormattableTextComponent) AbstractJobCrafter(com.minecolonies.coremod.colony.jobs.AbstractJobCrafter) MinecoloniesAPIProxy(com.minecolonies.api.MinecoloniesAPIProxy) StandardFactoryController(com.minecolonies.api.colony.requestsystem.StandardFactoryController) RECIPE_IMPROVED(com.minecolonies.api.util.constant.TranslationConstants.RECIPE_IMPROVED) JobEntry(com.minecolonies.api.colony.jobs.registry.JobEntry) CraftingType(com.minecolonies.api.crafting.registry.CraftingType) ListNBT(net.minecraft.nbt.ListNBT) ImmutableSet(com.google.common.collect.ImmutableSet) PublicWorkerCraftingProductionResolver(com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingProductionResolver) TAG_RECIPES(com.minecolonies.api.util.constant.NbtTagConstants.TAG_RECIPES) Predicate(java.util.function.Predicate) TAG_DISABLED_RECIPES(com.minecolonies.api.util.constant.NbtTagConstants.TAG_DISABLED_RECIPES) LootParameters(net.minecraft.loot.LootParameters) AbstractBuilding(com.minecolonies.coremod.colony.buildings.AbstractBuilding) com.minecolonies.api.crafting(com.minecolonies.api.crafting) Collectors(java.util.stream.Collectors) Nullable(org.jetbrains.annotations.Nullable) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) IRequestResolver(com.minecolonies.api.colony.requestsystem.resolver.IRequestResolver) com.minecolonies.api.colony.buildings.modules(com.minecolonies.api.colony.buildings.modules) NotNull(org.jetbrains.annotations.NotNull) java.util(java.util) PublicWorkerCraftingRequestResolver(com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingRequestResolver) CRAFTING_REDUCEABLE(com.minecolonies.api.util.constant.TagConstants.CRAFTING_REDUCEABLE) ISettingKey(com.minecolonies.api.colony.buildings.modules.settings.ISettingKey) IToken(com.minecolonies.api.colony.requestsystem.token.IToken) ICitizenData(com.minecolonies.api.colony.ICitizenData) IWareHouse(com.minecolonies.api.colony.buildings.workerbuildings.IWareHouse) ItemStack(net.minecraft.item.ItemStack) LootContext(net.minecraft.loot.LootContext) CustomRecipe(com.minecolonies.coremod.colony.crafting.CustomRecipe) com.minecolonies.api.util(com.minecolonies.api.util) RECIPES(com.minecolonies.api.research.util.ResearchConstants.RECIPES) IDeliverable(com.minecolonies.api.colony.requestsystem.requestable.IDeliverable) ModTags(com.minecolonies.api.items.ModTags) IColonyManager(com.minecolonies.api.colony.IColonyManager) Tuple(net.minecraft.util.Tuple) CrafterRecipeSetting(com.minecolonies.coremod.colony.buildings.modules.settings.CrafterRecipeSetting) Blocks(net.minecraft.block.Blocks) TypeConstants(com.minecolonies.api.util.constant.TypeConstants) IBuilding(com.minecolonies.api.colony.buildings.IBuilding) PublicCrafting(com.minecolonies.api.colony.requestsystem.requestable.crafting.PublicCrafting) ResourceLocation(net.minecraft.util.ResourceLocation) IColony(com.minecolonies.api.colony.IColony) CustomRecipeManager(com.minecolonies.coremod.colony.crafting.CustomRecipeManager) PacketBuffer(net.minecraft.network.PacketBuffer) IJob(com.minecolonies.api.colony.jobs.IJob) CustomRecipe(com.minecolonies.coremod.colony.crafting.CustomRecipe) IToken(com.minecolonies.api.colony.requestsystem.token.IToken) IDeliverable(com.minecolonies.api.colony.requestsystem.requestable.IDeliverable)

Example 2 with RECIPES

use of com.minecolonies.api.research.util.ResearchConstants.RECIPES in project minecolonies by Minecolonies.

the class AbstractCraftingBuildingModule method getFirstFulfillableRecipe.

@Override
public IRecipeStorage getFirstFulfillableRecipe(final Predicate<ItemStack> stackPredicate, final int count, final boolean considerReservation) {
    for (final IToken<?> token : recipes) {
        if (disabledRecipes.contains(token)) {
            continue;
        }
        final IRecipeStorage storage = IColonyManager.getInstance().getRecipeManager().getRecipes().get(token);
        if (storage != null && (stackPredicate.test(storage.getPrimaryOutput()) || storage.getAlternateOutputs().stream().anyMatch(i -> stackPredicate.test(i)))) {
            final Set<IItemHandler> handlers = new HashSet<>();
            for (final ICitizenData workerEntity : building.getAllAssignedCitizen()) {
                handlers.add(workerEntity.getInventory());
            }
            IRecipeStorage toTest = storage.getRecipeType() instanceof MultiOutputRecipe ? storage.getClassicForMultiOutput(stackPredicate) : storage;
            if (toTest.canFullFillRecipe(count, considerReservation ? reservedStacks() : Collections.emptyMap(), new ArrayList<>(handlers), building)) {
                return toTest;
            }
        }
    }
    return null;
}
Also used : ServerWorld(net.minecraft.world.server.ServerWorld) IItemHandler(net.minecraftforge.items.IItemHandler) IRequest(com.minecolonies.api.colony.requestsystem.request.IRequest) SettingKey(com.minecolonies.coremod.colony.buildings.modules.settings.SettingKey) Constants(net.minecraftforge.common.util.Constants) CompoundNBT(net.minecraft.nbt.CompoundNBT) IFormattableTextComponent(net.minecraft.util.text.IFormattableTextComponent) AbstractJobCrafter(com.minecolonies.coremod.colony.jobs.AbstractJobCrafter) MinecoloniesAPIProxy(com.minecolonies.api.MinecoloniesAPIProxy) StandardFactoryController(com.minecolonies.api.colony.requestsystem.StandardFactoryController) RECIPE_IMPROVED(com.minecolonies.api.util.constant.TranslationConstants.RECIPE_IMPROVED) JobEntry(com.minecolonies.api.colony.jobs.registry.JobEntry) CraftingType(com.minecolonies.api.crafting.registry.CraftingType) ListNBT(net.minecraft.nbt.ListNBT) ImmutableSet(com.google.common.collect.ImmutableSet) PublicWorkerCraftingProductionResolver(com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingProductionResolver) TAG_RECIPES(com.minecolonies.api.util.constant.NbtTagConstants.TAG_RECIPES) Predicate(java.util.function.Predicate) TAG_DISABLED_RECIPES(com.minecolonies.api.util.constant.NbtTagConstants.TAG_DISABLED_RECIPES) LootParameters(net.minecraft.loot.LootParameters) AbstractBuilding(com.minecolonies.coremod.colony.buildings.AbstractBuilding) com.minecolonies.api.crafting(com.minecolonies.api.crafting) Collectors(java.util.stream.Collectors) Nullable(org.jetbrains.annotations.Nullable) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) IRequestResolver(com.minecolonies.api.colony.requestsystem.resolver.IRequestResolver) com.minecolonies.api.colony.buildings.modules(com.minecolonies.api.colony.buildings.modules) NotNull(org.jetbrains.annotations.NotNull) java.util(java.util) PublicWorkerCraftingRequestResolver(com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingRequestResolver) CRAFTING_REDUCEABLE(com.minecolonies.api.util.constant.TagConstants.CRAFTING_REDUCEABLE) ISettingKey(com.minecolonies.api.colony.buildings.modules.settings.ISettingKey) IToken(com.minecolonies.api.colony.requestsystem.token.IToken) ICitizenData(com.minecolonies.api.colony.ICitizenData) IWareHouse(com.minecolonies.api.colony.buildings.workerbuildings.IWareHouse) ItemStack(net.minecraft.item.ItemStack) LootContext(net.minecraft.loot.LootContext) CustomRecipe(com.minecolonies.coremod.colony.crafting.CustomRecipe) com.minecolonies.api.util(com.minecolonies.api.util) RECIPES(com.minecolonies.api.research.util.ResearchConstants.RECIPES) IDeliverable(com.minecolonies.api.colony.requestsystem.requestable.IDeliverable) ModTags(com.minecolonies.api.items.ModTags) IColonyManager(com.minecolonies.api.colony.IColonyManager) Tuple(net.minecraft.util.Tuple) CrafterRecipeSetting(com.minecolonies.coremod.colony.buildings.modules.settings.CrafterRecipeSetting) Blocks(net.minecraft.block.Blocks) TypeConstants(com.minecolonies.api.util.constant.TypeConstants) IBuilding(com.minecolonies.api.colony.buildings.IBuilding) PublicCrafting(com.minecolonies.api.colony.requestsystem.requestable.crafting.PublicCrafting) ResourceLocation(net.minecraft.util.ResourceLocation) IColony(com.minecolonies.api.colony.IColony) CustomRecipeManager(com.minecolonies.coremod.colony.crafting.CustomRecipeManager) PacketBuffer(net.minecraft.network.PacketBuffer) IJob(com.minecolonies.api.colony.jobs.IJob) IItemHandler(net.minecraftforge.items.IItemHandler) ICitizenData(com.minecolonies.api.colony.ICitizenData)

Example 3 with RECIPES

use of com.minecolonies.api.research.util.ResearchConstants.RECIPES in project minecolonies by ldtteam.

the class AbstractCraftingBuildingModule method checkForWorkerSpecificRecipes.

@Override
public void checkForWorkerSpecificRecipes() {
    final IRecipeManager recipeManager = IColonyManager.getInstance().getRecipeManager();
    for (final CustomRecipe newRecipe : CustomRecipeManager.getInstance().getRecipes(getCustomRecipeKey())) {
        final IRecipeStorage recipeStorage = newRecipe.getRecipeStorage();
        final IToken<?> recipeToken = recipeManager.checkOrAddRecipe(recipeStorage);
        if (newRecipe.isValidForBuilding(building)) {
            IToken<?> duplicateFound = null;
            boolean forceReplace = false;
            for (IToken<?> token : recipes) {
                if (token == recipeToken) {
                    duplicateFound = token;
                    break;
                }
                final IRecipeStorage storage = recipeManager.getRecipes().get(token);
                // Let's verify that this recipe doesn't exist in an improved form
                if (storage != null && storage.getPrimaryOutput().equals(recipeStorage.getPrimaryOutput(), true)) {
                    List<ItemStorage> recipeInput1 = storage.getCleanedInput();
                    List<ItemStorage> recipeInput2 = recipeStorage.getCleanedInput();
                    if (recipeInput1.size() != recipeInput2.size()) {
                        continue;
                    }
                    if (recipeInput1.size() > 1) {
                        recipeInput1.sort(Comparator.comparing(item -> Objects.hash(item.hashCode(), item.getAmount())));
                        recipeInput2.sort(Comparator.comparing(item -> Objects.hash(item.hashCode(), item.getAmount())));
                    }
                    boolean allMatch = true;
                    for (int i = 0; i < recipeInput1.size(); i++) {
                        if (!recipeInput1.get(i).getItem().equals(recipeInput2.get(i).getItem())) {
                            allMatch = false;
                            break;
                        }
                    }
                    if (allMatch) {
                        duplicateFound = token;
                        if (storage.getRecipeType() instanceof ClassicRecipe && recipeStorage.getRecipeType() instanceof MultiOutputRecipe) {
                            // This catches the old custom recipes without a RecipeSource
                            forceReplace = true;
                        }
                        if (storage.getRecipeSource() != null && storage.getRecipeSource().equals(recipeStorage.getRecipeSource())) {
                            // This will only happen if the tokens don't match, aka: the recipe has changed.
                            forceReplace = true;
                        }
                        break;
                    }
                }
            }
            if (duplicateFound == null) {
                addRecipeToList(recipeToken, true);
                building.getColony().getRequestManager().onColonyUpdate(request -> request.getRequest() instanceof IDeliverable && ((IDeliverable) request.getRequest()).matches(recipeStorage.getPrimaryOutput()));
                markDirty();
            } else if ((forceReplace || newRecipe.getMustExist()) && !(duplicateFound.equals(recipeToken))) {
                // We found the base recipe for a multi-recipe, replace it with the multi-recipe
                replaceRecipe(duplicateFound, recipeToken);
                building.getColony().getRequestManager().onColonyUpdate(request -> request.getRequest() instanceof IDeliverable && ((IDeliverable) request.getRequest()).matches(recipeStorage.getPrimaryOutput()));
                // Clean up old 'classic' recipes that the new multi-recipe replaces
                final List<ItemStack> alternates = recipeStorage.getAlternateOutputs();
                for (IToken<?> token : recipes) {
                    final IRecipeStorage storage = recipeManager.getRecipes().get(token);
                    if (storage.getRecipeType() instanceof ClassicRecipe && ItemStackUtils.compareItemStackListIgnoreStackSize(alternates, storage.getPrimaryOutput(), false, true)) {
                        removeRecipe(token);
                    }
                }
                building.getColony().getRequestManager().onColonyUpdate(request -> request.getRequest() instanceof IDeliverable && recipeStorage.getAlternateOutputs().stream().anyMatch(i -> ((IDeliverable) request.getRequest()).matches(i)));
                markDirty();
            }
        } else {
            if (recipes.contains(recipeToken)) {
                removeRecipe(recipeToken);
                markDirty();
            }
        }
    }
}
Also used : ServerWorld(net.minecraft.world.server.ServerWorld) IItemHandler(net.minecraftforge.items.IItemHandler) IRequest(com.minecolonies.api.colony.requestsystem.request.IRequest) SettingKey(com.minecolonies.coremod.colony.buildings.modules.settings.SettingKey) Constants(net.minecraftforge.common.util.Constants) CompoundNBT(net.minecraft.nbt.CompoundNBT) AbstractJobCrafter(com.minecolonies.coremod.colony.jobs.AbstractJobCrafter) TranslationTextComponent(net.minecraft.util.text.TranslationTextComponent) StandardFactoryController(com.minecolonies.api.colony.requestsystem.StandardFactoryController) RECIPE_IMPROVED(com.minecolonies.api.util.constant.TranslationConstants.RECIPE_IMPROVED) JobEntry(com.minecolonies.api.colony.jobs.registry.JobEntry) ListNBT(net.minecraft.nbt.ListNBT) PublicWorkerCraftingProductionResolver(com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingProductionResolver) PlayerEntity(net.minecraft.entity.player.PlayerEntity) TAG_RECIPES(com.minecolonies.api.util.constant.NbtTagConstants.TAG_RECIPES) Predicate(java.util.function.Predicate) TAG_DISABLED_RECIPES(com.minecolonies.api.util.constant.NbtTagConstants.TAG_DISABLED_RECIPES) LootParameters(net.minecraft.loot.LootParameters) AbstractBuilding(com.minecolonies.coremod.colony.buildings.AbstractBuilding) com.minecolonies.api.crafting(com.minecolonies.api.crafting) Collectors(java.util.stream.Collectors) Nullable(org.jetbrains.annotations.Nullable) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) IRequestResolver(com.minecolonies.api.colony.requestsystem.resolver.IRequestResolver) com.minecolonies.api.colony.buildings.modules(com.minecolonies.api.colony.buildings.modules) NotNull(org.jetbrains.annotations.NotNull) java.util(java.util) PublicWorkerCraftingRequestResolver(com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingRequestResolver) CRAFTING_REDUCEABLE(com.minecolonies.api.util.constant.TagConstants.CRAFTING_REDUCEABLE) ISettingKey(com.minecolonies.api.colony.buildings.modules.settings.ISettingKey) IToken(com.minecolonies.api.colony.requestsystem.token.IToken) ICitizenData(com.minecolonies.api.colony.ICitizenData) IWareHouse(com.minecolonies.api.colony.buildings.workerbuildings.IWareHouse) ItemStack(net.minecraft.item.ItemStack) LootContext(net.minecraft.loot.LootContext) CustomRecipe(com.minecolonies.coremod.colony.crafting.CustomRecipe) com.minecolonies.api.util(com.minecolonies.api.util) RECIPES(com.minecolonies.api.research.util.ResearchConstants.RECIPES) IDeliverable(com.minecolonies.api.colony.requestsystem.requestable.IDeliverable) ModTags(com.minecolonies.api.items.ModTags) IColonyManager(com.minecolonies.api.colony.IColonyManager) Tuple(net.minecraft.util.Tuple) CrafterRecipeSetting(com.minecolonies.coremod.colony.buildings.modules.settings.CrafterRecipeSetting) Blocks(net.minecraft.block.Blocks) TypeConstants(com.minecolonies.api.util.constant.TypeConstants) IBuilding(com.minecolonies.api.colony.buildings.IBuilding) PublicCrafting(com.minecolonies.api.colony.requestsystem.requestable.crafting.PublicCrafting) ResourceLocation(net.minecraft.util.ResourceLocation) IColony(com.minecolonies.api.colony.IColony) CustomRecipeManager(com.minecolonies.coremod.colony.crafting.CustomRecipeManager) PacketBuffer(net.minecraft.network.PacketBuffer) IJob(com.minecolonies.api.colony.jobs.IJob) CustomRecipe(com.minecolonies.coremod.colony.crafting.CustomRecipe) IToken(com.minecolonies.api.colony.requestsystem.token.IToken) IDeliverable(com.minecolonies.api.colony.requestsystem.requestable.IDeliverable)

Example 4 with RECIPES

use of com.minecolonies.api.research.util.ResearchConstants.RECIPES in project minecolonies by ldtteam.

the class AbstractCraftingBuildingModule method getFirstFulfillableRecipe.

@Override
public IRecipeStorage getFirstFulfillableRecipe(final Predicate<ItemStack> stackPredicate, final int count, final boolean considerReservation) {
    for (final IToken<?> token : recipes) {
        if (disabledRecipes.contains(token)) {
            continue;
        }
        final IRecipeStorage storage = IColonyManager.getInstance().getRecipeManager().getRecipes().get(token);
        if (storage != null && (stackPredicate.test(storage.getPrimaryOutput()) || storage.getAlternateOutputs().stream().anyMatch(i -> stackPredicate.test(i)))) {
            final Set<IItemHandler> handlers = new HashSet<>();
            for (final ICitizenData workerEntity : building.getAllAssignedCitizen()) {
                handlers.add(workerEntity.getInventory());
            }
            IRecipeStorage toTest = storage.getRecipeType() instanceof MultiOutputRecipe ? storage.getClassicForMultiOutput(stackPredicate) : storage;
            if (toTest.canFullFillRecipe(count, considerReservation ? reservedStacks() : Collections.emptyMap(), new ArrayList<>(handlers), building)) {
                return toTest;
            }
        }
    }
    return null;
}
Also used : ServerWorld(net.minecraft.world.server.ServerWorld) IItemHandler(net.minecraftforge.items.IItemHandler) IRequest(com.minecolonies.api.colony.requestsystem.request.IRequest) SettingKey(com.minecolonies.coremod.colony.buildings.modules.settings.SettingKey) Constants(net.minecraftforge.common.util.Constants) CompoundNBT(net.minecraft.nbt.CompoundNBT) AbstractJobCrafter(com.minecolonies.coremod.colony.jobs.AbstractJobCrafter) TranslationTextComponent(net.minecraft.util.text.TranslationTextComponent) StandardFactoryController(com.minecolonies.api.colony.requestsystem.StandardFactoryController) RECIPE_IMPROVED(com.minecolonies.api.util.constant.TranslationConstants.RECIPE_IMPROVED) JobEntry(com.minecolonies.api.colony.jobs.registry.JobEntry) ListNBT(net.minecraft.nbt.ListNBT) PublicWorkerCraftingProductionResolver(com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingProductionResolver) PlayerEntity(net.minecraft.entity.player.PlayerEntity) TAG_RECIPES(com.minecolonies.api.util.constant.NbtTagConstants.TAG_RECIPES) Predicate(java.util.function.Predicate) TAG_DISABLED_RECIPES(com.minecolonies.api.util.constant.NbtTagConstants.TAG_DISABLED_RECIPES) LootParameters(net.minecraft.loot.LootParameters) AbstractBuilding(com.minecolonies.coremod.colony.buildings.AbstractBuilding) com.minecolonies.api.crafting(com.minecolonies.api.crafting) Collectors(java.util.stream.Collectors) Nullable(org.jetbrains.annotations.Nullable) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) IRequestResolver(com.minecolonies.api.colony.requestsystem.resolver.IRequestResolver) com.minecolonies.api.colony.buildings.modules(com.minecolonies.api.colony.buildings.modules) NotNull(org.jetbrains.annotations.NotNull) java.util(java.util) PublicWorkerCraftingRequestResolver(com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingRequestResolver) CRAFTING_REDUCEABLE(com.minecolonies.api.util.constant.TagConstants.CRAFTING_REDUCEABLE) ISettingKey(com.minecolonies.api.colony.buildings.modules.settings.ISettingKey) IToken(com.minecolonies.api.colony.requestsystem.token.IToken) ICitizenData(com.minecolonies.api.colony.ICitizenData) IWareHouse(com.minecolonies.api.colony.buildings.workerbuildings.IWareHouse) ItemStack(net.minecraft.item.ItemStack) LootContext(net.minecraft.loot.LootContext) CustomRecipe(com.minecolonies.coremod.colony.crafting.CustomRecipe) com.minecolonies.api.util(com.minecolonies.api.util) RECIPES(com.minecolonies.api.research.util.ResearchConstants.RECIPES) IDeliverable(com.minecolonies.api.colony.requestsystem.requestable.IDeliverable) ModTags(com.minecolonies.api.items.ModTags) IColonyManager(com.minecolonies.api.colony.IColonyManager) Tuple(net.minecraft.util.Tuple) CrafterRecipeSetting(com.minecolonies.coremod.colony.buildings.modules.settings.CrafterRecipeSetting) Blocks(net.minecraft.block.Blocks) TypeConstants(com.minecolonies.api.util.constant.TypeConstants) IBuilding(com.minecolonies.api.colony.buildings.IBuilding) PublicCrafting(com.minecolonies.api.colony.requestsystem.requestable.crafting.PublicCrafting) ResourceLocation(net.minecraft.util.ResourceLocation) IColony(com.minecolonies.api.colony.IColony) CustomRecipeManager(com.minecolonies.coremod.colony.crafting.CustomRecipeManager) PacketBuffer(net.minecraft.network.PacketBuffer) IJob(com.minecolonies.api.colony.jobs.IJob) IItemHandler(net.minecraftforge.items.IItemHandler) ICitizenData(com.minecolonies.api.colony.ICitizenData)

Aggregations

ICitizenData (com.minecolonies.api.colony.ICitizenData)4 IColony (com.minecolonies.api.colony.IColony)4 IColonyManager (com.minecolonies.api.colony.IColonyManager)4 IBuilding (com.minecolonies.api.colony.buildings.IBuilding)4 com.minecolonies.api.colony.buildings.modules (com.minecolonies.api.colony.buildings.modules)4 ISettingKey (com.minecolonies.api.colony.buildings.modules.settings.ISettingKey)4 IWareHouse (com.minecolonies.api.colony.buildings.workerbuildings.IWareHouse)4 IJob (com.minecolonies.api.colony.jobs.IJob)4 JobEntry (com.minecolonies.api.colony.jobs.registry.JobEntry)4 StandardFactoryController (com.minecolonies.api.colony.requestsystem.StandardFactoryController)4 IRequest (com.minecolonies.api.colony.requestsystem.request.IRequest)4 IDeliverable (com.minecolonies.api.colony.requestsystem.requestable.IDeliverable)4 PublicCrafting (com.minecolonies.api.colony.requestsystem.requestable.crafting.PublicCrafting)4 IRequestResolver (com.minecolonies.api.colony.requestsystem.resolver.IRequestResolver)4 IToken (com.minecolonies.api.colony.requestsystem.token.IToken)4 com.minecolonies.api.crafting (com.minecolonies.api.crafting)4 AbstractEntityCitizen (com.minecolonies.api.entity.citizen.AbstractEntityCitizen)4 ModTags (com.minecolonies.api.items.ModTags)4 RECIPES (com.minecolonies.api.research.util.ResearchConstants.RECIPES)4 com.minecolonies.api.util (com.minecolonies.api.util)4