Class PostBox
java.lang.Object
com.minecolonies.core.colony.buildings.AbstractSchematicProvider
com.minecolonies.core.colony.buildings.AbstractBuildingContainer
com.minecolonies.core.colony.buildings.AbstractBuilding
com.minecolonies.core.colony.buildings.workerbuildings.PostBox
- All Implemented Interfaces:
IBuilding,IBuildingContainer,ICommonBuilding,IRSComponent,ISchematicProvider,IBuildingModuleContainer,IModuleContainer<IBuildingModule>,IRequester,IRequestResolverProvider,IItemHandlerCapProvider,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Class used to manage the postbox building block.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classView class for the custom minimum stock PostBox functionalitystatic classClientSide representation of the building. -
Field Summary
Fields inherited from class com.minecolonies.core.colony.buildings.AbstractBuilding
BREEDING, modules, modulesMap, USE_SHEARSFields inherited from class com.minecolonies.core.colony.buildings.AbstractBuildingContainer
containerList, keepX, tileEntityFields inherited from class com.minecolonies.core.colony.buildings.AbstractSchematicProvider
colonyFields inherited from interface com.minecolonies.api.colony.buildings.IBuilding
WOOD_HUT_LEVEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the building should be gathered by the dman.com.google.common.collect.ImmutableCollection<IRequestResolver<?>> intGet the current level of the building.net.minecraft.util.Tuple<net.minecraft.core.BlockPos, net.minecraft.core.BlockPos> Get all the corners of the building based on the schematic.intChildren must return their max building level.com.ldtteam.structurize.api.RotationMirror@NotNull StringChildren must return the name of their structure.voidonRequestedRequestCancelled(@NotNull IRequestManager manager, @NotNull IRequest<?> request) Method called by the request system to notify this requester that a request has been overruled.Methods inherited from class com.minecolonies.core.colony.buildings.AbstractBuilding
buildingRequiresCertainAmountOfItem, calculateCorners, calculatePrestige, canBeBuiltByBuilder, cancelAllRequestsOfCitizenOrBuilding, canDeconstruct, clearDirty, createPickupRequest, createRequest, createRequest, deconstruct, deserializeNBT, destroy, forceTransferStack, getAllAssignedCitizen, getBuildingDisplayName, getCitizenForRequest, getClaimRadius, getClassType, getCompletedRequestsOfCitizenOrBuilding, getCompletedRequestsOfCitizenOrBuilding, getCompletedRequestsOfType, getCompletedRequestsOfTypeFiltered, getCraftingModuleForRecipe, getCustomName, getHandlers, getId, getLocation, getModule, getModule, getModules, getOpenRequests, getOpenRequestsByCitizen, getOpenRequestsByRequestableType, getOpenRequestsOfCitizenOrBuilding, getOpenRequestsOfType, getOpenRequestsOfTypeFiltered, getPrestige, getRequester, getRequesterDisplayName, getRequiredItemsAndAmount, getResolvers, getSetting, getSettingValueOrDefault, getTileEntity, hasCitizenCompletedRequests, hasCitizenCompletedRequestsToPickup, hasModule, hasOpenSyncRequest, hasWorkerOpenRequests, hasWorkerOpenRequestsFiltered, hasWorkerOpenRequestsOfType, isBuilt, isDirty, isGuardBuildingNear, isItemStackInRequest, isMatchingBlock, isPendingConstruction, keepFood, markDirty, markRequestAsAccepted, moveToSyncCitizen, onCleanUp, onColonyTick, onDestroyed, onPlacement, onPlayerEnterBuilding, onPlayerEnterNearby, onRequestedRequestComplete, onRestart, onUpgradeComplete, onWakeUp, overruleNextOpenRequestOfCitizenWithStack, overruleNextOpenRequestWithStack, pickUp, processOfflineTime, registerBlockPosition, registerModule, removeWorkOrder, requestRemoval, requestRepair, requestUpgrade, requestWorkOrder, reservedStacksExcluding, resetGuardBuildingNear, serializeNBT, serializeToView, setCustomBuildingName, setupRsDataStore, writeRequestSystemToNBTMethods inherited from class com.minecolonies.core.colony.buildings.AbstractBuildingContainer
addContainerPosition, alterPickUpPriority, getContainers, getFirstLocationFromTag, getItemHandlerCap, getLocationsFromTag, getPickUpPriority, registerBlockPosition, removeContainerPosition, setTileEntityMethods inherited from class com.minecolonies.core.colony.buildings.AbstractSchematicProvider
asyncPrestigeRecalc, equals, getBlueprintPath, getBuildingType, getChildren, getColony, getID, getParent, getPosition, getStructurePack, hashCode, hasParent, isDeconstructed, isInBuilding, onUpgradeSchematicTo, safeUpdateTEDataFromSchematic, setBlueprintPath, setBuildingLevel, setBuildingType, setCorners, setDeconstructed, setParent, setRotationMirror, setStructurePack, upgradeBuildingLevelToSchematicDataMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.buildings.IBuilding
buildingRequiresCertainAmountOfItem, canAssignCitizens, canEat, canSort, getMaxEquipmentLevel, sort, writeToItemStackMethods inherited from interface com.minecolonies.api.colony.buildings.ICommonBuilding
getBuildingLevelEquivalentMethods inherited from interface com.minecolonies.api.util.IItemHandlerCapProvider
getItemHandlerCap, getItemHandlerCapMethods inherited from interface com.minecolonies.api.colony.modules.IModuleContainer
getFirstModuleOccurance, getModule, getModule, getModule, getModuleMatching, getModules, getModules, getModules, getModulesByType, hasModule, hasModule, hasModuleMethods inherited from interface com.minecolonies.api.colony.buildings.ISchematicProvider
getBlueprintPath, getChildren, getID, getParent, getStructurePack, hasParent, isDeconstructed, onUpgradeSchematicTo, setBlueprintPath, setBuildingLevel, setCorners, setDeconstructed, setParent, setRotationMirror, setStructurePack
-
Constructor Details
-
PostBox
Instantiates the building.- Parameters:
c- the colony.l- the location.
-
-
Method Details
-
createResolvers
- Specified by:
createResolversin interfaceIBuilding- Overrides:
createResolversin classAbstractBuilding
-
getSchematicName
Description copied from interface:ISchematicProviderChildren must return the name of their structure.- Specified by:
getSchematicNamein interfaceISchematicProvider- Returns:
- StructureProxy name.
-
getMaxBuildingLevel
public int getMaxBuildingLevel()Description copied from interface:ISchematicProviderChildren must return their max building level.- Specified by:
getMaxBuildingLevelin interfaceISchematicProvider- Overrides:
getMaxBuildingLevelin classAbstractBuilding- Returns:
- Max building level.
-
getBuildingLevel
public int getBuildingLevel()Description copied from interface:ICommonBuildingGet the current level of the building.- Specified by:
getBuildingLevelin interfaceICommonBuilding- Overrides:
getBuildingLevelin classAbstractSchematicProvider- Returns:
- AbstractBuilding current level.
-
canBeGathered
public boolean canBeGathered()Description copied from class:AbstractBuildingCheck if the building should be gathered by the dman.- Specified by:
canBeGatheredin interfaceIBuilding- Overrides:
canBeGatheredin classAbstractBuilding- Returns:
- true if so.
-
onRequestedRequestCancelled
public void onRequestedRequestCancelled(@NotNull @NotNull IRequestManager manager, @NotNull @NotNull IRequest<?> request) Description copied from interface:IRequesterMethod called by the request system to notify this requester that a request has been overruled.- Specified by:
onRequestedRequestCancelledin interfaceIRequester- Overrides:
onRequestedRequestCancelledin classAbstractBuilding- Parameters:
manager- the request manager.request- the request.
-
getCorners
public net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> getCorners()Description copied from interface:ISchematicProviderGet all the corners of the building based on the schematic. This is the lowest corner (x,y,z) and the highest corner (x,y,z).- Specified by:
getCornersin interfaceISchematicProvider- Overrides:
getCornersin classAbstractSchematicProvider- Returns:
- the corners.
-
getRotationMirror
public com.ldtteam.structurize.api.RotationMirror getRotationMirror()- Specified by:
getRotationMirrorin interfaceISchematicProvider- Overrides:
getRotationMirrorin classAbstractSchematicProvider- Returns:
- rotation and mirror of schematic
-