Class BuildingBarracksTower
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.BuildingBarracksTower
- 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>
Building class for the Barracks Tower.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.minecolonies.core.colony.buildings.AbstractBuildingGuards
AbstractBuildingGuards.View -
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
ConstructorsConstructorDescriptionBuildingBarracksTower(@NotNull IColony c, net.minecraft.core.BlockPos l) The abstract constructor of the building. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBarracks(net.minecraft.core.BlockPos pos) Adds the position of the main barracks.booleanCheck if this particular building can be deconstructed.voiddeserializeNBT(net.minecraft.nbt.CompoundTag compound) intgetClaimRadius(int newLevel) Method to calculate the radius to be claimed by this building depending on the level.intChildren must return their max building level.@NotNull StringChildren must return the name of their structure.voidonUpgradeComplete(@Nullable com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, int newLevel) We use this to set possible health multipliers and give achievements.voidrequestUpgrade(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos builder) Requests an upgrade for the current building.net.minecraft.nbt.CompoundTagMethods inherited from class com.minecolonies.core.colony.buildings.AbstractBuildingGuards
addPatrolTarget, arrivedAtPatrolPoint, calculateMobs, getBonusHealth, getBonusVision, getGuardPos, getMinePos, getNextPatrolTarget, getPatrolDistance, getPlayerToFollowOrRally, getPositionToFollow, getRallyLocation, getRandomPatrolTarget, getTask, isTightGrouping, onColonyTick, requiresManualTarget, resetPatrolTargets, 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, clearDirty, createPickupRequest, createRequest, createRequest, createResolvers, deconstruct, destroy, 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, onDestroyed, onPlacement, onPlayerEnterBuilding, onPlayerEnterNearby, onRequestedRequestCancelled, onRequestedRequestComplete, onRestart, onWakeUp, overruleNextOpenRequestOfCitizenWithStack, overruleNextOpenRequestWithStack, pickUp, processOfflineTime, registerBlockPosition, registerModule, removeWorkOrder, requestRemoval, requestRepair, 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
asyncPrestigeRecalc, buildingRequiresCertainAmountOfItem, buildingRequiresCertainAmountOfItem, calculateCorners, calculatePrestige, canAssignCitizens, canBeBuiltByBuilder, canBeGathered, cancelAllRequestsOfCitizenOrBuilding, canEat, canSort, createPickupRequest, createRequest, createRequest, createResolvers, deconstruct, destroy, forceTransferStack, getAllAssignedCitizen, getBuildingDisplayName, getCitizenForRequest, getCompletedRequestsOfCitizenOrBuilding, getCompletedRequestsOfType, getCompletedRequestsOfTypeFiltered, getCustomName, getHandlers, getLocationsFromTag, getMaxEquipmentLevel, getOpenRequests, getOpenRequestsByRequestableType, getOpenRequestsOfType, getOpenRequestsOfTypeFiltered, getRequester, getRequiredItemsAndAmount, getResolvers, getSetting, getSettingValueOrDefault, hasCitizenCompletedRequests, hasCitizenCompletedRequestsToPickup, hasOpenSyncRequest, hasWorkerOpenRequests, hasWorkerOpenRequestsFiltered, hasWorkerOpenRequestsOfType, isBuilt, isGuardBuildingNear, isInBuilding, isItemStackInRequest, isMatchingBlock, isPendingConstruction, markDirty, markRequestAsAccepted, onCleanUp, onDestroyed, onPlacement, onPlayerEnterBuilding, onPlayerEnterNearby, onRestart, onWakeUp, overruleNextOpenRequestOfCitizenWithStack, overruleNextOpenRequestWithStack, pickUp, processOfflineTime, removeWorkOrder, requestRemoval, requestRepair, 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
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, getParent, getRotation, getStructurePack, hasParent, isDeconstructed, isDirty, isMirrored, onUpgradeSchematicTo, setBlueprintPath, setBuildingLevel, setCorners, setDeconstructed, setIsMirrored, setParent, setStructurePack
-
Constructor Details
-
BuildingBarracksTower
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.
-
requestUpgrade
public void requestUpgrade(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos builder) Description copied from class:AbstractBuildingRequests an upgrade for the current building.- Specified by:
requestUpgradein interfaceIBuilding- Overrides:
requestUpgradein classAbstractBuilding- Parameters:
player- the requesting player.builder- the assigned builder.
-
canDeconstruct
public boolean canDeconstruct()Description copied from class:AbstractBuildingCheck if this particular building can be deconstructed.- Overrides:
canDeconstructin classAbstractBuilding- Returns:
- true if so.
-
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.
-
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.
-
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 classAbstractBuildingGuards
-
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 classAbstractBuildingGuards
-
addBarracks
public void addBarracks(net.minecraft.core.BlockPos pos) Adds the position of the main barracks.- Parameters:
pos- the BlockPos.
-