All Implemented Interfaces:
IBuilding, IBuildingContainer, ICommonBuilding, ISchematicProvider, IBuildingModuleContainer, IModuleContainer<IBuildingModule>, IRequester, IRequestResolverProvider, IItemHandlerCapProvider, net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class BuildingBeekeeper extends AbstractBuilding
Building of the beekeeper (apiary).
  • Field Details

  • Constructor Details

    • BuildingBeekeeper

      public BuildingBeekeeper(@NotNull @NotNull IColony c, net.minecraft.core.BlockPos l)
      The abstract constructor of the building.
      Parameters:
      c - the colony
      l - the position
  • Method Details

    • getSchematicName

      @NotNull public @NotNull String 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:
      getMaxBuildingLevel in interface ISchematicProvider
      Overrides:
      getMaxBuildingLevel in class AbstractBuilding
      Returns:
      Max building level.
    • deserializeNBT

      public void deserializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound)
      Specified by:
      deserializeNBT in interface IBuildingContainer
      Specified by:
      deserializeNBT in interface net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Overrides:
      deserializeNBT in class AbstractBuilding
    • serializeNBT

      public net.minecraft.nbt.CompoundTag serializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider)
      Specified by:
      serializeNBT in interface IBuildingContainer
      Specified by:
      serializeNBT in interface net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Overrides:
      serializeNBT in class AbstractBuilding
    • serializeToView

      public void serializeToView(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf, boolean fullSync)
      Description copied from class: AbstractBuilding
      Serializes to view.
      Specified by:
      serializeToView in interface IBuilding
      Overrides:
      serializeToView in class AbstractBuilding
      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: IBuilding
      Check if the assigned citizens are allowed to eat the following stack.
      Parameters:
      stack - the stack to test.
      Returns:
      true if so.
    • getHives

      public Set<net.minecraft.core.BlockPos> 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

      public String 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