Class BuildingMiner
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.AbstractBuildingStructureBuilder
com.minecolonies.core.colony.buildings.workerbuildings.BuildingMiner
- All Implemented Interfaces:
IBuilding,IBuildingContainer,ICommonBuilding,ISchematicProvider,IBuildingModuleContainer,IModuleContainer<IBuildingModule>,IRequester,IRequestResolverProvider,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
The miners building.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ISettingKey<BlockSetting>Setting for solid filling block.static final ISettingKey<IntSetting>Max depth the miner is going for.Fields inherited from class com.minecolonies.core.colony.buildings.AbstractBuildingStructureBuilder
MAX_BUILDING_LEVELFields 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
cachedRotation, colonyFields inherited from interface com.minecolonies.api.colony.buildings.IBuilding
WOOD_HUT_LEVEL -
Constructor Summary
ConstructorsConstructorDescriptionBuildingMiner(IColony c, net.minecraft.core.BlockPos l) Required constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserializeNBT(net.minecraft.nbt.CompoundTag compound) net.minecraft.core.BlockPosGetter of the cobbleLocation.intgetDepthLimit(net.minecraft.world.level.Level level) Returns the depth limit.net.minecraft.core.BlockPosGetter of the ladderLocation.intGetter of the max building level.intThe Miner wants to get multiple nodes/levels worth of stuff when requesting.@NotNull StringGetter of the structure name.static voidinitStructure(MineNode mineNode, int rotateTimes, net.minecraft.core.BlockPos structurePos, BuildingMiner buildingMiner, net.minecraft.world.level.Level world, JobMiner job) Initiates structure loading.intnormalizeMaxDepth(int max, net.minecraft.world.level.Level level) Normalize the maximum depth.net.minecraft.nbt.CompoundTagMethods inherited from class com.minecolonies.core.colony.buildings.AbstractBuildingStructureBuilder
addNeededResource, buildingRequiresCertainAmountOfItem, checkOrRequestBucket, complete, forceTransferStack, getFluidsToRemove, getNeededResources, getNextBucket, getProgress, getRequiredItemsAndAmount, getRequiredResources, getWorkOrder, hasResourceInBucket, hasWorkOrder, nextStage, onWorkOrderCancellation, reduceNeededResource, requiresResourceForBuilding, resetNeededResources, serializeToView, setProgressPos, setTotalStages, setWorkOrder, setWorkOrderIdMethods inherited from class com.minecolonies.core.colony.buildings.AbstractBuilding
calculateCorners, calculatePrestige, canBeBuiltByBuilder, canBeGathered, cancelAllRequestsOfCitizenOrBuilding, canDeconstruct, clearDirty, createPickupRequest, createRequest, createRequest, createResolvers, deconstruct, destroy, 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, 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, onRequestedRequestCancelled, onRequestedRequestComplete, onRestart, onUpgradeComplete, onWakeUp, overruleNextOpenRequestOfCitizenWithStack, overruleNextOpenRequestWithStack, pickUp, processOfflineTime, registerBlockPosition, registerModule, removeWorkOrder, requestRemoval, requestRepair, requestUpgrade, requestWorkOrder, reservedStacksExcluding, resetGuardBuildingNear, setCustomBuildingName, setupRsDataStore, writeRequestSystemToNBTMethods inherited from class com.minecolonies.core.colony.buildings.AbstractBuildingContainer
addContainerPosition, alterPickUpPriority, getCapability, getContainers, getFirstLocationFromTag, getLocationsFromTag, getPickUpPriority, registerBlockPosition, removeContainerPosition, setTileEntityMethods inherited from class com.minecolonies.core.colony.buildings.AbstractSchematicProvider
asyncPrestigeRecalc, equals, getBlueprintPath, getBuildingLevel, getBuildingType, getChildren, getColony, getCorners, getID, getParent, getPosition, getRotation, getStructurePack, hashCode, hasParent, isDeconstructed, isInBuilding, isMirrored, onUpgradeSchematicTo, safeUpdateTEDataFromSchematic, setBlueprintPath, setBuildingLevel, setBuildingType, setCorners, setDeconstructed, setIsMirrored, setParent, 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, sortMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface com.minecolonies.api.colony.buildings.ICommonBuilding
getBuildingLevelEquivalentMethods 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, getCorners, getID, getParent, getRotation, getStructurePack, hasParent, isDeconstructed, isMirrored, onUpgradeSchematicTo, setBlueprintPath, setBuildingLevel, setCorners, setDeconstructed, setIsMirrored, setParent, setStructurePack
-
Field Details
-
FILL_BLOCK
Setting for solid filling block. -
MAX_DEPTH
Max depth the miner is going for.
-
-
Constructor Details
-
BuildingMiner
Required constructor.- Parameters:
c- colony containing the building.l- location of the building.
-
-
Method Details
-
getSchematicName
Getter of the structure name.- Returns:
- the structure name.
-
getMaxBuildingLevel
public int getMaxBuildingLevel()Getter of the max building level.- Specified by:
getMaxBuildingLevelin interfaceISchematicProvider- Overrides:
getMaxBuildingLevelin classAbstractBuildingStructureBuilder- Returns:
- the integer.
-
getResourceBatchMultiplier
public int getResourceBatchMultiplier()The Miner wants to get multiple nodes/levels worth of stuff when requesting.- Overrides:
getResourceBatchMultiplierin classAbstractBuildingStructureBuilder
-
deserializeNBT
public void deserializeNBT(net.minecraft.nbt.CompoundTag compound) - Specified by:
deserializeNBTin interfaceIBuildingContainer- Specified by:
deserializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>- Overrides:
deserializeNBTin classAbstractBuildingStructureBuilder
-
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT()- Specified by:
serializeNBTin interfaceIBuildingContainer- Specified by:
serializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>- Overrides:
serializeNBTin classAbstractBuildingStructureBuilder
-
getDepthLimit
public int getDepthLimit(net.minecraft.world.level.Level level) Returns the depth limit. Limitted by building level.- Level 1: 50 - Level 2: 20 - Level 3: 0
- Returns:
- Depth limit.
-
normalizeMaxDepth
public int normalizeMaxDepth(int max, net.minecraft.world.level.Level level) Normalize the maximum depth. Make sure that the returned depth respects the world limits and follows the building setting..- Parameters:
max- the max depth of the given building level.level- the world.- Returns:
- the max.
-
getLadderLocation
public net.minecraft.core.BlockPos getLadderLocation()Getter of the ladderLocation.- Returns:
- the ladder location.
-
getCobbleLocation
public net.minecraft.core.BlockPos getCobbleLocation()Getter of the cobbleLocation.- Returns:
- the location.
-
initStructure
public static void initStructure(MineNode mineNode, int rotateTimes, net.minecraft.core.BlockPos structurePos, BuildingMiner buildingMiner, net.minecraft.world.level.Level world, JobMiner job) Initiates structure loading.- Parameters:
mineNode- the node to load it for.rotateTimes- The amount of time to rotate the structure.structurePos- The position of the structure.
-