h1z1-server
    Preparing search index...

    CraftManager handles the crafting of a recipe by a client.

    Index

    Constructors

    Methods

    • Crafts an item using the given recipe and adds it to the client's inventory.

      Parameters

      • server: ZoneServer2016

        The ZoneServer2016 instance.

      • client: ZoneClient2016

        The client performing the craft.

      • recipeId: number

        The ID of the recipe being crafted.

      • recipeCount: number

        The number of times to repeat the recipe.

      Returns Promise<boolean>

      A promise resolving to a boolean indicating if the crafting process was successful.

    • Generates the craft queue based on the recipe and its components.

      Parameters

      • server: ZoneServer2016

        The ZoneServer2016 instance.

      • client: ZoneClient2016

        The client performing the craft.

      • recipe: Recipe

        The recipe object.

      • recipeCount: number

        The number of times to repeat the recipe.

      • recipeId: number

        The ID of the recipe being crafted.

      • craftCount: number

        The total number of items to craft.

      Returns Promise<boolean>

      A promise resolving to a boolean indicating if the craft queue generation was successful.

    • Removes a craft component from the character and updates the remaining items.

      Parameters

      • server: ZoneServer2016

        The ZoneServer2016 instance.

      • itemDS: ItemDataSource

        The item data source containing the craft component.

      • count: number

        The number of craft components to remove.

      Returns boolean

      A boolean indicating if the removal was successful.

    • Removes simulated craft components from the internal recipe components data source.

      Parameters

      • itemDefinitionId: number

        The item definition ID of the craft component to remove.

      • count: number

        The number of craft components to remove.

      Returns boolean

      A boolean indicating if the removal was successful.