Interface IBuilding
- All Superinterfaces:
IBuildingContainer,IBuildingModuleContainer,net.minecraftforge.common.capabilities.ICapabilityProvider,ICommonBuilding,IModuleContainer<IBuildingModule>,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>,IRequester,IRequestResolverProvider,ISchematicProvider
- All Known Subinterfaces:
IBuildingDeliveryman,IBuildingWorker,IGuardBuilding,IMysticalSite,ITownHall,IWareHouse
- All Known Implementing Classes:
AbstractBuilding,AbstractBuildingContainer,AbstractBuildingGuards,AbstractBuildingStructureBuilder,AbstractSchematicProvider,BuildingAlchemist,BuildingArchery,BuildingBaker,BuildingBarracks,BuildingBarracksTower,BuildingBeekeeper,BuildingBlacksmith,BuildingBuilder,BuildingChickenHerder,BuildingCombatAcademy,BuildingComposter,BuildingConcreteMixer,BuildingCook,BuildingCowboy,BuildingCrusher,BuildingDeliveryman,BuildingDyer,BuildingEnchanter,BuildingFarmer,BuildingFisherman,BuildingFletcher,BuildingFlorist,BuildingGateHouse,BuildingGlassblower,BuildingGraveyard,BuildingGuardTower,BuildingHospital,BuildingKitchen,BuildingLibrary,BuildingLumberjack,BuildingMechanic,BuildingMiner,BuildingMysticalSite,BuildingNetherWorker,BuildingPlantation,BuildingRabbitHutch,BuildingSawmill,BuildingSchool,BuildingShepherd,BuildingSifter,BuildingSmeltery,BuildingStable,BuildingStonemason,BuildingStoneSmeltery,BuildingSwineHerder,BuildingTownHall,BuildingUniversity,BuildingWareHouse,DefaultBuildingInstance,PostBox,Stash
public interface IBuilding
extends IBuildingContainer, IBuildingModuleContainer, IRequestResolverProvider, IRequester, ICommonBuilding
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMinimal level to ask for wood tools. -
Method Summary
Modifier and TypeMethodDescriptionvoidTrigger for async prestige recalculation.default intbuildingRequiresCertainAmountOfItem(net.minecraft.world.item.ItemStack stack, List<ItemStorage> localAlreadyKept, boolean inventory) Check if the building requires a certain amount of that item and the alreadykept list contains it.intbuildingRequiresCertainAmountOfItem(net.minecraft.world.item.ItemStack stack, List<ItemStorage> localAlreadyKept, boolean inventory, @Nullable JobEntry jobEntry) Check if the worker requires a certain amount of that item and the alreadykept list contains it.voidCalculate all building corners from the schematic data.voidcalculatePrestige(com.ldtteam.structurize.blueprints.v1.Blueprint blueprint) Recalculate prestige for building.default booleanCheck if this building is sufficiently built to be able to assign workers.booleancanBeBuiltByBuilder(int newLevel) Method to define if a builder can build this although the builder is not level 1 yet.booleanCheck if the building should be gathered by the dman.voidcancelAllRequestsOfCitizenOrBuilding(@Nullable ICitizenData data) Cancel all requests of citizen or building (if citizen data is null)default booleancanEat(net.minecraft.world.item.ItemStack stack) Check if the assigned citizens are allowed to eat the following stack.default booleancanSort()Checks if the building can be sorted.booleancreatePickupRequest(int qty, boolean force) Creates a pickup request for the building.<R extends IRequestable>
IToken<?>createRequest(@NotNull ICitizenData citizenData, R requested, boolean async) Create a request for a citizen.<R extends IRequestable>
IToken<?>createRequest(R requested, boolean async) Create a request for the building.com.google.common.collect.ImmutableCollection<IRequestResolver<?>>voidDeconstruct the building on destroyed.voiddestroy()Destroys the block.@Nullable net.minecraft.world.item.ItemStackforceTransferStack(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world) Try to transfer a stack to one of the inventories of the building and force the transfer.Get the set of all assigned citizens in the colony.@NotNull StringGetter for the display name of a building.getCitizenForRequest(@NotNull IToken<?> token) intgetClaimRadius(int buildingLevel) Method to calculate the radius to be claimed by this building depending on the level.Collection<IRequest<?>>getCompletedRequestsOfCitizenOrBuilding(@Nullable ICitizenData data) Get completed requests for citizen or building (citizen independent, so if data is null)<R> com.google.common.collect.ImmutableList<IRequest<? extends R>>getCompletedRequestsOfType(@NotNull ICitizenData citizenData, com.google.common.reflect.TypeToken<R> requestType) <R> com.google.common.collect.ImmutableList<IRequest<? extends R>>getCompletedRequestsOfTypeFiltered(@NotNull ICitizenData citizenData, com.google.common.reflect.TypeToken<R> requestType, Predicate<IRequest<? extends R>> filter) @NotNull StringGetter for the custom name of a building.List<net.minecraftforge.items.IItemHandler>Get all handlers associated with this building.@NotNull List<net.minecraft.core.BlockPos>getLocationsFromTag(@NotNull String tagName) Gets the list of tags, and finds all locations registered there.default intGet the max equipment level useable by the worker.Collection<IRequest<?>>getOpenRequests(int citizenid) Map<com.google.common.reflect.TypeToken<?>,Collection<IToken<?>>> Get a map of all open requests by type.<R> com.google.common.collect.ImmutableList<IRequest<? extends R>>getOpenRequestsOfType(int citizenid, com.google.common.reflect.TypeToken<R> requestType) <R> com.google.common.collect.ImmutableList<IRequest<? extends R>>getOpenRequestsOfTypeFiltered(@NotNull ICitizenData citizenData, com.google.common.reflect.TypeToken<R> requestType, Predicate<IRequest<? extends R>> filter) Override this method if you want to keep an amount of items in inventory.com.google.common.collect.ImmutableCollection<IRequestResolver<?>>Method to get the resolvers that this provider provides.<T extends ISetting<S>,S>
TgetSetting(@NotNull ISettingKey<T> key) Get setting for key.<T extends ISetting<S>,S>
SgetSettingValueOrDefault(@NotNull ISettingKey<T> key, S def) Get setting value for key or some default.booleanhasCitizenCompletedRequests(@NotNull ICitizenData data) booleanhasCitizenCompletedRequestsToPickup(@NotNull ICitizenData data) booleanhasOpenSyncRequest(@NotNull ICitizenData citizen) Checks whether the citizen has an open sync request, preventing it from workingbooleanhasWorkerOpenRequests(int citizenid) booleanhasWorkerOpenRequestsFiltered(int citizenid, @NotNull Predicate<IRequest<?>> selectionPredicate) <R> booleanhasWorkerOpenRequestsOfType(int citizenid, com.google.common.reflect.TypeToken<R> requestType) booleanisBuilt()Check if the building was built already.booleanWhether this building has a guard building nearbybooleanisInBuilding(@NotNull net.minecraft.core.BlockPos pos) Check if a certain vec is within this building.booleanisItemStackInRequest(@Nullable net.minecraft.world.item.ItemStack stack) Check if a certain ItemStack is in the request of a worker.booleanisMatchingBlock(@NotNull net.minecraft.world.level.block.Block block) Checks if a block matches the current object.booleanChecks if this building have a work order.voidMarks the instance and the building dirty.voidmarkRequestAsAccepted(@NotNull ICitizenData data, @NotNull IToken<?> token) voidonCleanUp(ICitizenData citizen) Executed every time when citizen finish inventory cleanup called after citizen got paused.voidonColonyTick(IColony colony) On tick of the colony.voidvoidCalled when the building is placed in the world.default voidonPlayerEnterBuilding(net.minecraft.world.entity.player.Player player) Called when a player enters the building areadefault voidonPlayerEnterNearby(net.minecraft.world.entity.player.Player player) Called when a player comes close to the building.voidonRestart(ICitizenData citizen) Executed when RestartCitizenMessage is called and worker is paused.voidonUpgradeComplete(@Nullable com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, int newLevel) Called upon completion of an upgrade process.default voidonWakeUp()Executed when a new day start.booleanoverruleNextOpenRequestOfCitizenWithStack(@NotNull ICitizenData citizenData, @NotNull net.minecraft.world.item.ItemStack stack) voidoverruleNextOpenRequestWithStack(@NotNull net.minecraft.world.item.ItemStack stack) Overrule the next open request with a give stack.voidpickUp(net.minecraft.world.entity.player.Player player) Pickup the building including the level and put it in the players inv.voidprocessOfflineTime(long time) Process time the colony was offline.voidRemove the work order for the building.voidrequestRemoval(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos builder) Requests a removal for the current building.voidrequestRepair(net.minecraft.core.BlockPos builder) Requests a repair for the current building.voidrequestUpgrade(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos builder) Requests an upgrade for the current building.reservedStacksExcluding(@NotNull IRequest<? extends IDeliverable> request) Calculate the number of reserved stacks the resolver can't touch.voidRequests recalculation of whether this building has a guard building nearbyvoidserializeToView(@NotNull net.minecraft.network.FriendlyByteBuf buf, boolean fullSync) Serializes to view.voidsetBuildingType(BuildingEntry buildingType) Set the building typevoidsetCustomBuildingName(String name) Set the custom building name of the building.default voidsort(CombinedItemHandler inventoryHandler) Sort the inventory of this building using the given provider.voidUpgrades the buildings level to fit its schematic dataMethods inherited from interface com.minecolonies.api.colony.buildings.IBuildingContainer
addContainerPosition, alterPickUpPriority, deserializeNBT, getCapability, getContainers, getPickUpPriority, getTileEntity, registerBlockPosition, registerBlockPosition, removeContainerPosition, serializeNBT, setTileEntityMethods inherited from interface com.minecolonies.api.colony.modules.IBuildingModuleContainer
getModule, getModule, hasModule, registerModuleMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface com.minecolonies.api.colony.buildings.ICommonBuilding
getBuildingLevel, getBuildingLevelEquivalent, getBuildingType, getColony, getContainers, getPosition, getPrestigeMethods inherited from interface com.minecolonies.api.colony.modules.IModuleContainer
getClassType, getFirstModuleOccurance, getModule, getModule, getModule, getModuleMatching, getModules, getModules, getModules, getModules, getModulesByType, hasModule, hasModule, hasModuleMethods inherited from interface com.minecolonies.api.colony.requestsystem.requester.IRequester
getId, getLocation, getRequesterDisplayName, onRequestedRequestCancelled, onRequestedRequestCompleteMethods inherited from interface com.minecolonies.api.colony.requestsystem.resolver.IRequestResolverProvider
getIdMethods inherited from interface com.minecolonies.api.colony.buildings.ISchematicProvider
clearDirty, getBlueprintPath, getChildren, getCorners, getID, getMaxBuildingLevel, getParent, getRotation, getSchematicName, getStructurePack, hasParent, isDeconstructed, isDirty, isMirrored, onUpgradeSchematicTo, setBlueprintPath, setBuildingLevel, setCorners, setDeconstructed, setIsMirrored, setParent, setStructurePack
-
Field Details
-
WOOD_HUT_LEVEL
static final int WOOD_HUT_LEVELMinimal level to ask for wood tools. (WOOD_HUT_LEVEL + 1 == stone)- See Also:
-
-
Method Details
-
getCustomName
Getter for the custom name of a building.- Returns:
- the custom name.
-
getBuildingDisplayName
Getter for the display name of a building. Returns either the custom name (if any) or the schematic name.- Returns:
- the display name.
-
onWakeUp
default void onWakeUp()Executed when a new day start. -
onCleanUp
Executed every time when citizen finish inventory cleanup called after citizen got paused. Use for cleaning a state only.- Parameters:
citizen- cleanup for citizen.
-
onRestart
Executed when RestartCitizenMessage is called and worker is paused. Use for reseting, onCleanUp is called before this- Parameters:
citizen- the citizen assigned to the building.
-
onPlacement
void onPlacement()Called when the building is placed in the world. -
onPlayerEnterNearby
default void onPlayerEnterNearby(net.minecraft.world.entity.player.Player player) Called when a player comes close to the building.- Parameters:
player- entering player
-
onPlayerEnterBuilding
default void onPlayerEnterBuilding(net.minecraft.world.entity.player.Player player) Called when a player enters the building area- Parameters:
player- entering player
-
isMatchingBlock
boolean isMatchingBlock(@NotNull @NotNull net.minecraft.world.level.block.Block block) Checks if a block matches the current object.- Parameters:
block- Block you want to know whether it matches this class or not.- Returns:
- True if the block matches this class, otherwise false.
-
destroy
void destroy()Destroys the block. CallsonDestroyed(). -
onDestroyed
void onDestroyed() -
canBeBuiltByBuilder
boolean canBeBuiltByBuilder(int newLevel) Method to define if a builder can build this although the builder is not level 1 yet.- Parameters:
newLevel- the new level of the building.- Returns:
- true if so.
-
markDirty
void markDirty()Description copied from interface:ISchematicProviderMarks the instance and the building dirty.- Specified by:
markDirtyin interfaceISchematicProvider
-
isPendingConstruction
boolean isPendingConstruction()Checks if this building have a work order.- Returns:
- true if the building is building, upgrading or repairing.
-
removeWorkOrder
void removeWorkOrder()Remove the work order for the building.Remove either the upgrade or repair work order
-
getClaimRadius
int getClaimRadius(int buildingLevel) Method to calculate the radius to be claimed by this building depending on the level.- Parameters:
buildingLevel- the building level.- Returns:
- the radius.
-
serializeToView
void serializeToView(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf, boolean fullSync) Serializes to view.- Parameters:
buf- FriendlyByteBuf to write to.fullSync- Whether it's a full sync
-
setCustomBuildingName
Set the custom building name of the building.- Parameters:
name- the name to set.
-
canBeGathered
boolean canBeGathered()Check if the building should be gathered by the dman.- Returns:
- true if so.
-
requestUpgrade
void requestUpgrade(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos builder) Requests an upgrade for the current building.- Parameters:
player- the requesting player.builder- the assigned builder.
-
requestRemoval
void requestRemoval(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos builder) Requests a removal for the current building.- Parameters:
player- the requesting player.builder- the assigned builder.
-
requestRepair
void requestRepair(net.minecraft.core.BlockPos builder) Requests a repair for the current building.- Parameters:
builder- the assigned builder.
-
isBuilt
boolean isBuilt()Check if the building was built already.- Returns:
- true if so.
-
deconstruct
void deconstruct()Deconstruct the building on destroyed. -
onUpgradeComplete
void onUpgradeComplete(@Nullable @Nullable com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, int newLevel) Called upon completion of an upgrade process. We suppress this warning since this parameter will be used in child classes which override this method.- Parameters:
newLevel- The new level.
-
isGuardBuildingNear
boolean isGuardBuildingNear()Whether this building has a guard building nearby- Returns:
- true/false
-
resetGuardBuildingNear
void resetGuardBuildingNear()Requests recalculation of whether this building has a guard building nearby -
buildingRequiresCertainAmountOfItem
int buildingRequiresCertainAmountOfItem(net.minecraft.world.item.ItemStack stack, List<ItemStorage> localAlreadyKept, boolean inventory, @Nullable @Nullable JobEntry jobEntry) Check if the worker requires a certain amount of that item and the alreadykept list contains it. Always leave one stack behind if the worker requires a certain amount of it. Just to be sure.- Parameters:
stack- the stack to check it with.localAlreadyKept- already kept items.inventory- if it should be in the inventory or in the building.jobEntry- the job entry trying to dump.- Returns:
- the amount which can get dumped or 0 if not.
-
buildingRequiresCertainAmountOfItem
default int buildingRequiresCertainAmountOfItem(net.minecraft.world.item.ItemStack stack, List<ItemStorage> localAlreadyKept, boolean inventory) Check if the building requires a certain amount of that item and the alreadykept list contains it. Always leave one stack behind if the worker requires a certain amount of it. Just to be sure.- Parameters:
stack- the stack to check it with.localAlreadyKept- already kept items.inventory- if it should be in the inventory or in the building.- Returns:
- the amount which can get dumped or 0 if not.
-
getRequiredItemsAndAmount
Map<Predicate<net.minecraft.world.item.ItemStack>,net.minecraft.util.Tuple<Integer, getRequiredItemsAndAmount()Boolean>> Override this method if you want to keep an amount of items in inventory. When the inventory is full, everything get's dumped into the building chest. But you can use this method to hold some stacks back.- Returns:
- a list of objects which should be kept.
-
forceTransferStack
@Nullable @Nullable net.minecraft.world.item.ItemStack forceTransferStack(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world) Try to transfer a stack to one of the inventories of the building and force the transfer.- Parameters:
stack- the stack to transfer.world- the world to do it in.- Returns:
- the itemStack which has been replaced or the itemStack which could not be transfered
-
createRequest
<R extends IRequestable> IToken<?> createRequest(@NotNull @NotNull ICitizenData citizenData, @NotNull R requested, boolean async) Create a request for a citizen.- Type Parameters:
R- the type of the request.- Parameters:
citizenData- the data of the citizen.requested- the request to create.async- if async or not.- Returns:
- the Token of the request.
-
createRequest
Create a request for the building.- Type Parameters:
R- the type of the request.- Parameters:
requested- the request to create.async- if async or not.- Returns:
- the Token of the request.
-
hasWorkerOpenRequests
boolean hasWorkerOpenRequests(int citizenid) -
getOpenRequests
-
hasWorkerOpenRequestsFiltered
-
hasOpenSyncRequest
Checks whether the citizen has an open sync request, preventing it from working- Parameters:
citizen- citizen data to check- Returns:
- true if an open non async request exists
-
hasWorkerOpenRequestsOfType
<R> boolean hasWorkerOpenRequestsOfType(int citizenid, com.google.common.reflect.TypeToken<R> requestType) -
getOpenRequestsOfType
<R> com.google.common.collect.ImmutableList<IRequest<? extends R>> getOpenRequestsOfType(int citizenid, com.google.common.reflect.TypeToken<R> requestType) -
hasCitizenCompletedRequests
-
hasCitizenCompletedRequestsToPickup
-
getCompletedRequestsOfCitizenOrBuilding
Collection<IRequest<?>> getCompletedRequestsOfCitizenOrBuilding(@Nullable @Nullable ICitizenData data) Get completed requests for citizen or building (citizen independent, so if data is null)- Parameters:
data- the citizen data (or null).- Returns:
- a collection of request.
-
getCompletedRequestsOfType
<R> com.google.common.collect.ImmutableList<IRequest<? extends R>> getCompletedRequestsOfType(@NotNull @NotNull ICitizenData citizenData, com.google.common.reflect.TypeToken<R> requestType) -
getCompletedRequestsOfTypeFiltered
<R> com.google.common.collect.ImmutableList<IRequest<? extends R>> getCompletedRequestsOfTypeFiltered(@NotNull @NotNull ICitizenData citizenData, com.google.common.reflect.TypeToken<R> requestType, Predicate<IRequest<? extends R>> filter) -
markRequestAsAccepted
-
cancelAllRequestsOfCitizenOrBuilding
Cancel all requests of citizen or building (if citizen data is null)- Parameters:
data- the citizen data (or null).
-
overruleNextOpenRequestWithStack
void overruleNextOpenRequestWithStack(@NotNull @NotNull net.minecraft.world.item.ItemStack stack) Overrule the next open request with a give stack.We squid:s135 which takes care that there are not too many continue statements in a loop since it makes sense here out of performance reasons.
- Parameters:
stack- the stack.
-
getOpenRequestsOfTypeFiltered
<R> com.google.common.collect.ImmutableList<IRequest<? extends R>> getOpenRequestsOfTypeFiltered(@NotNull @NotNull ICitizenData citizenData, com.google.common.reflect.TypeToken<R> requestType, Predicate<IRequest<? extends R>> filter) -
overruleNextOpenRequestOfCitizenWithStack
boolean overruleNextOpenRequestOfCitizenWithStack(@NotNull @NotNull ICitizenData citizenData, @NotNull @NotNull net.minecraft.world.item.ItemStack stack) -
createPickupRequest
boolean createPickupRequest(int qty, boolean force) Creates a pickup request for the building. It will make sure that only one pickup request exists per building, so it's safe to call multiple times. The call will return false if a pickup request already exists, or if the priority is not within the proper range, or if the pickup priority is set to NEVER (0).- Parameters:
qty- the qty of items to be picked up.force- if the pickup should be forced.- Returns:
- true if a pickup request could be created, false if not.
-
getResolvers
com.google.common.collect.ImmutableCollection<IRequestResolver<?>> getResolvers()Description copied from interface:IRequestResolverProviderMethod to get the resolvers that this provider provides.- Specified by:
getResolversin interfaceIRequestResolverProvider- Returns:
- a list of resolvers.
-
createResolvers
com.google.common.collect.ImmutableCollection<IRequestResolver<?>> createResolvers() -
getRequester
IRequester getRequester() -
getCitizenForRequest
-
reservedStacksExcluding
Map<ItemStorage,Integer> reservedStacksExcluding(@NotNull @NotNull IRequest<? extends IDeliverable> request) Calculate the number of reserved stacks the resolver can't touch.- Parameters:
request- ignore reservations that would exist for the current request.- Returns:
- a list of itemstorages.
-
processOfflineTime
void processOfflineTime(long time) Process time the colony was offline.- Parameters:
time- the time in seconds.
-
calculateCorners
void calculateCorners()Calculate all building corners from the schematic data. -
isInBuilding
boolean isInBuilding(@NotNull @NotNull net.minecraft.core.BlockPos pos) Check if a certain vec is within this building.- Parameters:
pos- the pos to check.- Returns:
- true if so.
-
upgradeBuildingLevelToSchematicData
void upgradeBuildingLevelToSchematicData()Upgrades the buildings level to fit its schematic data -
getOpenRequestsByRequestableType
Map<com.google.common.reflect.TypeToken<?>,Collection<IToken<?>>> getOpenRequestsByRequestableType()Get a map of all open requests by type.- Returns:
- the map.
-
pickUp
void pickUp(net.minecraft.world.entity.player.Player player) Pickup the building including the level and put it in the players inv.- Parameters:
player- the player picking it up.
-
setBuildingType
Set the building type- Parameters:
buildingType-
-
onColonyTick
On tick of the colony. -
isItemStackInRequest
boolean isItemStackInRequest(@Nullable @Nullable net.minecraft.world.item.ItemStack stack) Check if a certain ItemStack is in the request of a worker.- Parameters:
stack- the stack to chest.- Returns:
- true if so.
-
getMaxEquipmentLevel
default int getMaxEquipmentLevel()Get the max equipment level useable by the worker.- Returns:
- the integer.
-
canAssignCitizens
default boolean canAssignCitizens()Check if this building is sufficiently built to be able to assign workers.- Returns:
- true if so.
-
getAllAssignedCitizen
Set<ICitizenData> getAllAssignedCitizen()Get the set of all assigned citizens in the colony.- Returns:
- the list
-
getHandlers
List<net.minecraftforge.items.IItemHandler> getHandlers()Get all handlers associated with this building.- Returns:
- the handlers of the building + citizen.
-
getSetting
Get setting for key. Utility function.- Type Parameters:
T- the key type.- Parameters:
key- the key.- Returns:
- the setting.
-
getSettingValueOrDefault
<T extends ISetting<S>,S> S getSettingValueOrDefault(@NotNull @NotNull ISettingKey<T> key, @NotNull S def) Get setting value for key or some default. Utility function.- Type Parameters:
T- the key type.- Parameters:
key- the key.def- the default.- Returns:
- the setting.
-
canEat
default boolean canEat(net.minecraft.world.item.ItemStack stack) Check if the assigned citizens are allowed to eat the following stack.- Parameters:
stack- the stack to test.- Returns:
- true if so.
-
getLocationsFromTag
@NotNull @NotNull List<net.minecraft.core.BlockPos> getLocationsFromTag(@NotNull @NotNull String tagName) Gets the list of tags, and finds all locations registered there.- Parameters:
tagName- the name of the tag to query- Returns:
- all the matching BlockPos, or an empty list if not found
-
canSort
default boolean canSort()Checks if the building can be sorted.- Returns:
- true if the building can be sorted, false otherwise.
-
sort
Sort the inventory of this building using the given provider. The implementation of this method is usually a call toSortingUtils.sort(CombinedItemHandler).- Parameters:
inventoryHandler- the inventory handler to sort.
-
calculatePrestige
void calculatePrestige(com.ldtteam.structurize.blueprints.v1.Blueprint blueprint) Recalculate prestige for building.- Parameters:
blueprint- the blueprint as a basis.
-
asyncPrestigeRecalc
void asyncPrestigeRecalc()Trigger for async prestige recalculation.
-