### Example: Building and Registering a Shaped Recipe - Java Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/RecipeBuilder This example demonstrates how to use the RecipeBuilder interface in Java to create and register a shaped recipe. It shows the sequence of calling `setKey`, `setResult`, `build`, and `registerRecipe`. Note that this is a conceptual example and requires specific implementations for `NamespacedKey`, `ItemStack`, and the RecipeBuilder itself. ```java // Assuming you have implementations for NamespacedKey and ItemStack // and an instance of a RecipeBuilder implementation (e.g., ShapedRecipeBuilder) NamespacedKey myRecipeKey = new NamespacedKey("myplugin", "my_shaped_item"); ItemStack myResultItem = new ItemStack(Material.DIAMOND); RecipeBuilder shapedRecipeBuilder = new ShapedRecipeBuilder(); // Or other builder implementation shapedRecipeBuilder.setKey(myRecipeKey); shapedRecipeBuilder.setResult(myResultItem); // Configure the shape and ingredients for the shaped recipe (omitted for brevity) // shapedRecipeBuilder.setShape(...); // shapedRecipeBuilder.addIngredient(...); shapedRecipeBuilder.build(); // Build the recipe shapedRecipeBuilder.registerRecipe(); // Register the recipe with the server ``` -------------------------------- ### Create ItemBuilder from Material Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Creates a new ItemBuilder instance with a specified material. This is the primary method for starting item construction. ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder of(@NotNull @NotNull Material material) Creates builder with specified material. ``` ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder of(@NotNull @NotNull Material material, int amount) Creates builder with material and amount. ``` -------------------------------- ### ItemBuilder: Getting Player Head Profile Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Details the `getPlayerHeadProfile` method, which retrieves the `ResolvableProfile` from an ItemStack if it is a player head. This method is integrated with `HeadBuilder.getPlayerHeadProfile(ItemStack)` for profile data retrieval. ```java @Nullable public @Nullable ResolvableProfile getPlayerHeadProfile() ``` -------------------------------- ### ShapedRecipeBuilder - Get Recipe Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/ShapedRecipeBuilder Retrieves the built Recipe object. The recipe is not registered with the server until registerRecipe() is called. ```java @NotNull public @NotNull Recipe getRecipe() ``` -------------------------------- ### Get Player Head Profile from ItemStack (Java) Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/HeadBuilder Retrieves the ResolvableProfile associated with a player head ItemStack. This method allows inspection of the head's properties. It is a static method within the HeadBuilder class. ```java import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.Nullable; import in.arcadelabs.labaide.items.ResolvableProfile; // Assuming HeadBuilder is accessible // import in.arcadelabs.labaide.items.HeadBuilder; public class ExampleUsage { public static void getProfileFromHead(ItemStack itemStack) { @Nullable ResolvableProfile profile = HeadBuilder.getPlayerHeadProfile(itemStack); if (profile != null) { // Use the profile } } } ``` -------------------------------- ### ItemBuilder Initialization Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Methods for creating a new ItemBuilder instance. ```APIDOC ## ItemBuilder Initialization ### Description Methods for creating a new ItemBuilder instance with specified material, amount, or player head. ### Methods - `static ItemBuilder of(@NotNull Material material)` - `static ItemBuilder of(@NotNull Material material, int amount)` - `static ItemBuilder playerHead(@NotNull PlayerProfile profile)` - `static ItemBuilder playerHead(@NotNull String playerName)` - `static ItemBuilder playerHead(@NotNull String playerName, @NotNull UUID playerUuid)` - `static ItemBuilder playerHead(@NotNull OfflinePlayer player)` - `static ItemBuilder skull(@NotNull String playerName)` - `static ItemBuilder skull(@NotNull String playerName, @NotNull UUID playerUuid)` - `static ItemBuilder skull(@NotNull OfflinePlayer player)` - `static ItemBuilder skull(Player player)` - `static ItemBuilder skullFromBase64(@NotNull String base64Texture)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "No request body for static factory methods." } ``` ### Response #### Success Response (200) - **ItemBuilder** (ItemBuilder) - An instance of the ItemBuilder. #### Response Example ```json { "example": "ItemBuilder instance created." } ``` ``` -------------------------------- ### Initialize SmokingRecipeBuilder Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/SmokingRecipeBuilder Constructs a new SmokingRecipeBuilder instance. This builder is used for creating smoker recipes, which are optimized for faster food cooking. ```java public SmokingRecipeBuilder(JavaPlugin instance) ``` -------------------------------- ### BlastingRecipeBuilder Constructor and Methods (Java) Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/BlastingRecipeBuilder This snippet shows the constructor and key methods for the BlastingRecipeBuilder class. It allows for building and registering blast furnace recipes, setting various properties like ingredients, experience, cooking time, and the result item. ```Java public class BlastingRecipeBuilder extends Object implements RecipeBuilder { public BlastingRecipeBuilder(JavaPlugin instance); public RecipeBuilder setResult(@NotNull @NotNull ItemStack result); public RecipeBuilder setKey(@NotNull @NotNull NamespacedKey key); public RecipeBuilder setIngredients(@NotNull @NotNull RecipeChoice ingredients); public RecipeBuilder setExperience(float experience); public RecipeBuilder setCookingTime(int cookingTime); public RecipeBuilder build(); @NotNull public @NotNull Recipe getRecipe(); public void registerRecipe(); } ``` -------------------------------- ### RecipeBuilder SetExperience Method Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/class-use/RecipeBuilder Defines the amount of experience points awarded upon completion of a recipe. This is applicable to smelting and cooking recipes. ```java BlastingRecipeBuilder.setExperience(float experience) ``` ```java CampfireRecipeBuilder.setExperience(float experience) ``` ```java FurnaceRecipeBuilder.setExperience(float experience) ``` ```java SmokingRecipeBuilder.setExperience(float experience) ``` -------------------------------- ### Smithing Recipe Builder - Set Template Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/class-use/RecipeBuilder Documentation for the `setTemplate` method in `SmithingRecipeBuilder`, which specifies the required smithing template for a smithing recipe. ```APIDOC ## Smithing Recipe Builder - Set Template ### Description Sets the smithing template required for this smithing recipe. ### Method `setTemplate(RecipeChoice template)` ### Endpoint N/A (Method within a builder class) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Example usage within SmithingRecipeBuilder SmithingRecipeBuilder builder = new SmithingRecipeBuilder(); RecipeChoice templateChoice = new ExactChoice(new ItemStack(Material.NETHERITE_UPGRADE_RE উপকরণ)); // Example template builder.setTemplate(templateChoice); ``` ### Response #### Success Response (N/A) This is a builder method and does not return a direct response. #### Response Example N/A ``` -------------------------------- ### Item and Head Utilities Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/allclasses-index Utilities for creating and modifying ItemStacks and player heads. ```APIDOC ## Item and Head Utilities ### Description Utilities for creating and modifying game items and player heads. ### Classes - **HeadBuilder**: Utility for creating player skulls using Paper's DataComponents API. - **ItemBuilder**: Builder for creating and modifying ItemStacks using Paper's DataComponents API. ``` -------------------------------- ### RecipeBuilder Interface Methods - Java Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/RecipeBuilder This snippet outlines the core methods of the RecipeBuilder interface in Java. It includes methods for setting the recipe's key and result, building the recipe, retrieving the built recipe, and registering it with the server. The `registerRecipe` method requires `build()` to be called first and can throw an `IllegalStateException`. ```java public interface RecipeBuilder { RecipeBuilder setKey(NamespacedKey key); RecipeBuilder setResult(ItemStack result); RecipeBuilder build(); Recipe getRecipe(); void registerRecipe() throws IllegalStateException; } ``` -------------------------------- ### HeadBuilder Methods Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/index-all Static methods for creating player heads and custom heads. ```APIDOC ## HeadBuilder Methods ### Description Static methods for creating player heads and custom heads. ### Methods #### createCustomHead - **createCustomHead(String)**: Creates player head from base64 texture. #### createPlayerHead - **createPlayerHead(String)**: Creates player head from name (server resolves profile). - **createPlayerHead(String, UUID)**: Creates player head with custom name and UUID. - **createPlayerHead(OfflinePlayer)**: Creates player head from OfflinePlayer. - **createPlayerHead(Player)**: Convenience method for `HeadBuilder.createPlayerHead(OfflinePlayer)`. #### createSkullMap (Deprecated) - **createSkullMap(String)**: Deprecated, for removal: This API element is subject to removal in a future version. Use `HeadBuilder.createCustomHead(String)` or `HeadBuilder.createPlayerHead(String)` instead. ``` -------------------------------- ### PotionMixBuilder API Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/PotionMixBuilder Documentation for the PotionMixBuilder class, used to construct custom brewing stand recipes. ```APIDOC ## PotionMixBuilder Class ### Description Builder for custom brewing stand recipes. ### Methods #### `PotionMixBuilder(JavaPlugin instance)` ##### Description Constructor for PotionMixBuilder. ##### Parameters - **instance** (JavaPlugin) - The plugin instance. #### `setResult(ItemStack result)` ##### Description Sets the result item for this recipe. ##### Method POST ##### Endpoint `/recipes/potion/result` ##### Parameters ###### Request Body - **result** (ItemStack) - The resulting item. ##### Request Example ```json { "result": { "type": "minecraft:potion", "potion": "minecraft:healing" } } ``` ##### Response ###### Success Response (200) - **RecipeBuilder** (RecipeBuilder) - The updated RecipeBuilder instance. ###### Response Example ```json { "message": "Result set successfully." } ``` #### `setKey(NamespacedKey key)` ##### Description Sets a unique recipe identifier. Must be unique across plugins. ##### Method POST ##### Endpoint `/recipes/potion/key` ##### Parameters ###### Request Body - **key** (NamespacedKey) - The unique key for the recipe. ##### Request Example ```json { "key": { "namespace": "myplugin", "path": "custom_potion_recipe" } } ``` ##### Response ###### Success Response (200) - **RecipeBuilder** (RecipeBuilder) - The updated RecipeBuilder instance. ###### Response Example ```json { "message": "Key set successfully." } ``` #### `setIngredients(RecipeChoice input, RecipeChoice ingredient)` ##### Description Sets the input potion and brewing ingredient. ##### Method POST ##### Endpoint `/recipes/potion/ingredients` ##### Parameters ###### Request Body - **input** (RecipeChoice) - The input potion choice. - **ingredient** (RecipeChoice) - The brewing ingredient choice. ##### Request Example ```json { "input": { "type": "minecraft:item", "item": "minecraft:water_bottle" }, "ingredient": { "type": "minecraft:item", "item": "minecraft:glistering_melon_slice" } } ``` ##### Response ###### Success Response (200) - **RecipeBuilder** (RecipeBuilder) - The updated RecipeBuilder instance. ###### Response Example ```json { "message": "Ingredients set successfully." } ``` #### `build()` ##### Description Builds the recipe without registering it. ##### Method POST ##### Endpoint `/recipes/potion/build` ##### Response ###### Success Response (200) - **RecipeBuilder** (RecipeBuilder) - The built RecipeBuilder instance. ###### Response Example ```json { "message": "Recipe built successfully." } ``` #### `getRecipe()` ##### Description Returns the PotionMix. Returns null since PotionMix isn't a standard Recipe. ##### Method GET ##### Endpoint `/recipes/potion/getRecipe` ##### Response ###### Success Response (200) - **Recipe** (Recipe) - The PotionMix recipe or null. ###### Response Example ```json { "recipe": null } ``` #### `getPotionMix()` ##### Description Gets the PotionMix object. ##### Method GET ##### Endpoint `/recipes/potion/getPotionMix` ##### Response ###### Success Response (200) - **PotionMix** (PotionMix) - The PotionMix object. ###### Response Example ```json { "potionMix": { "input": "minecraft:water_bottle", "ingredient": "minecraft:glistering_melon_slice", "result": "minecraft:healing_potion" } } ``` #### `registerRecipe()` ##### Description Registers the recipe with the server. Must call `build()` first. ##### Method POST ##### Endpoint `/recipes/potion/register` ##### Response ###### Success Response (200) - **void** - Indicates successful registration. ###### Response Example ```json { "message": "Recipe registered successfully." } ``` ``` -------------------------------- ### Configure Item Amount Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Sets the amount (stack size) for the item. The amount must be between 1 and 127. ```java @NotNull @Contract("_, _ -> this") public @NotNull ItemBuilder amount(int amount) Sets the amount (stack size) of the item. Parameters: `amount` - the stack size (1-127) Returns: this builder for chaining Throws: `IllegalArgumentException` - if amount is less than 1 or greater than 127 ``` -------------------------------- ### ItemBuilder: Building Multiple ItemStacks Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Demonstrates the `buildMultiple` method, which generates a specified number of identical `ItemStack` copies. This is efficient for creating stacks of items or multiple instances for various purposes. ```java @NotNull @Contract("_, _ -> new") public @NotNull List buildMultiple(int count) ``` -------------------------------- ### RecipeBuilder Build Method Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/class-use/RecipeBuilder The `build()` method in RecipeBuilder constructs a recipe without immediately registering it. This allows for further customization before the recipe is finalized. ```java RecipeBuilder.build() ``` ```java BlastingRecipeBuilder.build() ``` ```java CampfireRecipeBuilder.build() ``` ```java FurnaceRecipeBuilder.build() ``` ```java PotionMixBuilder.build() ``` ```java ShapedRecipeBuilder.build() ``` ```java ShapelessRecipeBuilder.build() ``` ```java SmithingRecipeBuilder.build() ``` ```java SmokingRecipeBuilder.build() ``` ```java StonecuttingRecipeBuilder.build() ``` -------------------------------- ### ItemBuilder: Building ItemStack as Array Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Explains the `buildAsArray` method, which returns the built `ItemStack` within an array. This is convenient for inventory management or other operations that expect `ItemStack` arrays. ```java @NotNull @Contract("-> new") public @NotNull ItemStack[] buildAsArray() ``` -------------------------------- ### Create Skull ItemBuilder (Aliases) Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Provides alias methods for creating player head items, simplifying common use cases. ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder skull(@NotNull @NotNull String playerName) Alias for `playerHead(String)`. ``` ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder skull(@NotNull @NotNull OfflinePlayer player) Alias for `playerHead(OfflinePlayer)`. ``` ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder skull(@NotNull Player player) Alias for `playerHead(OfflinePlayer)`. ``` ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder skull(@NotNull @NotNull String playerName, @NotNull @NotNull UUID playerUuid) Alias for `playerHead(String, UUID)`. ``` -------------------------------- ### SmithingRecipeBuilder API Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/SmithingRecipeBuilder This section covers the methods available for building and managing smithing recipes using the SmithingRecipeBuilder. ```APIDOC ## SmithingRecipeBuilder ### Description Builder for smithing table recipes (e.g., diamond to netherite upgrades). Requires a template item since Minecraft 1.20. Common templates include NETHERITE_UPGRADE_SMITHING_TEMPLATE for gear upgrades and various armor trim templates. ### Constructor #### `SmithingRecipeBuilder(JavaPlugin instance)` Constructs a new SmithingRecipeBuilder. ### Methods #### `setResult(ItemStack result)` Sets the result item for this recipe. - **result** (ItemStack) - Required - The resulting item after the smithing operation. #### `setKey(NamespacedKey key)` Sets the unique recipe identifier. - **key** (NamespacedKey) - Required - A unique identifier for the recipe across all plugins. #### `setTemplate(RecipeChoice template)` Sets the smithing template required for this recipe. - **template** (RecipeChoice) - Required - The smithing template item (e.g., NETHERITE_UPGRADE_SMITHING_TEMPLATE). #### `setBase(RecipeChoice base)` Sets the base item to be upgraded. - **base** (RecipeChoice) - Required - The item that will be upgraded (e.g., Diamond Sword). #### `setAddition(RecipeChoice addition)` Sets the addition item required for the upgrade. - **addition** (RecipeChoice) - Required - The item used in conjunction with the base item (e.g., Netherite Ingot). #### `setCopyNbt(boolean copyNbt)` Determines whether to preserve enchantments and NBT data from the base item. - **copyNbt** (boolean) - Required - `true` to copy NBT data, `false` otherwise. #### `build()` Builds the recipe without registering it with the server. - Returns: `RecipeBuilder` - The builder instance. #### `getRecipe()` Gets the built recipe. Note that it is not registered until `registerRecipe()` is called. - Returns: `@NotNull Recipe` - The constructed recipe object. #### `registerRecipe()` Registers the recipe with the server. `build()` must be called first. ``` -------------------------------- ### SmithingRecipeBuilder Specific Methods Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/class-use/RecipeBuilder Provides methods specific to smithing recipes, such as setting the base item to be upgraded and the additional item required for the upgrade. It also includes an option to copy NBT data. ```java SmithingRecipeBuilder.setAddition(RecipeChoice addition) ``` ```java SmithingRecipeBuilder.setBase(RecipeChoice base) ``` ```java SmithingRecipeBuilder.setCopyNbt(boolean copyNbt) ``` -------------------------------- ### CampfireRecipeBuilder Constructor Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/CampfireRecipeBuilder Initializes a new instance of the CampfireRecipeBuilder class. It requires a JavaPlugin instance to be provided. ```java public CampfireRecipeBuilder(JavaPlugin instance) ``` -------------------------------- ### RecipeBuilder SetKey Method Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/class-use/RecipeBuilder The `setKey()` method assigns a unique `NamespacedKey` to a recipe, ensuring it is distinct across different plugins. This is crucial for recipe identification in Minecraft. ```java RecipeBuilder.setKey(NamespacedKey key) ``` ```java BlastingRecipeBuilder.setKey(@NotNull NamespacedKey key) ``` ```java CampfireRecipeBuilder.setKey(NamespacedKey key) ``` ```java FurnaceRecipeBuilder.setKey(@NotNull NamespacedKey key) ``` ```java PotionMixBuilder.setKey(NamespacedKey key) ``` ```java ShapelessRecipeBuilder.setKey(@NotNull NamespacedKey key) ``` ```java SmithingRecipeBuilder.setKey(NamespacedKey key) ``` ```java SmokingRecipeBuilder.setKey(@NotNull NamespacedKey key) ``` ```java StonecuttingRecipeBuilder.setKey(NamespacedKey key) ``` -------------------------------- ### Set Recipe Key Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/StonecuttingRecipeBuilder Sets a unique NamespacedKey identifier for the recipe. This key must be unique across all plugins to avoid conflicts. ```java public RecipeBuilder setKey(NamespacedKey key) ``` -------------------------------- ### FurnaceRecipeBuilder Methods for Recipe Configuration Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/FurnaceRecipeBuilder These methods allow configuration of various aspects of a furnace recipe. They include setting the result item, ingredients, experience points awarded, and cooking time. Each method returns a RecipeBuilder instance to allow for method chaining. ```java public RecipeBuilder setResult(@NotNull @NotNull ItemStack result) Sets the result item for this recipe. ``` ```java public RecipeBuilder setKey(@NotNull @NotNull NamespacedKey key) Sets unique recipe identifier (must be unique across plugins). ``` ```java public RecipeBuilder setIngredients(@NotNull @NotNull RecipeChoice ingredients) ``` ```java public RecipeBuilder setExperience(float experience) ``` ```java public RecipeBuilder setCookingTime(int cookingTime) Sets cooking time in ticks. Default is 200 ticks (10 seconds). ``` -------------------------------- ### ShapelessRecipeBuilder API Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/ShapelessRecipeBuilder Documentation for the ShapelessRecipeBuilder class, used for creating crafting recipes where ingredient order does not matter. ```APIDOC ## ShapelessRecipeBuilder ### Description Builder for shapeless crafting recipes where ingredient order doesn't matter. ### Constructor #### `ShapelessRecipeBuilder(JavaPlugin instance)` Initializes a new instance of ShapelessRecipeBuilder. ### Methods #### `setResult(@NotNull ItemStack result)` Sets the result item for this recipe. - **result** (ItemStack) - Required - The item stack that will be crafted. #### `setKey(@NotNull NamespacedKey key)` Sets a unique recipe identifier. This key must be unique across all plugins. - **key** (NamespacedKey) - Required - The unique identifier for the recipe. #### `setIngredients(@NotNull RecipeChoice... ingredients)` Sets the ingredients for the shapeless recipe. A maximum of 9 ingredients can be set. - **ingredients** (RecipeChoice[]) - Required - An array of RecipeChoice objects representing the ingredients. #### `build()` Builds the recipe object without registering it with the server. Returns: - `RecipeBuilder` - The builder instance for chaining. #### `getRecipe()` Gets the built recipe object. The recipe is not registered with the server until `registerRecipe()` is called. Returns: - `Recipe` - The constructed recipe object. #### `registerRecipe()` Registers the built recipe with the server. This method must be called after `build()`. ``` -------------------------------- ### ItemBuilder: Conditional Modifications (if-else) Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Shows how to use the `conditional` method with both `ifTrue` and `ifFalse` consumers to apply different modifications based on a boolean condition. This allows for more complex item generation logic. ```java @NotNull @Contract("_, _, _ -> this") public @NotNull ItemBuilder conditional(boolean condition, @NotNull @NotNull Consumer ifTrue, @NotNull @NotNull Consumer ifFalse) ``` -------------------------------- ### ItemBuilder: Copying Builder Instance Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Describes the `copy` method, which creates a new `ItemBuilder` instance with a cloned `ItemStack`. This is useful for creating variations of an item without modifying the original builder. ```java @NotNull @Contract("-> new") public @NotNull ItemBuilder copy() ``` -------------------------------- ### Recipe Builders Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/index-all Classes for building various types of Minecraft recipes. ```APIDOC ## Recipe Builders ### Description Builders for creating different types of Minecraft recipes. ### Classes #### BlastingRecipeBuilder - **Description**: Builder for blast furnace recipes (faster ore smelting). - **Constructor**: `BlastingRecipeBuilder(JavaPlugin)` - **Method**: `build()` #### CampfireRecipeBuilder - **Description**: Builder for campfire cooking recipes. - **Constructor**: `CampfireRecipeBuilder(JavaPlugin)` - **Method**: `build()` #### FurnaceRecipeBuilder - **Method**: `build()` #### PotionMixBuilder - **Method**: `build()` #### ShapedRecipeBuilder - **Method**: `build()` #### ShapelessRecipeBuilder - **Method**: `build()` #### SmithingRecipeBuilder - **Method**: `build()` #### SmokingRecipeBuilder - **Method**: `build()` #### StonecuttingRecipeBuilder - **Method**: `build()` #### RecipeBuilder (Interface) - **Method**: `build()`: Builds recipe without registering. ``` -------------------------------- ### StonecuttingRecipeBuilder Constructor Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/StonecuttingRecipeBuilder Initializes a new instance of the StonecuttingRecipeBuilder class. It requires a JavaPlugin instance to be passed as an argument. ```java public StonecuttingRecipeBuilder(JavaPlugin instance) ``` -------------------------------- ### CampfireRecipeBuilder Methods for Building and Registering Recipes Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/CampfireRecipeBuilder These methods are used to finalize the recipe creation process. The `build()` method constructs the recipe without registering it, while `getRecipe()` retrieves the built recipe. `registerRecipe()` then adds the recipe to the server. ```java public RecipeBuilder build() @NotNull public @NotNull Recipe getRecipe() public void registerRecipe() ``` -------------------------------- ### Set Recipe Ingredients Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/SmokingRecipeBuilder Sets the ingredients required for the recipe using a RecipeChoice. This defines the items or item types that must be present to craft or process the recipe. ```java public RecipeBuilder setIngredients(@NotNull @NotNull RecipeChoice ingredients) ``` -------------------------------- ### Configure Item Name Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Sets the custom display name for the item. Supports both Component objects and legacy color codes. ```java @NotNull @Contract("_, _ -> this") public @NotNull ItemBuilder name(@Nullable @Nullable Component name) Sets the custom name of the item. Parameters: `name` - the display name component Returns: this builder for chaining ``` ```java @NotNull @Contract("_, _ -> this") public @NotNull ItemBuilder name(@Nullable @Nullable String name) Sets the custom name of the item using legacy color codes. Automatically converts color codes using `&` symbol. Parameters: `name` - the display name with legacy formatting Returns: this builder for chaining ``` -------------------------------- ### Create ItemBuilder from Base64 Texture Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Creates an ItemBuilder for a player head using a base64 encoded texture string. ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder skullFromBase64(@NotNull @NotNull String base64Texture) Creates player head from base64 texture. ``` -------------------------------- ### Conditional Item Building with ItemBuilder Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Demonstrates how to conditionally apply enchantments, lore, and unbreakable status to an ItemStack using the ItemBuilder's conditional method. This is useful for creating items with specific properties based on certain game states or player permissions. ```java boolean isAdminItem = true; ItemStack item = ItemBuilder.of(Material.DIAMOND_SWORD) .name(Component.text("Sword")) .conditional(isAdminItem, builder -> builder.enchant(Enchantment.SHARPNESS, 5) .lore("Admin sword", "Very powerful") .unbreakable()) .build(); ``` -------------------------------- ### Set Recipe Key Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/SmokingRecipeBuilder Sets a unique NamespacedKey for the recipe. This key must be unique across all plugins to avoid conflicts and ensure proper identification of the recipe on the server. ```java public RecipeBuilder setKey(@NotNull @NotNull NamespacedKey key) ``` -------------------------------- ### ItemBuilder Copy Operation Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Creates a copy of the current ItemBuilder instance. ```APIDOC ## POST /itembuilder/copy ### Description Creates a copy of this builder with a new ItemStack instance. ### Method POST ### Endpoint /itembuilder/copy ### Response #### Success Response (200) - **ItemBuilder** (ItemBuilder) - A new ItemBuilder with a cloned ItemStack. #### Response Example ```json { "itemBuilder": { "material": "DIAMOND_SWORD", "name": "Sword" } } ``` ``` -------------------------------- ### ItemBuilder: Setting Player Head Profile Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Illustrates the `playerHeadProfile` method, used to set a custom `ResolvableProfile` on an ItemStack, primarily intended for player heads. It allows for custom profile data to be applied. ```java @NotNull @Contract("_, _ -> this") public @NotNull ItemBuilder playerHeadProfile(@NotNull @NotNull ResolvableProfile profile) ``` -------------------------------- ### ItemBuilder: Building ItemStack Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Details the primary `build` method, which constructs and returns the final `ItemStack` after all builder operations have been applied. This is the method used to finalize item creation. ```java @NotNull @Contract("-> new") public @NotNull ItemStack build() ``` -------------------------------- ### ItemBuilder Build Operations Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Methods for building the final ItemStack from the ItemBuilder. ```APIDOC ## POST /itembuilder/build ### Description Builds and returns the ItemStack. If any ItemMeta operations were performed, they are applied before building. ### Method POST ### Endpoint /itembuilder/build ### Response #### Success Response (200) - **ItemStack** (object) - The constructed ItemStack. #### Response Example ```json { "itemStack": { "material": "DIAMOND_SWORD", "name": "Sword", "enchantments": {"SHARPNESS": 5} } } ``` ## POST /itembuilder/buildAsArray ### Description Builds the ItemStack and returns it as an array. Useful for inventory operations that require ItemStack arrays. ### Method POST ### Endpoint /itembuilder/buildAsArray ### Response #### Success Response (200) - **ItemStack[]** (array) - An array containing the built ItemStack. #### Response Example ```json { "itemStacks": [ { "material": "DIAMOND_SWORD", "name": "Sword" } ] } ``` ## POST /itembuilder/buildMultiple ### Description Builds multiple copies of the ItemStack. ### Method POST ### Endpoint /itembuilder/buildMultiple ### Parameters #### Request Body - **count** (int) - Required - The number of copies to create. ### Request Example ```json { "count": 5 } ``` ### Response #### Success Response (200) - **List** (array) - A list of ItemStack copies. #### Response Example ```json { "itemStacks": [ { "material": "DIAMOND_SWORD", "name": "Sword" }, { "material": "DIAMOND_SWORD", "name": "Sword" } ] } ``` ``` -------------------------------- ### Recipe Builders - Set Result Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/class-use/RecipeBuilder This section covers the `setResult` method available in multiple recipe builders. This method is used to define the output item of a recipe. ```APIDOC ## Recipe Builders - Set Result ### Description Sets the resulting `ItemStack` for the recipe. ### Method `setResult(@NotNull ItemStack result)` or `setResult(ItemStack result)` ### Endpoint N/A (Method within a builder class) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Example usage within a builder SomeRecipeBuilder builder = new SomeRecipeBuilder(); ItemStack resultItem = new ItemStack(Material.DIAMOND); builder.setResult(resultItem); ``` ### Response #### Success Response (N/A) This is a builder method and does not return a direct response. #### Response Example N/A ``` -------------------------------- ### RecipeBuilder SetIngredients Method Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/class-use/RecipeBuilder This method is used to define the ingredients required for a recipe. The signature varies depending on the recipe type, accepting single or multiple `RecipeChoice` objects. ```java BlastingRecipeBuilder.setIngredients(@NotNull RecipeChoice ingredients) ``` ```java CampfireRecipeBuilder.setIngredients(@NotNull RecipeChoice ingredients) ``` ```java FurnaceRecipeBuilder.setIngredients(@NotNull RecipeChoice ingredients) ``` ```java PotionMixBuilder.setIngredients(RecipeChoice input, RecipeChoice ingredient) ``` ```java ShapelessRecipeBuilder.setIngredients(@NotNull RecipeChoice... ingredients) ``` ```java SmokingRecipeBuilder.setIngredients(@NotNull RecipeChoice ingredients) ``` ```java StonecuttingRecipeBuilder.setIngredients(RecipeChoice ingredients) ``` -------------------------------- ### Configure Item Lore Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Sets or adds lines to the item's lore. Supports both Component objects and legacy color codes for string inputs. ```java @NotNull @Contract("_, _ -> this") public @NotNull ItemBuilder lore(@Nullable @Nullable List lore) Sets the lore of the item, replacing any existing lore. Parameters: `lore` - the lore lines as components Returns: this builder for chaining ``` ```java @NotNull @Contract("_, _ -> this") public @NotNull ItemBuilder lore(@Nullable @Nullable String... lore) Sets the lore of the item using string lines. Supports legacy color codes with `&` symbol. Parameters: `lore` - the lore lines as strings Returns: this builder for chaining ``` ```java @NotNull @Contract("_, _ -> this") public @NotNull ItemBuilder addLore(@NotNull @NotNull Component line) Adds a single line to the existing lore. Parameters: `line` - the lore line to add Returns: this builder for chaining ``` ```java @NotNull @Contract("_, _ -> this") public @NotNull ItemBuilder addLore(@NotNull @NotNull String line) Adds a single line to the existing lore using legacy formatting. Parameters: `line` - the lore line with legacy color codes Returns: this builder for chaining ``` -------------------------------- ### CampfireRecipeBuilder Methods for Setting Recipe Properties Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/CampfireRecipeBuilder These methods allow you to configure various aspects of the campfire recipe. This includes setting the result item, a unique namespaced key, ingredients, experience points awarded, and the cooking time in ticks. ```java public RecipeBuilder setResult(ItemStack result) public RecipeBuilder setKey(NamespacedKey key) public RecipeBuilder setIngredients(@NotNull @NotNull RecipeChoice ingredients) public RecipeBuilder setExperience(float experience) public RecipeBuilder setCookingTime(int cookingTime) ``` -------------------------------- ### Set Recipe Ingredients Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/StonecuttingRecipeBuilder Sets the ingredients required for the stonecutter recipe using a RecipeChoice object. ```java public RecipeBuilder setIngredients(RecipeChoice ingredients) ``` -------------------------------- ### Create Player Head ItemBuilder Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Creates an ItemBuilder for a player head. Supports creation from PlayerProfile, player name, OfflinePlayer, and with custom UUID. ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder playerHead(@NotNull @NotNull PlayerProfile profile) Creates player head with profile. ``` ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder playerHead(@NotNull @NotNull String playerName) Creates player head from name. ``` ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder playerHead(@NotNull @NotNull OfflinePlayer player) Creates player head from OfflinePlayer. ``` ```java @NotNull @Contract("_, _ -> new") public static @NotNull ItemBuilder playerHead(@NotNull @NotNull String playerName, @NotNull @NotNull UUID playerUuid) Creates player head with custom name and UUID. ``` -------------------------------- ### ItemBuilder Methods Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/index-all This section details the various methods available in the ItemBuilder class for creating and modifying ItemStacks. ```APIDOC ## ItemBuilder Methods ### Description Methods for creating and modifying ItemStacks. ### Methods #### addLore - **addLore(String)**: Adds a single line to the existing lore using legacy formatting. - **addLore(Component)**: Adds a single line to the existing lore. #### amount - **amount(int)**: Sets the amount (stack size) of the item. #### attributeModifier - **attributeModifier(Attribute, String, double, AttributeModifier.Operation)**: Adds an attribute modifier with specified parameters. - **attributeModifier(Attribute, String, double, AttributeModifier.Operation, EquipmentSlotGroup)**: Adds an attribute modifier with specified parameters and slot. - **attributeModifier(Attribute, AttributeModifier)**: Adds an attribute modifier to the item. #### bucketEntity - **bucketEntity(EntityType)**: Sets bucket entity data for bucket items. #### build - **build()**: Builds and returns the ItemStack. - **buildAsArray()**: Builds the ItemStack and returns it as an array. - **buildMultiple(int)**: Builds multiple copies of the ItemStack. #### clearAttributeModifiers - **clearAttributeModifiers()**: Clears all attribute modifiers. #### clearEnchantments - **clearEnchantments()**: Clears all enchantments from the item. #### clearLore - **clearLore()**: Clears all lore from the item. #### conditional - **conditional(boolean, Consumer)**: Applies conditional modifications based on a predicate. - **conditional(boolean, Consumer, Consumer)**: Applies conditional modifications with if-else logic. #### copy - **copy()**: Creates a copy of this builder with a new ItemStack instance. #### copyPersistentDataFrom - **copyPersistentDataFrom(ItemStack)**: Copies persistent data from another ItemStack to this one. #### damage - **damage(int)**: Sets current damage. - **damagePercentage(double)**: Sets damage as percentage of max (0.0-1.0). ``` -------------------------------- ### Add Multiple Enchantments to Item with ItemBuilder Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Demonstrates adding multiple enchantments to an ItemStack simultaneously using a map of enchantments and their levels with the ItemBuilder. This is efficient for applying several enchantments at once. ```java Map enchantments = new HashMap<>(); enchantments.put(Enchantment.FIRE_ASPECT, 2); enchantments.put(Enchantment.LOOT_BONUS_MOBS, 3); ItemBuilder builder = ItemBuilder.from(existingItem); builder.enchant(enchantments); ``` -------------------------------- ### ItemBuilder API Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/class-use/ItemBuilder This section covers the various methods available in the ItemBuilder class for creating and customizing ItemStacks. ```APIDOC ## ItemBuilder Class Methods ### Description Provides a fluent API for constructing and modifying Minecraft ItemStacks. ### Methods #### Add Lore - **addLore(@NotNull String line)**: Adds a single line to the existing lore using legacy formatting. - **addLore(@NotNull Component line)**: Adds a single line to the existing lore. #### Item Properties - **amount(int amount)**: Sets the amount (stack size) of the item. - **damage(int damage)**: Sets current damage. - **damagePercentage(double percentage)**: Sets damage as percentage of max (0.0-1.0). - **fireResistant()**: Makes the item fire-resistant. - **food(int nutrition, float saturation, float eatSeconds)**: Sets the food component for edible items. - **glint(@Nullable Boolean glint)**: Sets whether the item should have an enchantment glint. - **hideTooltip()**: Hides all tooltip information. - **lore(@Nullable String... lore)**: Sets the lore of the item using string lines. - **lore(@Nullable List lore)**: Sets the lore of the item, replacing any existing lore. - **maxDamage(int maxDamage)**: Sets max durability. - **maxStackSize(int size)**: Sets the maximum stack size for the item. - **modelData(int modelData)**: Sets the custom model data for resource pack support. - **name(@Nullable String name)**: Sets the custom name of the item using legacy color codes. - **name(@Nullable Component name)**: Sets the custom name of the item. #### Attribute Modifiers - **attributeModifier(@NotNull Attribute attribute, @NotNull String name, double amount, AttributeModifier.Operation operation)**: Adds an attribute modifier with specified parameters. - **attributeModifier(@NotNull Attribute attribute, @NotNull String name, double amount, AttributeModifier.Operation operation, @NotNull EquipmentSlotGroup slot)**: Adds an attribute modifier with specified parameters and slot. - **attributeModifier(@NotNull Attribute attribute, @NotNull AttributeModifier modifier)**: Adds an attribute modifier to the item. - **clearAttributeModifiers()**: Clears all attribute modifiers. #### Enchantments - **enchant(@NotNull Map enchantments)**: Adds multiple enchantments to the item. - **enchant(@NotNull Enchantment enchantment, int level)**: Adds an enchantment to the item. - **clearEnchantments()**: Clears all enchantments from the item. #### Item Flags - **flags(@NotNull ItemFlag... flags)**: Adds item flags to control tooltip visibility. #### Persistent Data - **copyPersistentDataFrom(@NotNull ItemStack source)**: Copies persistent data from another ItemStack to this one. - **modifyPersistentData(@NotNull Consumer modifier)**: Modifies the persistent data container. #### Other Modifications - **bucketEntity(@NotNull EntityType entityType)**: Sets bucket entity data for bucket items. - **clearLore()**: Clears all lore from the item. - **conditional(boolean condition, @NotNull Consumer ifTrue)**: Applies conditional modifications based on a predicate. - **conditional(boolean condition, @NotNull Consumer ifTrue, @NotNull Consumer ifFalse)**: Applies conditional modifications with if-else logic. - **modifyLore(@NotNull Consumer> loreModifier)**: Modifies the existing lore using a consumer function. #### Builder Management - **copy()**: Creates a copy of this builder with a new ItemStack instance. - **from(@NotNull ItemStack itemStack)**: Creates builder from existing ItemStack (clones for immutability). - **of(@NotNull Material material)**: Creates a new ItemBuilder for the specified material. ``` -------------------------------- ### FurnaceRecipeBuilder Constructor Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/FurnaceRecipeBuilder Initializes a new instance of the FurnaceRecipeBuilder class. It requires a JavaPlugin instance to be passed during construction. ```java public FurnaceRecipeBuilder(JavaPlugin instance) ``` -------------------------------- ### FurnaceRecipeBuilder Build and Register Methods Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/FurnaceRecipeBuilder These methods handle the finalization and registration of the furnace recipe. The build() method constructs the recipe without registering it, while getRecipe() retrieves the built recipe. registerRecipe() registers the completed recipe with the server. ```java public RecipeBuilder build() Builds recipe without registering. ``` ```java @NotNull public @NotNull Recipe getRecipe() Gets built recipe (not registered until registerRecipe() called). ``` ```java public void registerRecipe() Registers recipe with server (must call build() first). ``` -------------------------------- ### Recipe Builders Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/allclasses-index This section details the various builders available for creating and managing different types of Minecraft recipes, including smelting, crafting, and smithing recipes. ```APIDOC ## Recipe Builders ### Description Builders for creating and registering various types of Minecraft recipes. ### Classes - **BlastingRecipeBuilder**: Builder for blast furnace recipes (faster ore smelting). - **CampfireRecipeBuilder**: Builder for campfire cooking recipes. - **FurnaceRecipeBuilder**: Builder for furnace smelting recipes. - **PotionMixBuilder**: Builder for custom brewing stand recipes. - **ShapedRecipeBuilder**: Builder for shaped crafting recipes where ingredient arrangement matters. - **ShapelessRecipeBuilder**: Builder for shapeless crafting recipes where ingredient order doesn't matter. - **SmithingRecipeBuilder**: Builder for smithing table recipes (e.g., diamond to netherite upgrades). - **SmokingRecipeBuilder**: Builder for smoker recipes (faster food cooking). - **StonecuttingRecipeBuilder**: Builder for stonecutter recipes. ### Interface - **RecipeBuilder**: Interface for building and registering Minecraft recipes. ``` -------------------------------- ### Set Recipe Experience Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/SmokingRecipeBuilder Sets the amount of experience points awarded upon completion of the recipe. This allows for fine-tuning progression systems based on crafting or cooking actions. ```java public RecipeBuilder setExperience(float experience) ``` -------------------------------- ### Hide Item Tooltip Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Completely hides all tooltip information for the item, making it appear with no description or details in the inventory. This method returns the builder for chaining. ```java ItemBuilder builder = ItemBuilder.of(Material.BARRIER); builder.hideTooltip(); ``` -------------------------------- ### ShapedRecipeBuilder API Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/class-use/ShapedRecipeBuilder This section details the methods available for the ShapedRecipeBuilder class, used for defining crafting recipes. ```APIDOC ## ShapedRecipeBuilder Methods ### Description Methods for configuring crafting recipes using the ShapedRecipeBuilder. ### Methods #### `setIngredients` - **Method**: Not applicable (Instance method) - **Description**: Maps shape characters to ingredients for the recipe. - **Parameters**: - **Path Parameters**: None - **Query Parameters**: None - **Request Body**: None - **Request Example**: None #### `setKey` - **Method**: Not applicable (Instance method) - **Description**: Sets the unique identifier (NamespacedKey) for the recipe. - **Parameters**: - **Path Parameters**: None - **Query Parameters**: None - **Request Body**: None - **Request Example**: None #### `setResult` - **Method**: Not applicable (Instance method) - **Description**: Defines the resulting ItemStack when the recipe is crafted. - **Parameters**: - **Path Parameters**: None - **Query Parameters**: None - **Request Body**: None - **Request Example**: None #### `setShape` - **Method**: Not applicable (Instance method) - **Description**: Sets the crafting grid shape for the recipe. - **Parameters**: - **Path Parameters**: None - **Query Parameters**: None - **Request Body**: None - **Request Example**: None ### Response #### Success Response (200) - **Description**: Not applicable (Instance methods do not return HTTP responses). #### Response Example None ``` -------------------------------- ### Set Maximum Stack Size for Item Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Defines the maximum number of this item that can be stacked in a single inventory slot. The size must be between 1 and 99. This method returns the builder for chaining. ```java ItemBuilder builder = ItemBuilder.of(Material.ARROW); builder.maxStackSize(64); ``` -------------------------------- ### ItemBuilder Player Head Profile Management Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/ItemBuilder Methods for retrieving and setting player head profiles on an ItemStack. ```APIDOC ## GET /itembuilder/playerheadprofile ### Description Retrieves the ResolvableProfile from the current ItemStack if it's a player head. ### Method GET ### Endpoint /itembuilder/playerheadprofile ### Response #### Success Response (200) - **ResolvableProfile** (object | null) - The ResolvableProfile or null if not present or not a player head. #### Response Example ```json { "profile": { "name": "Steve", "id": "uuid-of-steve" } } ``` ## POST /itembuilder/playerheadprofile ### Description Sets a custom player head profile on the current ItemStack. ### Method POST ### Endpoint /itembuilder/playerheadprofile ### Parameters #### Request Body - **profile** (ResolvableProfile) - Required - The ResolvableProfile to set. ### Request Example ```json { "profile": { "name": "Alex", "id": "uuid-of-alex" } } ``` ### Response #### Success Response (200) - **ItemBuilder** (ItemBuilder) - The ItemBuilder instance with the profile set. #### Response Example ```json { "itemBuilder": { "material": "PLAYER_HEAD", "profile": { "name": "Alex", "id": "uuid-of-alex" } } } ``` ``` -------------------------------- ### Exception Handling Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/allclasses-index Custom exception for handling cases where an item identifier does not correspond to a valid item. ```APIDOC ## Exception Handling ### Description Handles errors related to item identification. ### Class - **ResultingItemNotFoundException**: Thrown when item identifier doesn't correspond to a valid item. ``` -------------------------------- ### ShapedRecipeBuilder Constructor Source: https://javadoc.io/doc/in.arcadelabs.labaide/items-aide/1.1/in/arcadelabs/labaide/item/recipe/impl/ShapedRecipeBuilder Initializes a new instance of the ShapedRecipeBuilder class. It requires a JavaPlugin instance to be provided. ```java public ShapedRecipeBuilder(JavaPlugin instance) ```