Class BuildingGateHouse
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.AbstractBuildingGuards
com.minecolonies.core.colony.buildings.workerbuildings.BuildingGateHouse
- All Implemented Interfaces:
IBuilding,IBuildingContainer,ICommonBuilding,IGuardBuilding,ISchematicProvider,IBuildingModuleContainer,IModuleContainer<IBuildingModule>,IRequester,IRequestResolverProvider,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Gate house building.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe client view for the bakery building. -
Field Summary
Fields inherited from class com.minecolonies.core.colony.buildings.AbstractBuildingGuards
BASE_VISION_RANGE, BONUS_HEALTH_PER_LEVEL, FOLLOW_MODE, GUARD_TASK, HIRE_TRAINEE, HOSTILE_LIST, PATROL_MODE, patrolTargets, RETREAT, tempNextPatrolPoint, VISION_RANGE_PER_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_LEVELFields inherited from interface com.minecolonies.api.colony.buildings.IGuardBuilding
PATROL_DISTANCE -
Constructor Summary
ConstructorsConstructorDescriptionBuildingGateHouse(@NotNull IColony c, net.minecraft.core.BlockPos l) The abstract constructor of the building. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys the block.intBonus guard hp per bulding levelintGet the Vision bonus range for the building levelintGet the current level of the building.intGet the equivalent building level for equipment, etc.intgetClaimRadius(int newLevel) Method to calculate the radius to be claimed by this building depending on the level.net.minecraft.core.BlockPosgetGuardPos(@NotNull AbstractEntityCitizen worker) Get the position the guard should guard.intChildren must return their max building level.intGet the max equipment level useable by the worker.@NotNull StringChildren must return the name of their structure.getTask()Get the guard's task.voidvoidonUpgradeComplete(@Nullable com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, int newLevel) We use this to set possible health multipliers and give achievements.booleanIf we have to calculate a new target manually.voidsetBuildingLevel(int level) Sets the current level of the building.Methods inherited from class com.minecolonies.core.colony.buildings.AbstractBuildingGuards
addPatrolTarget, arrivedAtPatrolPoint, calculateMobs, deserializeNBT, getMinePos, getNextPatrolTarget, getPatrolDistance, getPlayerToFollowOrRally, getPositionToFollow, getRallyLocation, getRandomPatrolTarget, isTightGrouping, onColonyTick, resetPatrolTargets, serializeNBT, serializeToView, setGuardPos, setMinePos, setPatrolTimer, setPlayerToFollow, setRallyLocation, setTempNextPatrolPoint, shallPatrolManually, shallRetrieveOnLowHealth, startPatrolNextMethods inherited from class com.minecolonies.core.colony.buildings.AbstractBuilding
buildingRequiresCertainAmountOfItem, calculateCorners, calculatePrestige, canBeBuiltByBuilder, canBeGathered, cancelAllRequestsOfCitizenOrBuilding, canDeconstruct, clearDirty, createPickupRequest, createRequest, createRequest, createResolvers, deconstruct, forceTransferStack, getAllAssignedCitizen, getBuildingDisplayName, getCitizenForRequest, 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, onPlacement, onPlayerEnterBuilding, onPlayerEnterNearby, onRequestedRequestCancelled, onRequestedRequestComplete, onRestart, 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, getBuildingType, getChildren, getColony, getCorners, getID, getParent, getPosition, getRotation, getStructurePack, hashCode, hasParent, isDeconstructed, isInBuilding, isMirrored, onUpgradeSchematicTo, safeUpdateTEDataFromSchematic, setBlueprintPath, 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
asyncPrestigeRecalc, buildingRequiresCertainAmountOfItem, buildingRequiresCertainAmountOfItem, calculateCorners, calculatePrestige, canAssignCitizens, canBeBuiltByBuilder, canBeGathered, cancelAllRequestsOfCitizenOrBuilding, canEat, canSort, createPickupRequest, createRequest, createRequest, createResolvers, deconstruct, forceTransferStack, getAllAssignedCitizen, getBuildingDisplayName, getCitizenForRequest, getCompletedRequestsOfCitizenOrBuilding, getCompletedRequestsOfType, getCompletedRequestsOfTypeFiltered, getCustomName, getHandlers, getLocationsFromTag, getOpenRequests, getOpenRequestsByRequestableType, getOpenRequestsOfType, getOpenRequestsOfTypeFiltered, getRequester, getRequiredItemsAndAmount, getResolvers, getSetting, getSettingValueOrDefault, hasCitizenCompletedRequests, hasCitizenCompletedRequestsToPickup, hasOpenSyncRequest, hasWorkerOpenRequests, hasWorkerOpenRequestsFiltered, hasWorkerOpenRequestsOfType, isBuilt, isGuardBuildingNear, isInBuilding, isItemStackInRequest, isMatchingBlock, isPendingConstruction, markDirty, markRequestAsAccepted, onCleanUp, onPlacement, onPlayerEnterBuilding, onPlayerEnterNearby, onRestart, onWakeUp, overruleNextOpenRequestOfCitizenWithStack, overruleNextOpenRequestWithStack, pickUp, processOfflineTime, removeWorkOrder, requestRemoval, requestRepair, requestUpgrade, reservedStacksExcluding, resetGuardBuildingNear, setBuildingType, setCustomBuildingName, sort, upgradeBuildingLevelToSchematicDataMethods inherited from interface com.minecolonies.api.colony.buildings.IBuildingContainer
addContainerPosition, alterPickUpPriority, getCapability, getContainers, getPickUpPriority, getTileEntity, registerBlockPosition, registerBlockPosition, removeContainerPosition, 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
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, getParent, getRotation, getStructurePack, hasParent, isDeconstructed, isDirty, isMirrored, onUpgradeSchematicTo, setBlueprintPath, setCorners, setDeconstructed, setIsMirrored, setParent, setStructurePack
-
Constructor Details
-
BuildingGateHouse
The abstract constructor of the building.- Parameters:
c- the colonyl- the position
-
-
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.
-
getMaxEquipmentLevel
public int getMaxEquipmentLevel()Description copied from interface:IBuildingGet the max equipment level useable by the worker.- Returns:
- the integer.
-
getClaimRadius
public int getClaimRadius(int newLevel) Description copied from class:AbstractBuildingMethod to calculate the radius to be claimed by this building depending on the level.- Specified by:
getClaimRadiusin interfaceIBuilding- Overrides:
getClaimRadiusin classAbstractBuilding- Parameters:
newLevel- the new level of the building.- Returns:
- the radius.
-
getBonusVision
public int getBonusVision()Description copied from class:AbstractBuildingGuardsGet the Vision bonus range for the building level- Specified by:
getBonusVisionin interfaceIGuardBuilding- Overrides:
getBonusVisionin classAbstractBuildingGuards- Returns:
- an integer for the additional range.
-
getBonusHealth
public int getBonusHealth()Description copied from class:AbstractBuildingGuardsBonus guard hp per bulding level- Overrides:
getBonusHealthin classAbstractBuildingGuards- Returns:
- the bonus health.
-
getBuildingLevelEquivalent
public int getBuildingLevelEquivalent()Description copied from interface:ICommonBuildingGet the equivalent building level for equipment, etc. Normally it's just the building level, but for buildings with fewer levels it can be 1,3,5 for example.- Returns:
- the adjusted 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.
-
getGuardPos
Description copied from interface:IGuardBuildingGet the position the guard should guard.- Specified by:
getGuardPosin interfaceIGuardBuilding- Overrides:
getGuardPosin classAbstractBuildingGuards- Returns:
- the
BlockPosof the guard position.
-
getTask
Description copied from interface:IGuardBuildingGet the guard's task.- Specified by:
getTaskin interfaceIGuardBuilding- Overrides:
getTaskin classAbstractBuildingGuards- Returns:
- The task of the guard.
-
onDestroyed
public void onDestroyed()- Specified by:
onDestroyedin interfaceIBuilding- Overrides:
onDestroyedin classAbstractBuilding
-
onUpgradeComplete
public void onUpgradeComplete(@Nullable @Nullable com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, int newLevel) Description copied from class:AbstractBuildingGuardsWe use this to set possible health multipliers and give achievements.- Specified by:
onUpgradeCompletein interfaceIBuilding- Overrides:
onUpgradeCompletein classAbstractBuildingGuardsnewLevel- The new level.
-
requiresManualTarget
public boolean requiresManualTarget()Description copied from interface:IGuardBuildingIf we have to calculate a new target manually.- Specified by:
requiresManualTargetin interfaceIGuardBuilding- Overrides:
requiresManualTargetin classAbstractBuildingGuards- Returns:
- true if so.
-
setBuildingLevel
public void setBuildingLevel(int level) Description copied from interface:ISchematicProviderSets the current level of the building.- Specified by:
setBuildingLevelin interfaceISchematicProvider- Overrides:
setBuildingLevelin classAbstractSchematicProvider- Parameters:
level- Level of the building.
-
destroy
public void destroy()Description copied from class:AbstractBuildingDestroys the block. CallsAbstractBuilding.onDestroyed().- Specified by:
destroyin interfaceIBuilding- Overrides:
destroyin classAbstractBuilding
-