SiliconGhetto Engine API
    Preparing search index...

    Function createFarmingAPI

    • Returns {
          plant(x: number, y: number, z: number): void;
          isMature(x: number, y: number, z: number): boolean;
          harvest(x: number, y: number, z: number): boolean;
          till(x: number, y: number, z: number): boolean;
      }

      • plant: function
        • Plant a wheat crop at the given position (must be on farmland).

          Parameters

          • x: number

            World X coordinate

          • y: number

            World Y coordinate

          • z: number

            World Z coordinate

          Returns void

      • isMature: function
        • Check whether the crop at a position is fully grown and ready to harvest.

          Parameters

          • x: number

            World X coordinate

          • y: number

            World Y coordinate

          • z: number

            World Z coordinate

          Returns boolean

          True if the crop is mature

      • harvest: function
        • Harvest a mature crop, adding wheat and seeds to the player's inventory.

          Parameters

          • x: number

            World X coordinate

          • y: number

            World Y coordinate

          • z: number

            World Z coordinate

          Returns boolean

          True if a mature crop was harvested, false if no mature crop at that position

      • till: function
        • Till a dirt or grass block into farmland (required before planting).

          Parameters

          • x: number

            World X coordinate

          • y: number

            World Y coordinate

          • z: number

            World Z coordinate

          Returns boolean

          True if the block was tilled, false if it was not dirt or grass