Class AbstractBuildingModule
java.lang.Object
com.minecolonies.api.colony.buildings.modules.AbstractBuildingModule
- All Implemented Interfaces:
IBuildingModule,IHasDirty
- Direct Known Subclasses:
AbstractAssignedCitizenModule,AbstractCraftingBuildingModule,AnimalHerdingModule,BedHandlingModule,BuildingExtensionsModule,BuildingResourcesModule,BuildingStatisticsModule,ColonyConnectionModule,EnchanterStationsModule,EntityListModule,ExpeditionLogModule,FurnaceUserModule,GraveyardManagementModule,HomeBuildingModule,ItemListModule,MinerLevelManagementModule,MinimumStockModule,RestaurantMenuModule,SettingsModule,TavernBuildingModule,WarehouseModule,WarehouseRequestQueueModule
Abstract class for all modules. Has base methods for all the necessary methods that have to be called from the building.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if one of the modules is dirty.voidClear the dirty setting of the module.Get the building of the module.Get the producer of this modulevoidSpecific dirty marking of modules (separate from building dirty).setBuilding(IBuilding building) Set the building of the module.setProducer(BuildingEntry.ModuleProducer moduleSet) Set the producer of this moduleMethods 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
serializeToView, serializeToView
-
Field Details
-
isDirty
public boolean isDirtyIf the module is dirty. -
building
The building this module belongs to.
-
-
Constructor Details
-
AbstractBuildingModule
public AbstractBuildingModule()
-
-
Method Details
-
markDirty
public void markDirty()Description copied from interface:IHasDirtySpecific dirty marking of modules (separate from building dirty). -
clearDirty
public void clearDirty()Description copied from interface:IHasDirtyClear the dirty setting of the module.- Specified by:
clearDirtyin interfaceIHasDirty
-
checkDirty
public boolean checkDirty()Description copied from interface:IHasDirtyCheck if one of the modules is dirty.- Specified by:
checkDirtyin interfaceIHasDirty- Returns:
- true if so.
-
getBuilding
Description copied from interface:IBuildingModuleGet the building of the module.- Specified by:
getBuildingin interfaceIBuildingModule- Returns:
- the building.
-
setBuilding
Description copied from interface:IBuildingModuleSet the building of the module.- Specified by:
setBuildingin interfaceIBuildingModule- Parameters:
building- the building to set.- Returns:
- the module itself.
-
setProducer
Description copied from interface:IBuildingModuleSet the producer of this module- Specified by:
setProducerin interfaceIBuildingModule- Parameters:
moduleSet-- Returns:
-
getProducer
Description copied from interface:IBuildingModuleGet the producer of this module- Specified by:
getProducerin interfaceIBuildingModule- Returns:
-