Class SimpleCraftingModule
java.lang.Object
com.minecolonies.api.colony.buildings.modules.AbstractBuildingModule
com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule
com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule.Crafting
com.minecolonies.core.colony.buildings.modules.SimpleCraftingModule
- All Implemented Interfaces:
IBuildingModule,ICraftingBuildingModule,ICreatesResolversModule,IHasRequiredItemsModule,IPersistentModule,ITickingModule,IHasDirty
This module is used for the buildings that only support simple
2x2 crafting. They don't have any restrictions on what they can
learn to craft beyond this, but they won't craft for the request
system either, only for themselves.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule
AbstractCraftingBuildingModule.Brewing, AbstractCraftingBuildingModule.Crafting, AbstractCraftingBuildingModule.Custom, 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 TypeMethodDescriptionbooleanCheck if the module should have a large limit for learnable recipes.List<IRequestResolver<?>>Get a list of resolvers for this building.@Nullable IJob<?>Gets the crafting job associated with this building type.Get the supported crafting types.Methods inherited from class com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule.Crafting
getId, isRecipeCompatibleMethods inherited from class com.minecolonies.core.colony.buildings.modules.AbstractCraftingBuildingModule
addRecipe, addRecipeToList, canRecipeBeAdded, checkForWorkerSpecificRecipes, clearRecipes, deserializeNBT, fullFillRecipe, getAdditionalRecipesForDisplayPurposesOnly, getCraftingLuck, getCraftingTool, getCustomRecipeKey, getFirstFulfillableRecipe, getFirstRecipe, getFirstRecipe, getIngredientValidator, getMaxRecipes, getRecipes, getRequiredItemsAndAmount, getWarehouseCount, handleRecipeUpdate, holdsRecipe, improveRecipe, isDisabled, isPreTaughtRecipe, 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, getAdditionalLootTables, 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
-
SimpleCraftingModule
Create a new module.
-
-
Method Details
-
getCraftingJob
Description copied from interface:ICraftingBuildingModuleGets the crafting job associated with this building type. This might not be the primary job of the building. Note that this must either always return null or always return a valid job, even if this module is not currently associated with a specific colony or building. (Note that if it returns null, there will be no JEI integration.) It may either return the actual job associated with a citizen working at the current building, or an abstract job not yet associated with any particular citizen. It is permitted for two crafting module types to return the same job but in that caseICraftingBuildingModule.getId()must return different ids.- Specified by:
getCraftingJobin interfaceICraftingBuildingModule- Overrides:
getCraftingJobin classAbstractCraftingBuildingModule- Returns:
- The crafting job, or null if there is no such job.
-
createResolvers
Description copied from interface:ICreatesResolversModuleGet a list of resolvers for this building.- Specified by:
createResolversin interfaceICreatesResolversModule- Overrides:
createResolversin classAbstractCraftingBuildingModule- Returns:
- the list of resolvers.
-
canLearnManyRecipes
public boolean canLearnManyRecipes()Description copied from interface:ICraftingBuildingModuleCheck if the module should have a large limit for learnable recipes.- Specified by:
canLearnManyRecipesin interfaceICraftingBuildingModule- Overrides:
canLearnManyRecipesin classAbstractCraftingBuildingModule- Returns:
- true if so.
-
getSupportedCraftingTypes
Description copied from interface:ICraftingBuildingModuleGet the supported crafting types.- Specified by:
getSupportedCraftingTypesin interfaceICraftingBuildingModule- Overrides:
getSupportedCraftingTypesin classAbstractCraftingBuildingModule.Crafting- Returns:
- a set of types.
-