Interface IFruitBearer


public interface IFruitBearer
Can be implemented by tile entities which can bear fruit.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addRipeness(float add)
    Increases the ripeness of the fruit.
    float
     
    boolean
     
    List<net.minecraft.world.item.ItemStack>
    pickFruit(net.minecraft.world.item.ItemStack tool)
    Picks the fruits of this tile, resetting it to unripe fruits.
  • Method Details

    • hasFruit

      boolean hasFruit()
      Returns:
      true if the actual tile can bear fruits.
    • pickFruit

      List<net.minecraft.world.item.ItemStack> pickFruit(net.minecraft.world.item.ItemStack tool)
      Picks the fruits of this tile, resetting it to unripe fruits.
      Parameters:
      tool - Tool used in picking the fruits. May be empty.
      Returns:
      Picked fruits. The returned list is immutable.
    • getRipeness

      float getRipeness()
      Returns:
      float indicating the ripeness of the fruit with >= 1.0f indicating full ripeness.
    • addRipeness

      void addRipeness(float add)
      Increases the ripeness of the fruit. Adding 1.0f will fully ripen the fruit.
      Parameters:
      add - Float to add to the ripeness. Will truncate to valid values.