Class BuildingSmeltery.OreBreakingModule
java.lang.Object
com.minecolonies.api.colony.buildings.modules.AbstractBuildingModule
com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule
com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule.Custom
com.minecolonies.core.colony.buildings.workerbuildings.BuildingSmeltery.OreBreakingModule
- All Implemented Interfaces:
IBuildingModule,ICraftingBuildingModule,ICreatesResolversModule,IHasRequiredItemsModule,IPersistentModule,ITickingModule,IHasDirty
- Enclosing class:
BuildingSmeltery
public static class BuildingSmeltery.OreBreakingModule
extends AbstractCraftingBuildingModule.Custom
-
Nested Class Summary
Nested classes/interfaces inherited from class com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule
AbstractCraftingBuildingModule.Brewing, AbstractCraftingBuildingModule.Crafting, AbstractCraftingBuildingModule.Custom, AbstractCraftingBuildingModule.Domum, AbstractCraftingBuildingModule.Smelting -
Field Summary
Fields inherited from class com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule
building, disabledRecipes, jobEntry, RECIPE_MODE, recipesFields inherited from class com.minecolonies.api.colony.buildings.modules.AbstractBuildingModule
isDirty -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidUpdates existing requests, if they match the recipes available at this worker@NotNull List<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> Gets a list of loot tables that should be available for drop analysis (beyond any already used in recipes).@NotNull List<IGenericRecipe> getAdditionalRecipesForDisplayPurposesOnly(@NotNull net.minecraft.world.level.Level world) Generates any additional special recipes supported by this crafter.net.minecraft.world.item.ItemStackgetCraftingTool(AbstractEntityCitizen worker) Get tool to use during fulFillRecipeprotected net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> getLootTable(net.minecraft.world.item.Item item) protected booleanisPreTaughtRecipe(IRecipeStorage storage, Map<net.minecraft.resources.ResourceLocation, CustomRecipe> crafterRecipes) Check if the recipe is a pre-taught recipe through datapack.Methods inherited from class com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule.Custom
getId, getSupportedCraftingTypes, isRecipeCompatibleMethods inherited from class com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule
addRecipe, addRecipeToList, canLearnManyRecipes, canRecipeBeAdded, clearRecipes, createResolvers, deserializeNBT, fullFillRecipe, getCraftingJob, getCraftingLuck, getCustomRecipeKey, getFirstFulfillableRecipe, getFirstRecipe, getFirstRecipe, getIngredientValidator, getMaxRecipes, getRecipes, getRequiredItemsAndAmount, getWarehouseCount, handleRecipeUpdate, holdsRecipe, improveRecipe, isDisabled, isRecipeCompatibleWithCraftingModule, isVisible, onColonyTick, removeRecipe, replaceRecipe, reservedStacksExcluding, serializeNBT, serializeToView, setBuilding, switchOrder, toggle, updateWorkerAvailableForRecipesMethods inherited from class com.minecolonies.api.colony.buildings.modules.AbstractBuildingModule
checkDirty, clearDirty, getBuilding, getProducer, markDirty, setProducerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.buildings.modules.IBuildingModule
getBuilding, getProducer, serializeToView, setProducerMethods inherited from interface com.minecolonies.api.colony.buildings.modules.ICraftingBuildingModule
canLearn, getUidMethods inherited from interface com.minecolonies.api.util.IHasDirty
checkDirty, clearDirty, markDirtyMethods inherited from interface com.minecolonies.api.colony.buildings.modules.IHasRequiredItemsModule
reservedStacks
-
Constructor Details
-
OreBreakingModule
-
-
Method Details
-
getAdditionalLootTables
@NotNull public @NotNull List<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> getAdditionalLootTables()Description copied from interface:ICraftingBuildingModuleGets a list of loot tables that should be available for drop analysis (beyond any already used in recipes). This is not intended for actually generating loot, just for display purposes such as in JEI (e.g. viaICraftingBuildingModule.getAdditionalRecipesForDisplayPurposesOnly(Level)).- Returns:
- The list of loot table ids
-
isPreTaughtRecipe
protected boolean isPreTaughtRecipe(IRecipeStorage storage, Map<net.minecraft.resources.ResourceLocation, CustomRecipe> crafterRecipes) Description copied from class:AbstractCraftingBuildingModuleCheck if the recipe is a pre-taught recipe through datapack.- Overrides:
isPreTaughtRecipein classAbstractCraftingBuildingModule- Parameters:
storage- the recipe to check.crafterRecipes- the list of custom recipes.- Returns:
- true if so.
-
getAdditionalRecipesForDisplayPurposesOnly
@NotNull public @NotNull List<IGenericRecipe> getAdditionalRecipesForDisplayPurposesOnly(@NotNull @NotNull net.minecraft.world.level.Level world) Description copied from interface:ICraftingBuildingModuleGenerates any additional special recipes supported by this crafter. Unlike the above, these are not added to the building's learned recipe list; they are only used for display purposes such as the JEI lookup. This is intended for things that the worker AI can do by itself without any explicit recipe (neither taught nor loaded).- Specified by:
getAdditionalRecipesForDisplayPurposesOnlyin interfaceICraftingBuildingModule- Overrides:
getAdditionalRecipesForDisplayPurposesOnlyin classAbstractCraftingBuildingModule- Returns:
- The list of additional recipes.
-
checkForWorkerSpecificRecipes
public void checkForWorkerSpecificRecipes()Description copied from interface:ICraftingBuildingModuleUpdates existing requests, if they match the recipes available at this worker- Specified by:
checkForWorkerSpecificRecipesin interfaceICraftingBuildingModule- Overrides:
checkForWorkerSpecificRecipesin classAbstractCraftingBuildingModule
-
getCraftingTool
Description copied from interface:ICraftingBuildingModuleGet tool to use during fulFillRecipe- Specified by:
getCraftingToolin interfaceICraftingBuildingModule- Overrides:
getCraftingToolin classAbstractCraftingBuildingModule- Parameters:
worker- the worker to query for tool
-
getLootTable
protected net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> getLootTable(net.minecraft.world.item.Item item)
-