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 BuildingFlorist extends AbstractBuilding
The florist building.
  • Constructor Details

    • BuildingFlorist

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

    • getPlantGround

      public List<net.minecraft.core.BlockPos> getPlantGround()
      Return a list of barrels assigned to this hut.
      Returns:
      copy of the list
    • getSchematicName

      @NotNull public @NotNull String getSchematicName()
      Description copied from interface: ISchematicProvider
      Children must return the name of their structure.
      Returns:
      StructureProxy name.
    • getMaxBuildingLevel

      public int getMaxBuildingLevel()
      Description copied from interface: ISchematicProvider
      Children must return their max building level.
      Specified by:
      getMaxBuildingLevel in interface ISchematicProvider
      Overrides:
      getMaxBuildingLevel in class AbstractBuilding
      Returns:
      Max building level.
    • registerBlockPosition

      public void registerBlockPosition(@NotNull @NotNull net.minecraft.world.level.block.Block block, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.Level world)
      Description copied from interface: IBuildingContainer
      Register a block and position. We suppress this warning since this parameter will be used in child classes which override this method.
      Specified by:
      registerBlockPosition in interface IBuildingContainer
      Overrides:
      registerBlockPosition in class AbstractBuildingContainer
      Parameters:
      block - to be registered
      pos - of the block
      world - world to register it at.
    • 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
    • removePlantableGround

      public void removePlantableGround(net.minecraft.core.BlockPos pos)
      Remove a piece of plantable ground because invalid.
      Parameters:
      pos - the pos to remove it at.
    • getFlowerToGrow

      @Nullable public @Nullable net.minecraft.world.item.ItemStack getFlowerToGrow()
      Get a random flower to grow at the moment.
      Returns:
      the flower to grow.
    • getPlantablesForBuildingLevel

      public static Set<ItemStorage> getPlantablesForBuildingLevel(int level)
      Get the plantables from the compatibility manager the florist can build at the current level.
      Parameters:
      level - the building level.
      Returns:
      the restricted list.