Class BeehiveMock

All Implemented Interfaces:
org.bukkit.block.Beehive, org.bukkit.block.BlockState, org.bukkit.block.EntityBlockStorage<org.bukkit.entity.Bee>, org.bukkit.block.TileState, org.bukkit.metadata.Metadatable, org.bukkit.persistence.PersistentDataHolder

public class BeehiveMock extends TileStateMock implements org.bukkit.block.Beehive
Mock implementation of a Beehive.
See Also:
  • Constructor Details

    • BeehiveMock

      public BeehiveMock(@NotNull @NotNull org.bukkit.Material material)
      Constructs a new BeehiveMock for the provided Material. Only supports Material.BEEHIVE
      Parameters:
      material - The material this state is for.
    • BeehiveMock

      protected BeehiveMock(@NotNull @NotNull org.bukkit.block.Block block)
      Constructs a new BeehiveMock for the provided Block. Only supports Material.BEEHIVE
      Parameters:
      block - The block this state is for.
    • BeehiveMock

      protected BeehiveMock(@NotNull @NotNull BeehiveMock state)
      Constructs a new BeehiveMock by cloning the data from an existing one.
      Parameters:
      state - The state to clone.
  • Method Details

    • getSnapshot

      @NotNull public @NotNull org.bukkit.block.BlockState getSnapshot()
      Description copied from class: BlockStateMock
      This returns a copy of this BlockStateMock. Inheritents of this class should override this method!
      Specified by:
      getSnapshot in class TileStateMock
      Returns:
      A snapshot of this BlockStateMock.
    • getFlower

      @Nullable public @Nullable org.bukkit.Location getFlower()
      Specified by:
      getFlower in interface org.bukkit.block.Beehive
    • setFlower

      public void setFlower(@Nullable @Nullable org.bukkit.Location location)
      Specified by:
      setFlower in interface org.bukkit.block.Beehive
    • setSedated

      public void setSedated(boolean sedated)
      Sets the return value of isSedated()
      Parameters:
      sedated - Whether the beehive is sedated.
    • updateSedated

      public void updateSedated()
      Updates the return value of isSedated() based on whether there is a lit campfire no more than 5 blocks below the beehive.
    • isSedated

      public boolean isSedated()
      Specified by:
      isSedated in interface org.bukkit.block.Beehive
    • isFull

      public boolean isFull()
      Specified by:
      isFull in interface org.bukkit.block.EntityBlockStorage<org.bukkit.entity.Bee>
    • getEntityCount

      public int getEntityCount()
      Specified by:
      getEntityCount in interface org.bukkit.block.EntityBlockStorage<org.bukkit.entity.Bee>
    • getMaxEntities

      public int getMaxEntities()
      Specified by:
      getMaxEntities in interface org.bukkit.block.EntityBlockStorage<org.bukkit.entity.Bee>
    • setMaxEntities

      public void setMaxEntities(int max)
      Specified by:
      setMaxEntities in interface org.bukkit.block.EntityBlockStorage<org.bukkit.entity.Bee>
    • releaseEntities

      @NotNull public @NotNull List<org.bukkit.entity.Bee> releaseEntities()
      Specified by:
      releaseEntities in interface org.bukkit.block.EntityBlockStorage<org.bukkit.entity.Bee>
    • addEntity

      public void addEntity(@NotNull @NotNull org.bukkit.entity.Bee entity)
      Specified by:
      addEntity in interface org.bukkit.block.EntityBlockStorage<org.bukkit.entity.Bee>
    • clearEntities

      public void clearEntities()
      Specified by:
      clearEntities in interface org.bukkit.block.EntityBlockStorage<org.bukkit.entity.Bee>