Class BuildingNetherWorker
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.BuildingNetherWorker
- 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>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ISettingKey<BoolSetting>Settingsstatic final StringExclusion list id.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
cachedRotation, colonyFields inherited from interface com.minecolonies.api.colony.buildings.IBuilding
WOOD_HUT_LEVEL -
Constructor Summary
ConstructorsConstructorDescriptionBuildingNetherWorker(@NotNull IColony colony, net.minecraft.core.BlockPos pos) -
Method Summary
Modifier and TypeMethodDescriptionintbuildingRequiresCertainAmountOfItem(net.minecraft.world.item.ItemStack stack, List<ItemStorage> localAlreadyKept, boolean inventory, JobEntry jobEntry) Check if the worker requires a certain amount of that item and the alreadykept list contains it.voiddeserializeNBT(net.minecraft.nbt.CompoundTag compound) intChildren must return their max building level.static intGet the max per period, potentially modified by researchstatic intGet how many days are in a period, potentially modified by research.net.minecraft.core.BlockPosGet the tagged location that the worker should walk to in the portal.@NotNull StringChildren must return the name of their structure.booleanCheck to see if it's valid to do a trip by checking how many done in this current periodvoidOn setting down the building.voidonWakeUp()Executed when a new day start.voidLet the building know we're doing a tripnet.minecraft.nbt.CompoundTagbooleanShould the portal be closed on return?Methods inherited from class com.minecolonies.core.colony.buildings.AbstractBuilding
calculateCorners, calculatePrestige, canBeBuiltByBuilder, canBeGathered, cancelAllRequestsOfCitizenOrBuilding, canDeconstruct, clearDirty, createPickupRequest, createRequest, createRequest, createResolvers, deconstruct, 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, onPlayerEnterBuilding, onPlayerEnterNearby, onRequestedRequestCancelled, onRequestedRequestComplete, onRestart, onUpgradeComplete, overruleNextOpenRequestOfCitizenWithStack, overruleNextOpenRequestWithStack, pickUp, processOfflineTime, registerBlockPosition, registerModule, removeWorkOrder, requestRemoval, requestRepair, requestUpgrade, requestWorkOrder, reservedStacksExcluding, resetGuardBuildingNear, serializeToView, 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
-
CLOSE_PORTAL
Settings -
FOOD_EXCLUSION_LIST
Exclusion list id.- See Also:
-
-
Constructor Details
-
BuildingNetherWorker
-
-
Method Details
-
getSchematicName
Description copied from interface:ISchematicProviderChildren must return the name of their structure.- 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.
-
shallClosePortalOnReturn
public boolean shallClosePortalOnReturn()Should the portal be closed on return? -
onWakeUp
public void onWakeUp()Description copied from class:AbstractBuildingExecuted when a new day start.- Specified by:
onWakeUpin interfaceIBuilding- Overrides:
onWakeUpin classAbstractBuilding
-
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 classAbstractBuilding
-
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 classAbstractBuilding
-
buildingRequiresCertainAmountOfItem
public int buildingRequiresCertainAmountOfItem(net.minecraft.world.item.ItemStack stack, List<ItemStorage> localAlreadyKept, boolean inventory, JobEntry jobEntry) Description copied from interface:IBuildingCheck 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.- Specified by:
buildingRequiresCertainAmountOfItemin interfaceIBuilding- Overrides:
buildingRequiresCertainAmountOfItemin classAbstractBuilding- 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.
-
isReadyForTrip
public boolean isReadyForTrip()Check to see if it's valid to do a trip by checking how many done in this current period- Returns:
- true if the worker can go to the nether
-
recordTrip
public void recordTrip()Let the building know we're doing a trip -
getPortalLocation
public net.minecraft.core.BlockPos getPortalLocation()Get the tagged location that the worker should walk to in the portal. This should be a 'air block' in the portal that can directly be checked to see if the portal is open- Returns:
- the block above the tag, null if not available
-
getMaxPerPeriod
public static int getMaxPerPeriod()Get the max per period, potentially modified by research- Returns:
-
getPeriodDays
public static int getPeriodDays()Get how many days are in a period, potentially modified by research.- Returns:
-
onPlacement
public void onPlacement()Description copied from class:AbstractBuildingOn setting down the building.- Specified by:
onPlacementin interfaceIBuilding- Overrides:
onPlacementin classAbstractBuilding
-