Class BuildingBeekeeper
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.BuildingBeekeeper
- All Implemented Interfaces:
IBuilding,IBuildingContainer,ICommonBuilding,ISchematicProvider,IBuildingModuleContainer,IModuleContainer<IBuildingModule>,IRequester,IRequestResolverProvider,IItemHandlerCapProvider,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Building of the beekeeper (apiary).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBee herding modulestatic classThe client side representation of the building. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final StringBoth setting options.static final ISettingKey<BeekeeperCollectionSetting> The beekeeper mode.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
ConstructorsConstructorDescriptionBuildingBeekeeper(@NotNull IColony c, net.minecraft.core.BlockPos l) The abstract constructor of the building. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHive(net.minecraft.core.BlockPos pos) Add a hive/nest position to this beekeperbooleancanEat(net.minecraft.world.item.ItemStack stack) Check if the assigned citizens are allowed to eat the following stack.voiddeserializeNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound) Get what materials the beekeeper should harvest.Set<net.minecraft.core.BlockPos> getHives()Get the hives/nests positions that belong to this beekeperintChildren must return their max building level.intGet the maximum amount of hives that can belong to this beekeeper@NotNull StringChildren must return the name of their structure.voidremoveHive(net.minecraft.core.BlockPos pos) Remove a hive/nest position from this beekepernet.minecraft.nbt.CompoundTagserializeNBT(net.minecraft.core.HolderLookup.Provider provider) voidserializeToView(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buf, boolean fullSync) Serializes to view.Methods inherited from class com.minecolonies.core.colony.buildings.AbstractBuilding
buildingRequiresCertainAmountOfItem, 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, 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, getContainers, getFirstLocationFromTag, getItemHandlerCap, 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, getRotationMirror, 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, 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, getCorners, getID, getParent, getRotationMirror, getStructurePack, hasParent, isDeconstructed, onUpgradeSchematicTo, setBlueprintPath, setBuildingLevel, setCorners, setDeconstructed, setParent, setRotationMirror, setStructurePack
-
Field Details
-
MODE
The beekeeper mode. -
HONEYCOMB
Both setting options.- See Also:
-
HONEY
- See Also:
-
BOTH
- See Also:
-
-
Constructor Details
-
BuildingBeekeeper
The abstract constructor of the building.- Parameters:
c- the colonyl- the position
-
-
Method Details
-
getSchematicName
Children must return the name of their structure.- Returns:
- StructureProxy name.
-
getMaxBuildingLevel
public int getMaxBuildingLevel()Children must return their max building level.- Specified by:
getMaxBuildingLevelin interfaceISchematicProvider- Overrides:
getMaxBuildingLevelin classAbstractBuilding- Returns:
- Max building level.
-
deserializeNBT
public void deserializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound) - Specified by:
deserializeNBTin interfaceIBuildingContainer- Specified by:
deserializeNBTin interfacenet.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>- Overrides:
deserializeNBTin classAbstractBuilding
-
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider) - Specified by:
serializeNBTin interfaceIBuildingContainer- Specified by:
serializeNBTin interfacenet.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>- Overrides:
serializeNBTin classAbstractBuilding
-
serializeToView
public void serializeToView(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf, boolean fullSync) Description copied from class:AbstractBuildingSerializes to view.- Specified by:
serializeToViewin interfaceIBuilding- Overrides:
serializeToViewin classAbstractBuilding- Parameters:
buf- RegistryFriendlyByteBuf to write to.fullSync- Whether it's a full sync
-
canEat
public boolean canEat(net.minecraft.world.item.ItemStack stack) Description copied from interface:IBuildingCheck if the assigned citizens are allowed to eat the following stack.- Parameters:
stack- the stack to test.- Returns:
- true if so.
-
getHives
Get the hives/nests positions that belong to this beekeper- Returns:
- te set of positions of hives/nests that belong to this beekeeper
-
removeHive
public void removeHive(net.minecraft.core.BlockPos pos) Remove a hive/nest position from this beekeper- Parameters:
pos- the position to remove
-
addHive
public void addHive(net.minecraft.core.BlockPos pos) Add a hive/nest position to this beekeper- Parameters:
pos- the position to add
-
getHarvestTypes
Get what materials the beekeeper should harvest.- Returns:
- honeycomb, honey bottle, or both
-
getMaximumHives
public int getMaximumHives()Get the maximum amount of hives that can belong to this beekeeper- Returns:
- the number of maximum hives that can belong to this beekeeper
-