### Method to get Examples Source: https://mappings.dev/1.21.1/net/minecraft/commands/arguments/NbtTagArgument Returns a collection of example strings for the NbtTagArgument. This is useful for command help and autocompletion. ```java public Collection getExamples() { return EXAMPLES; } ``` -------------------------------- ### Get Command Examples using Brigadier Source: https://mappings.dev/1.21.1/net/minecraft/commands/arguments/ResourceArgument Retrieves a collection of example strings for a given command or parsing context. This helps users understand how to use the command correctly. ```java public Collection getExamples() { // Implementation for returning examples return null; } ``` -------------------------------- ### Retrieve Command Examples Source: https://mappings.dev/1.21.1/net/minecraft/commands/arguments/ResourceKeyArgument This method is used to retrieve a collection of example strings for a given command or function. These examples help users understand how to properly use the command. It typically returns a `Collection`. ```java public Collection getExamples() { // Implementation details for returning examples return null; // Placeholder } public Collection getExamples() { // Implementation details for returning examples return null; // Placeholder } ``` -------------------------------- ### Server Initialization and Startup Source: https://mappings.dev/1.21.1/net/minecraft/server/MinecraftServer Methods related to the initial setup and startup of the Minecraft server. ```APIDOC ## Server Initialization and Startup ### Description This section covers methods for starting and initializing the Minecraft server. ### Methods #### `startServer` - **Method**: `public static S startServer(Function serverFactory)` - **Description**: Starts the Minecraft server using the provided server factory function. #### `initServer` - **Method**: `protected abstract boolean initServer()` - **Description**: Initializes the server's core components. Returns true if initialization is successful. #### `setupServer` - **Method**: `protected abstract boolean setupServer()` - **Description**: Configures and prepares the server environment for operation. #### `runServer` - **Method**: `protected void runServer()` - **Description**: Executes the main server loop, keeping the server running. ``` -------------------------------- ### GoAndGiveItemsToTarget Method: start Source: https://mappings.dev/1.21.1/net/minecraft/world/entity/ai/behavior/GoAndGiveItemsToTarget Called when the GoAndGiveItemsToTarget behavior begins execution. It handles the initial setup for the entity, including setting the target and any necessary state changes. It takes the server world, entity, and current time as parameters. ```java protected void start(ServerLevel arg0, E arg1, long arg2) ``` -------------------------------- ### ResourceOrTagKeyArgument getExamples Method Source: https://mappings.dev/1.21.1/net/minecraft/commands/arguments/ResourceOrTagKeyArgument Provides the method to retrieve example usage strings for the ResourceOrTagKeyArgument. This is helpful for understanding how to format arguments correctly. ```java public Collection getExamples() { // Implementation details... } ``` -------------------------------- ### ItemArgument Constructor and Methods (Java) Source: https://mappings.dev/1.21.1/net/minecraft/commands/arguments/item/ItemArgument Provides the constructor and method signatures for the ItemArgument class. This includes methods for creating an ItemArgument, parsing ItemInputs from StringReaders, retrieving ItemInputs from command contexts, listing suggestions, and getting example inputs. ```java public ItemArgument(CommandBuildContext commandRegistryAccess) public static ItemArgument item(CommandBuildContext arg0) public ItemInput parse(com.mojang.brigadier.StringReader arg0) public static ItemInput getItem(com.mojang.brigadier.context.CommandContext arg0, String arg1) public CompletableFuture listSuggestions(com.mojang.brigadier.context.CommandContext arg0, com.mojang.brigadier.suggestion.SuggestionsBuilder arg1) public Collection getExamples() ``` -------------------------------- ### Get Examples for Swizzle Argument Source: https://mappings.dev/1.21.1/net/minecraft/commands/arguments/coordinates/SwizzleArgument Provides a collection of example strings that demonstrate valid swizzle argument formats. This is useful for command suggestions and user guidance. ```java public Collection a() { // ... implementation ... } public Collection getExamples() { // ... implementation ... } public Collection getExamples() { // ... implementation ... } public Collection getExamples() { // ... implementation ... } ``` -------------------------------- ### Structure Access Methods Source: https://mappings.dev/1.21.1/net/minecraft/world/level/chunk/StructureAccess This section details the methods available for interacting with structure data, including getting and setting structure starts and references. ```APIDOC ## StructureAccess Interface ### Description Provides methods to manage structure starts and references within a chunk. ### Methods #### Get Structure Start - **Method:** `getStartForStructure(Structure structure)` - **Description:** Retrieves the `StructureStart` for a given `Structure`. - **Return Type:** `StructureStart` #### Set Structure Start - **Method:** `setStartForStructure(Structure structure, StructureStart start)` - **Description:** Sets the `StructureStart` for a given `Structure`. - **Parameters:** - `structure` (Structure) - The structure to set the start for. - `start` (StructureStart) - The `StructureStart` to set. - **Return Type:** `void` #### Get Structure References - **Method:** `getReferencesForStructure(Structure structure)` - **Description:** Retrieves the `LongSet` of references for a given `Structure`. - **Return Type:** `it.unimi.dsi.fastutil.longs.LongSet` #### Add Structure Reference - **Method:** `addReferenceForStructure(Structure structure, long reference)` - **Description:** Adds a reference to a given `Structure`. - **Parameters:** - `structure` (Structure) - The structure to add the reference to. - `reference` (long) - The reference to add. - **Return Type:** `void` #### Get All References - **Method:** `getAllReferences()` - **Description:** Retrieves a map of all structures and their associated references. - **Return Type:** `Map` #### Set All References - **Method:** `setAllReferences(Map structureReferences)` - **Description:** Sets all structure references for this access. - **Parameters:** - `structureReferences` (Map) - The map of structures to their references. - **Return Type:** `void` ``` -------------------------------- ### Get Projectile Dispense Configuration - Java Source: https://mappings.dev/1.21.1/net/minecraft/world/item/ProjectileItem This method provides configuration settings for how a projectile item is dispensed, for example, when shot from a dispenser. It returns a DispenseConfig object. ```java default ProjectileItem$DispenseConfig createDispenseConfig() ``` -------------------------------- ### ClientboundAddExperienceOrbPacket Information Source: https://mappings.dev/1.21.1/net/minecraft/network/protocol/game/ClientboundAddExperienceOrbPacket Details about the ClientboundAddExperienceOrbPacket class, including its fields, constructors, and methods. ```APIDOC ## ClientboundAddExperienceOrbPacket ### Description Represents a packet sent from the server to the client to add an experience orb to the game world. It contains information about the orb's ID, position, and experience value. ### Fields #### Stream Codec - **a** (StreamCodec) - The stream codec for this packet. #### Entity ID - **b** (int) - The unique identifier for the experience orb entity. #### Position - **c** (double) - The X-coordinate of the experience orb. - **d** (double) - The Y-coordinate of the experience orb. - **e** (double) - The Z-coordinate of the experience orb. #### Experience Value - **f** (int) - The amount of experience the orb provides. ### Constructors #### Public Constructor - **(ExperienceOrb orb, ServerEntity entry)** - Creates a new packet with the provided orb and entity data. #### Private Constructor - **(FriendlyByteBuf buf)** - Creates a new packet by reading data from a friendly byte buffer (used for deserialization). ### Methods #### Write Packet - **write(FriendlyByteBuf arg0)** - Writes the packet data to a friendly byte buffer. - **write(PacketByteBuf buf)** - Writes the packet data to a packet byte buffer. #### Get Packet Type - **type()** (PacketType) - Returns the packet type. - **getPacketId()** (int) - Returns the unique identifier for this packet type. #### Handle Packet - **handle(ClientGamePacketListener arg0)** - Applies the packet's logic to the given client game packet listener. - **apply(ClientPlayPacketListener arg0)** - Applies the packet's logic to the given client play packet listener. #### Get Entity ID - **getId()** (int) - Retrieves the entity ID of the experience orb. - **getEntityId()** (int) - Retrieves the entity ID of the experience orb. #### Get Position - **getX()** (double) - Retrieves the X-coordinate of the experience orb. - **getY()** (double) - Retrieves the Y-coordinate of the experience orb. - **getZ()** (double) - Retrieves the Z-coordinate of the experience orb. #### Get Experience Value - **getValue()** (int) - Retrieves the experience value of the orb. - **getExperience()** (int) - Retrieves the experience value of the orb. ``` -------------------------------- ### Chunk Initialization and Lighting Source: https://mappings.dev/1.21.1/net/minecraft/server/level/ThreadedLevelLightEngine Methods related to initializing and performing lighting operations on chunks. ```APIDOC ## initializeLight ### Description Initializes the light for a given chunk. ### Method `public CompletableFuture initializeLight(ChunkAccess arg0, boolean arg1)` ### Endpoint N/A (Method call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **arg0** (ChunkAccess) - Required - The chunk to initialize light for. - **arg1** (boolean) - Required - A flag indicating whether to perform initialization. ### Request Example ```json { "arg0": { "chunkData": "..." }, "arg1": true } ``` ### Response #### Success Response (200) - **CompletableFuture** - A future that completes with the chunk after light initialization. #### Response Example ```json { "chunkData": "...", "lightInitialized": true } ``` ## lightChunk ### Description Performs lighting calculations for a chunk. ### Method `public CompletableFuture lightChunk(ChunkAccess arg0, boolean excludeBlocks)` ### Endpoint N/A (Method call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **arg0** (ChunkAccess) - Required - The chunk to light. - **excludeBlocks** (boolean) - Required - Whether to exclude block light calculations. ### Request Example ```json { "arg0": { "chunkData": "..." }, "excludeBlocks": false } ``` ### Response #### Success Response (200) - **CompletableFuture** - A future that completes with the chunk after lighting. #### Response Example ```json { "chunkData": "...", "lightingComplete": true } ``` ``` -------------------------------- ### Recipe and Registry Suggestions Source: https://mappings.dev/1.21.1/net/minecraft/commands/SharedSuggestionProvider Provides suggestions for recipes and registry elements. ```APIDOC ## GET /suggestions/recipes ### Description Retrieves a list of recipe names. ### Method GET ### Endpoint /suggestions/recipes ### Parameters None ### Request Example None ### Response #### Success Response (200) - **recipeNames** (Collection) - A list of recipe names. #### Response Example { "recipeNames": ["stone_crafting", "iron_ingot"] } ``` ```APIDOC ## POST /suggestions/registry/elements ### Description Suggests registry elements based on type and suggestion type. ### Method POST ### Endpoint /suggestions/registry/elements ### Parameters #### Request Body - **registryRef** (ResourceKey>) - The resource key for the registry. - **suggestionType** (SharedSuggestionProvider$ElementSuggestionType) - The type of suggestion. - **builder** (com.mojang.brigadier.suggestion.SuggestionsBuilder) - The suggestions builder. ### Request Example ```json { "registryRef": {"namespace": "minecraft", "path": "item"}, "suggestionType": "ALL_UNTAGGED", "builder": "..." } ``` ### Response #### Success Response (200) - **suggestions** (com.mojang.brigadier.suggestion.Suggestions) - The suggestion results. #### Response Example { "suggestions": { "list": [ { "text": "minecraft:stone" }, { "text": "minecraft:dirt" } ] } } ``` ```APIDOC ## POST /suggestions/registry/ids ### Description Suggests IDs for registry elements. ### Method POST ### Endpoint /suggestions/registry/ids ### Parameters #### Request Body - **registryRef** (RegistryKey>) - The resource key for the registry. - **suggestedIdType** (CommandSource$SuggestedIdType) - The type of suggested ID. - **builder** (com.mojang.brigadier.suggestion.SuggestionsBuilder) - The suggestions builder. - **context** (com.mojang.brigadier.context.CommandContext) - The command context. ### Request Example ```json { "registryRef": {"namespace": "minecraft", "path": "item"}, "suggestedIdType": "$$", "builder": "...", "context": "..." } ``` ### Response #### Success Response (200) - **suggestions** (com.mojang.brigadier.suggestion.Suggestions) - The suggestion results. #### Response Example { "suggestions": { "list": [ { "text": "minecraft:stone" }, { "text": "minecraft:dirt" } ] } } ``` -------------------------------- ### BlastFurnaceScreen Constructor Source: https://mappings.dev/1.21.1/net/minecraft/client/gui/screens/inventory/BlastFurnaceScreen Initializes a new instance of the BlastFurnaceScreen class. This constructor takes the blast furnace's menu, the player's inventory, and a title component as arguments to set up the screen. ```java public BlastFurnaceScreen(BlastFurnaceMenu container, Inventory inventory, Component title) ``` -------------------------------- ### RaidCommand: Start Raid Source: https://mappings.dev/1.21.1/net/minecraft/server/commands/RaidCommand Starts a raid with a specified level. This command initiates a raid encounter in the game. ```java private static int b(et arg0, int arg1) ``` ```java public static int start(CommandSourceStack arg0, int arg1) ``` ```java public int method_36199(class_2168 arg0, int arg1) ``` ```java public int executeStart(ServerCommandSource source, int level) ``` ```java public int m_180484_(C_2969_ p_180485_, int p_180486_) ``` -------------------------------- ### BlockStateProvider Get State Method Source: https://mappings.dev/1.21.1/net/minecraft/world/level/levelgen/feature/stateproviders/BlockStateProvider Abstract method to get a BlockState based on a RandomSource and BlockPos. This is the core method for determining the block state at a specific location during generation. ```java public abstract BlockState getState(RandomSource random, BlockPos pos) // Other aliases: method_23455(class_5819 arg0, class_2338 arg1), get(Random random, BlockPos pos), m_213972_(C_212974_ p_225908_, C_4675_ arg1) ``` -------------------------------- ### StructurePlacement Class Documentation Source: https://mappings.dev/1.21.1/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement Provides details about the StructurePlacement class, its fields, and how to instantiate it. ```APIDOC ## StructurePlacement Class ### Description Represents the placement logic for structures within a Minecraft world, defining how and where structures are generated. ### Fields - **CODEC** (com.mojang.serialization.Codec) - A codec for serializing and deserializing StructurePlacement objects. - **HIGHLY_ARBITRARY_RANDOM_SALT** (int) - A high arbitrary salt value used in random calculations. - **locateOffset** (Vec3i) - An offset used for locating the structure. - **frequencyReductionMethod** (StructurePlacement$FrequencyReductionMethod) - The method used to reduce the frequency of structure placement. - **frequency** (float) - The base frequency of structure placement. - **salt** (int) - A salt value used in random calculations for placement. - **exclusionZone** (Optional) - An optional exclusion zone where structures should not be placed. ### Constructor - **protected StructurePlacement**(Vec3i locateOffset, StructurePlacement$FrequencyReductionMethod frequencyReductionMethod, float frequency, int salt, Optional exclusionZone) - Constructs a new StructurePlacement with the specified parameters. ``` -------------------------------- ### Start Sniffing Task - Java Source: https://mappings.dev/1.21.1/net/minecraft/world/entity/ai/behavior/warden/TryToSniff This method, named method_47264, is a factory method for creating the sniffing task. It's a key component in initializing the warden's AI to start sniffing. ```Java protected static BehaviorControl method_47264() { return create(f_217735_, field_38133); } ``` -------------------------------- ### Initialize Light - Java Source: https://mappings.dev/1.21.1/net/minecraft/server/level/ThreadedLevelLightEngine Initializes the lighting for a chunk. This method is called to set up the initial lighting state for a given chunk. ```java public CompletableFuture initializeLight(ChunkAccess arg0, boolean arg1) ``` -------------------------------- ### BlazeModel Method Summary (Java) Source: https://mappings.dev/1.21.1/net/minecraft/client/model/BlazeModel Summarizes the methods available in the BlazeModel class, such as setupAnim, createBodyLayer, and getPart, along with their parameters and return types. ```Java private static String getRodName(int index); public static LayerDefinition createBodyLayer(); public ModelPart getPart(); public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch); ``` -------------------------------- ### Get Sprite Scaling (Sprite) - Java Source: https://mappings.dev/1.21.1/net/minecraft/client/gui/GuiSpriteManager Retrieves the scaling configuration for a Sprite object. This method is an alternative for getting scaling data, potentially for broader Sprite compatibility. ```java public GuiSpriteScaling getScaling(Sprite sprite) ``` -------------------------------- ### PandaRollGoal start Method - Java Source: https://mappings.dev/1.21.1/net/minecraft/world/entity/animal/Panda%24PandaRollGoal The start method is called once when the PandaRollGoal is initiated. It prepares the panda for the rolling action, potentially setting animations or initial states. ```java public void start() ``` -------------------------------- ### VexModel setupAnim Method (Java) Source: https://mappings.dev/1.21.1/net/minecraft/client/model/VexModel Sets up the animation for the VexModel based on entity state and movement parameters. This method is crucial for animating the vex's actions during gameplay. ```java public void setupAnim(Vex arg0, float arg1, float arg2, float arg3, float arg4, float arg5) ``` -------------------------------- ### Inverse Lerp Functions Source: https://mappings.dev/1.21.1/net/minecraft/util/Mth Calculates the interpolation factor between two values. Given a value, a start, and an end, it returns a number between 0 and 1 representing the progress of the value from start to end. ```Java public static double inverseLerp(double value, double start, double end) { // Implementation for double inverse lerp return (end - start == 0) ? 0 : (value - start) / (end - start); } ``` ```Java public static float inverseLerp(float value, float start, float end) { // Implementation for float inverse lerp return (end - start == 0) ? 0 : (value - start) / (end - start); } ``` -------------------------------- ### LayoutSettings Utility Methods Source: https://mappings.dev/1.21.1/net/minecraft/client/gui/layouts/LayoutSettings Utility methods for LayoutSettings, including copying and creating defaults. ```APIDOC ## LayoutSettings Utility Methods ### Description Provides utility functions related to LayoutSettings, such as creating default settings or copying existing ones. ### Method Various (copy, defaults, etc.) ### Endpoint N/A (Interface methods) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "Not applicable for interface methods" } ``` ### Response #### Success Response (200) ```json { "example": "Not applicable for interface methods" } ``` ### Method Details: - **copy()**: Creates a copy of the current LayoutSettings. - **defaults()**: Returns a LayoutSettings object with default values. - **create()**: Alias for defaults(). - **getExposed()**: Returns the exposed layout settings. - **toImpl()**: Converts to an implementation of LayoutSettings. ``` -------------------------------- ### DelegatedModel Constructor and Get Method - Java Source: https://mappings.dev/1.21.1/net/minecraft/data/models/model/DelegatedModel Demonstrates the constructor for DelegatedModel which takes a ResourceLocation parent, and the 'get' method which returns a JsonElement. This class is part of Minecraft's data model generation. ```java public class DelegatedModel implements Supplier { private final ResourceLocation parent; public DelegatedModel(ResourceLocation parent) { this.parent = parent; } @Override public com.google.gson.JsonElement get() { // Implementation would typically involve creating a JsonObject // representing the model with the parent. return null; // Placeholder } } ``` -------------------------------- ### Running the Bootstrap Process for FlatLevelGeneratorPresets Source: https://mappings.dev/1.21.1/net/minecraft/world/level/levelgen/flat/FlatLevelGeneratorPresets%24Bootstrap This method serves as the entry point for the bootstrap process, likely responsible for executing the registration of flat level generator presets. It's a public void method with no explicit parameters, indicating it triggers a predefined registration sequence. ```java public void a() run() method_41581() bootstrap() m_226283_() ``` -------------------------------- ### Light Engine Core Methods Source: https://mappings.dev/1.21.1/net/minecraft/server/level/ThreadedLevelLightEngine Core methods for managing the light engine's state and operations. ```APIDOC ## close ### Description Closes the light engine, releasing resources. ### Method `public void close()` ### Endpoint N/A (Method call) ### Parameters None ### Request Example ```java // No request body for method calls ``` ### Response #### Success Response None (void method) #### Response Example ```json // No response body for void methods ``` ## runLightUpdates ### Description Initiates and runs light updates. ### Method `public int runLightUpdates()` ### Endpoint N/A (Method call) ### Parameters None ### Request Example ```java // No request body for method calls ``` ### Response #### Success Response (200) - **int** - The number of updates performed. #### Response Example ```json { "updatesPerformed": 10 } ``` ## tryScheduleUpdate ### Description Attempts to schedule a light update task. ### Method `public void tryScheduleUpdate()` ### Endpoint N/A (Method call) ### Parameters None ### Request Example ```java // No request body for method calls ``` ### Response #### Success Response None (void method) #### Response Example ```json // No response body for void methods ``` ``` -------------------------------- ### Get Swizzle Argument from Command Context Source: https://mappings.dev/1.21.1/net/minecraft/commands/arguments/coordinates/SwizzleArgument Retrieves a swizzle argument from a command context using a string name. This method is used by command dispatchers to get parsed arguments for command execution. ```java public static EnumSet a(com.mojang.brigadier.context.CommandContext arg0, String arg1) { // ... implementation ... } public static EnumSet getSwizzle(com.mojang.brigadier.context.CommandContext arg0, String arg1) { // ... implementation ... } public static EnumSet method_9720(com.mojang.brigadier.context.CommandContext arg0, String arg1) { // ... implementation ... } public static EnumSet getSwizzle(com.mojang.brigadier.context.CommandContext context, String name) { // ... implementation ... } public static EnumSet m_120810_(com.mojang.brigadier.context.CommandContext p_120811_, String p_120812_) { // ... implementation ... } ``` -------------------------------- ### HangingSignItem Method Examples - Java Source: https://mappings.dev/1.21.1/net/minecraft/world/item/HangingSignItem Provides examples of various methods within the HangingSignItem class, including placement logic and internal game mechanics. These methods are crucial for how hanging signs behave in the Minecraft world. ```Java protected boolean a(dcz arg0, dtc arg1, jd arg2) public boolean canPlace(LevelReader arg0, BlockState arg1, BlockPos arg2) public boolean method_45431(class_4538 arg0, class_2680 arg1, class_2338 arg2) public boolean canPlaceAt(WorldView arg0, BlockState arg1, BlockPos arg2) public boolean m_246210_(C_1599_ p_252230_, C_2064_ p_252075_, C_4675_ arg2) ``` -------------------------------- ### RealmsNotificationsScreen$2 Initialization Methods Source: https://mappings.dev/1.21.1/com/mojang/realmsclient/gui/screens/RealmsNotificationsScreen%242 Documents methods related to initializing data fetchers and periodic runners managers, essential for background data updates. ```java initDataFetcher(RealmsDataFetcher arg0) ``` ```java createPeriodicRunnersManager(RealmsPeriodicCheckers arg0) ``` -------------------------------- ### TorchflowerCropBlock Method Implementations Source: https://mappings.dev/1.21.1/net/minecraft/world/level/block/TorchflowerCropBlock Overviews of key methods implemented by TorchflowerCropBlock, including getting the codec, creating the block state definition, getting the shape, determining the age property, maximum age, base seed item, and states for age. ```java public com.mojang.serialization.MapCodec codec() protected void createBlockStateDefinition(StateDefinition.Builder arg0) public VoxelShape getShape(BlockState arg0, BlockGetter arg1, BlockPos arg2, CollisionContext arg3) protected IntegerProperty getAgeProperty() public int getMaxAge() protected ItemLike getBaseSeedId() public BlockState getStateForAge(int arg0) ``` -------------------------------- ### Create StartHuntingHoglin Task Source: https://mappings.dev/1.21.1/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin This method provides a way to create an instance of the StartHuntingHoglin task. It's a static factory method intended for use in AI behavior trees. ```java public static OneShot create() { // Implementation details omitted for brevity return null; } ``` -------------------------------- ### Get String Argument Properties Source: https://mappings.dev/1.21.1/net/minecraft/commands/synchronization/brigadier/StringArgumentSerializer Retrieves the properties associated with a StringArgumentType. This method is used internally by the command system to get the specific configuration or type of a string argument before serialization or other operations. It takes a StringArgumentType and returns its template. ```java public StringArgumentSerializer$Template getArgumentTypeProperties(com.mojang.brigadier.arguments.StringArgumentType arg0) { // Implementation details for retrieving properties return null; // Placeholder } ``` -------------------------------- ### Asynchronous Lighting Tasks Source: https://mappings.dev/1.21.1/net/minecraft/server/level/ThreadedLevelLightEngine Methods for adding and managing asynchronous tasks related to lighting. ```APIDOC ## addTask ### Description Adds a task to the lighting engine's task queue. ### Method `private void addTask(int arg0, int arg1, ThreadedLevelLightEngine$TaskType arg2, Runnable arg3)` ### Endpoint N/A (Method call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **arg0** (int) - Required - X-coordinate for the task. - **arg1** (int) - Required - Z-coordinate for the task. - **arg2** (ThreadedLevelLightEngine$TaskType) - Required - The type of task. - **arg3** (Runnable) - Required - The task to execute. ### Request Example ```json { "arg0": 0, "arg1": 0, "arg2": "POST_UPDATE", "arg3": "() -> System.out.println(\"Task executed\")" } ``` ### Response #### Success Response None (void method) #### Response Example ```json // No response body for void methods ``` ## addTask ### Description Adds a task to the lighting engine's task queue with a completed level supplier. ### Method `private void addTask(int arg0, int arg1, IntSupplier arg2, ThreadedLevelLightEngine$TaskType arg3, Runnable arg4)` ### Endpoint N/A (Method call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **arg0** (int) - Required - X-coordinate for the task. - **arg1** (int) - Required - Z-coordinate for the task. - **arg2** (IntSupplier) - Required - A supplier for the completed level. - **arg3** (ThreadedLevelLightEngine$TaskType) - Required - The type of task. - **arg4** (Runnable) - Required - The task to execute. ### Request Example ```json { "arg0": 0, "arg1": 0, "arg2": "() -> 10", "arg3": "POST_UPDATE", "arg4": "() -> System.out.println(\"Task executed\")" } ``` ### Response #### Success Response None (void method) #### Response Example ```json // No response body for void methods ``` ## waitForPendingTasks ### Description Waits for all pending lighting tasks for a given coordinate to complete. ### Method `public CompletableFuture waitForPendingTasks(int arg0, int arg1)` ### Endpoint N/A (Method call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **arg0** (int) - Required - X-coordinate. - **arg1** (int) - Required - Z-coordinate. ### Request Example ```json { "arg0": 0, "arg1": 0 } ``` ### Response #### Success Response (200) - **CompletableFuture** - A future that completes when tasks are done. #### Response Example ```json { "status": "completed" } ``` ``` -------------------------------- ### ResourceLocationSearchTree Creation Source: https://mappings.dev/1.21.1/net/minecraft/client/searchtree/ResourceLocationSearchTree Methods for creating instances of ResourceLocationSearchTree. ```APIDOC ## Static Factory Methods for ResourceLocationSearchTree ### Description Provides static methods to create new instances of `ResourceLocationSearchTree`. ### Method `static ResourceLocationSearchTree create()` ### Endpoint N/A (Static method) ### Parameters None ### Request Example ```json { "example": "// Java Example\nResourceLocationSearchTree tree = ResourceLocationSearchTree.create();" } ``` ### Response #### Success Response (Instance) - **ResourceLocationSearchTree** - An empty `ResourceLocationSearchTree` instance. #### Response Example ```json { "example": "// Java Example\nResourceLocationSearchTree tree = ResourceLocationSearchTree.create();" } ``` --- ### Method `static ResourceLocationSearchTree create(List values, Function> identifiersGetter)` ### Description Creates a `ResourceLocationSearchTree` from a list of values and a function to extract resource locations. ### Method `static ResourceLocationSearchTree of(List values, Function> identifiersGetter)` ### Endpoint N/A (Static method) ### Parameters - **values** (List) - Required - A list of objects to be stored in the search tree. - **identifiersGetter** (Function>) - Required - A function that maps each object in `values` to a stream of `Identifier` objects. ### Request Example ```json { "example": "// Java Example\nList myObjects = ...;\nResourceLocationSearchTree tree = ResourceLocationSearchTree.of(myObjects, obj -> obj.getIdentifiers());" } ``` ### Response #### Success Response (Instance) - **ResourceLocationSearchTree** - A `ResourceLocationSearchTree` populated with the provided values and identifiers. #### Response Example ```json { "example": "// Java Example\nResourceLocationSearchTree tree = ResourceLocationSearchTree.of(myObjects, obj -> obj.getIdentifiers());" } ``` ``` -------------------------------- ### World Border Manipulation Source: https://mappings.dev/1.21.1/net/minecraft/world/level/border/WorldBorder Methods to get and set properties of the world border. ```APIDOC ## GET /worldborder/properties ### Description Retrieves the current properties of the world border. ### Method GET ### Endpoint /worldborder/properties ### Response #### Success Response (200) - **minX** (double) - The minimum X coordinate of the world border. - **minZ** (double) - The minimum Z coordinate of the world border. - **maxX** (double) - The maximum X coordinate of the world border. - **maxZ** (double) - The maximum Z coordinate of the world border. - **centerX** (double) - The current center X coordinate of the world border. - **centerZ** (double) - The current center Z coordinate of the world border. - **size** (double) - The current size of the world border. - **lerpRemainingTime** (long) - The remaining time in ticks for size interpolation. - **lerpTarget** (double) - The target size for interpolation. - **status** (string) - The current status or stage of the world border (e.g., "SAFE", "WARNING", "DAMAGE"). #### Response Example ```json { "minX": -29999984.0, "minZ": -29999984.0, "maxX": 29999984.0, "maxZ": 29999984.0, "centerX": 0.0, "centerZ": 0.0, "size": 59999968.0, "lerpRemainingTime": 0, "lerpTarget": 59999968.0, "status": "SAFE" } ``` ``` ```APIDOC ## PUT /worldborder/center ### Description Sets the center coordinates of the world border. ### Method PUT ### Endpoint /worldborder/center ### Parameters #### Request Body - **x** (double) - Required - The new X coordinate for the center. - **z** (double) - Required - The new Z coordinate for the center. ### Request Example ```json { "x": 100.5, "z": -50.0 } ``` ### Response #### Success Response (200) - (No content) #### Response Example (No content) ``` ```APIDOC ## PUT /worldborder/size ### Description Sets the size of the world border. ### Method PUT ### Endpoint /worldborder/size ### Parameters #### Request Body - **size** (double) - Required - The new size for the world border. ### Request Example ```json { "size": 1000.0 } ``` ### Response #### Success Response (200) - (No content) #### Response Example (No content) ``` ```APIDOC ## PUT /worldborder/size/interpolate ### Description Sets the size of the world border with interpolation over a specified time. ### Method PUT ### Endpoint /worldborder/size/interpolate ### Parameters #### Request Body - **fromSize** (double) - Required - The starting size for interpolation. - **toSize** (double) - Required - The target size for interpolation. - **time** (long) - Required - The duration of the interpolation in ticks. ### Request Example ```json { "fromSize": 500.0, "toSize": 2000.0, "time": 600 } ``` ### Response #### Success Response (200) - (No content) #### Response Example (No content) ``` -------------------------------- ### LevelLightEngine Class Source: https://mappings.dev/1.21.1/net/minecraft/world/level/lighting/LevelLightEngine Documentation for the LevelLightEngine class, its fields, constructors, and methods. ```APIDOC ## LevelLightEngine Class ### Description This class implements the `LightEventListener` interface and is responsible for managing both block and sky lighting within a Minecraft world. It utilizes two internal `LightEngine` instances for block and sky light computations. ### Fields - **LIGHT_SECTION_PADDING** (int) - Represents padding for light sections. - **levelHeightAccessor** (LevelHeightAccessor) - Accessor for world height properties. - **blockEngine** (LightEngine) - The engine responsible for block lighting. - **skyEngine** (LightEngine) - The engine responsible for sky lighting. ### Constructor - **LevelLightEngine**(LightChunkGetter chunkProvider, boolean hasBlockLight, boolean hasSkyLight) - Initializes the `LevelLightEngine` with a chunk provider and flags indicating whether to enable block and sky lighting. ### Methods #### `checkBlock(BlockPos pos)` - **Description**: Checks and updates lighting for a given block position. - **Method**: `void` #### `hasLightWork()` - **Description**: Determines if there are any pending lighting updates. - **Method**: `boolean` #### `runLightUpdates()` - **Description**: Executes all pending lighting updates. - **Method**: `int` #### `updateSectionStatus(SectionPos pos, boolean status)` - **Description**: Updates the status of a lighting section. - **Method**: `void` #### `setLightEnabled(ChunkPos pos, boolean enabled)` - **Description**: Enables or disables lighting for a given chunk. - **Method**: `void` #### `propagateLightSources(ChunkPos pos)` - **Description**: Propagates light sources within a chunk. - **Method**: `void` #### `getLayerListener(LightLayer layer)` - **Description**: Retrieves a `LayerLightEventListener` for a specific light layer. - **Method**: `LayerLightEventListener` #### `getDebugData(LightLayer layer, SectionPos pos)` - **Description**: Retrieves debug data for a specific light layer and section. - **Method**: `String` #### `getDebugSectionType(LightLayer layer, SectionPos pos)` - **Description**: Retrieves the debug section type for a specific light layer and section. - **Method**: `LayerLightSectionStorage.SectionType` #### `queueSectionData(LightLayer layer, SectionPos pos, DataLayer nibbles)` - **Description**: Queues section data for lighting processing. - **Method**: `void` #### `retainData(ChunkPos pos, boolean retainData)` - **Description**: Retains or discards lighting data for a chunk. - **Method**: `void` #### `getRawBrightness(BlockPos pos, int ambientDarkness)` - **Description**: Gets the raw brightness value for a block position. - **Method**: `int` #### `lightOnInSection(SectionPos pos)` - **Description**: Checks if lighting is active in a section. - **Method**: `boolean` #### `getLightSectionCount()` - **Description**: Gets the total number of light sections. - **Method**: `int` #### `getMinLightSection()` - **Description**: Gets the minimum light section index. - **Method**: `int` #### `getMaxLightSection()` - **Description**: Gets the maximum light section index. - **Method**: `int` ``` -------------------------------- ### Breeze Slide Behavior - Java Methods for AI Task Execution Source: https://mappings.dev/1.21.1/net/minecraft/world/entity/monster/breeze/Slide Provides Java methods that control the execution of the Slide behavior for the Breeze entity. These methods include 'checkExtraStartConditions', 'start', 'run', and 'method_55047', which manage the conditions for starting the behavior, initializing it, executing its logic, and updating its state over time. ```java protected boolean a(aqu arg0, ckz arg1) checkExtraStartConditions(ServerLevel arg0, Breeze arg1) method_55046(class_3218 arg0, class_8949 arg1) shouldRun(ServerWorld arg0, BreezeEntity arg1) m_6114_(C_12_ p_311782_, C_301969_ arg1) protected void a(aqu arg0, ckz arg1, long arg2) start(ServerLevel arg0, Breeze arg1, long arg2) method_55047(class_3218 arg0, class_8949 arg1, long arg2) run(ServerWorld arg0, BreezeEntity arg1, long arg2) m_6735_(C_12_ p_310251_, C_301969_ p_310596_, long arg2) ``` -------------------------------- ### ClientboundChunkBatchStartPacket Source: https://mappings.dev/1.21.1/net/minecraft/network/protocol/game/ClientboundChunkBatchStartPacket Represents a packet sent from the server to the client to start sending chunk data. ```APIDOC ## ClientboundChunkBatchStartPacket ### Description This packet signals the beginning of a chunk batch transmission from the server to the client. It is part of the game protocol for Minecraft. ### Method This is a data structure packet, not directly invoked via HTTP methods. ### Endpoint N/A (Client-server packet) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (N/A) This packet is part of the network protocol and does not have a standard HTTP success response. #### Response Example None ### Fields - **INSTANCE** (ClientboundChunkBatchStartPacket) - A static instance of the packet. - **STREAM_CODEC** (StreamCodec) - The codec used for serializing and deserializing the packet. ### Constructors - **private ()** - Private constructor for the packet. ``` -------------------------------- ### ShulkerBulletModel Method Summary (Java) Source: https://mappings.dev/1.21.1/net/minecraft/client/model/ShulkerBulletModel Summarizes the methods available in the ShulkerBulletModel class, including static factory methods for creating layers and instance methods for setting up animations. ```java public static LayerDefinition b() public ModelPart a() public void a(T arg0, float arg1, float arg2, float arg3, float arg4, float arg5) ``` -------------------------------- ### Server Player Game Mode API Source: https://mappings.dev/1.21.1/net/minecraft/server/MinecraftServer Get the player's interaction manager. ```APIDOC ## POST /api/server/player/gamemode ### Description Retrieves the interaction manager for a given server player. ### Method POST ### Endpoint /api/server/player/gamemode ### Parameters #### Request Body - **player** (ServerPlayerEntity) - Required - The server player entity. ### Request Example ```json { "player": "" } ``` ### Response #### Success Response (200) - **interactionManager** (ServerPlayerGameMode) - The player's interaction manager. #### Response Example ```json { "interactionManager": {} } ``` ``` -------------------------------- ### TagsProvider Constructor Examples Source: https://mappings.dev/1.21.1/net/minecraft/data/tags/TagsProvider Demonstrates the constructors for the TagsProvider class. These constructors initialize the provider with necessary components like PackOutput, registry references, and futures for registry lookups and parent tag lookups. ```java protected TagsProvider(PackOutput output, ResourceKey> registryRef, CompletableFuture registryLookupFuture) protected TagsProvider(PackOutput output, ResourceKey> registryRef, CompletableFuture registryLookupFuture, CompletableFuture> parentTagLookupFuture) ``` -------------------------------- ### Create Advancement Provider with PackOutput and Lookup (Java) Source: https://mappings.dev/1.21.1/net/minecraft/data/advancements/packs/VanillaAdvancementProvider This static method is a factory for creating AdvancementProvider instances. It requires a PackOutput object and a CompletableFuture containing a HolderLookup.Provider. ```java public static AdvancementProvider a(mc arg0, CompletableFuture arg1) public static AdvancementProvider create(PackOutput arg0, CompletableFuture arg1) ``` -------------------------------- ### Create Dispatching MapCodec for Optional Values Source: https://mappings.dev/1.21.1/net/minecraft/util/ExtraCodecs This method creates a MapCodec that allows dispatching to different codecs based on a key. It takes keys for type and parameters, a codec for the type, a function to get the type from a value, and a function to get a codec for parameters based on the type. This is useful for handling complex data structures where the serialization format depends on the type of data being encoded. ```java public static com.mojang.serialization.MapCodec dispatchOptionalValue(String typeKey, String parametersKey, com.mojang.serialization.Codec typeCodec, Function typeGetter, Function> parametersCodecGetter) ``` ```java public static com.mojang.serialization.MapCodec method_54941(String arg0, String arg1, com.mojang.serialization.Codec arg2, Function arg3, Function> arg4) ``` ```java public static com.mojang.serialization.MapCodec parameters(String typeKey, String parametersKey, com.mojang.serialization.Codec typeCodec, Function typeGetter, Function> parametersCodecGetter) ``` ```java public static com.mojang.serialization.MapCodec m_306181_(String p_311089_, String p_310965_, com.mojang.serialization.Codec p_310912_, Function p_311760_, Function> p_312960_) ``` -------------------------------- ### Create Vanilla Advancement Provider (Java) Source: https://mappings.dev/1.21.1/net/minecraft/data/advancements/packs/VanillaAdvancementProvider This method creates a vanilla advancement provider, which is used for generating advancement data. It takes PackOutput and a CompletableFuture for RegistryWrapper$WrapperLookup as input. ```java public static AdvancementProvider createVanillaProvider(DataOutput output, CompletableFuture registryLookupFuture) { return create(new PackOutput(output.getPackId(), output.getSupplier()), registryLookupFuture); } ``` -------------------------------- ### Server Forced Game Type API Source: https://mappings.dev/1.21.1/net/minecraft/server/MinecraftServer Get the server's forced game type. ```APIDOC ## GET /api/server/gametype/forced ### Description Retrieves the server's forced game type or game mode. ### Method GET ### Endpoint /api/server/gametype/forced ### Parameters None ### Request Example None ### Response #### Success Response (200) - **forcedGameType** (GameType) - The forced game type. #### Response Example ```json { "forcedGameType": "SURVIVAL" } ``` ``` -------------------------------- ### BackUpIfTooClose Constructor and Static Method Source: https://mappings.dev/1.21.1/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose This snippet shows the default constructor for the BackUpIfTooClose behavior and a static factory method used to create instances of this behavior. The `create` method takes an integer distance and a float for forward movement as parameters. ```java public class BackUpIfTooClose extends Behavior { public BackUpIfTooClose() { // Constructor implementation } public static OneShot create(int distance, float forwardMovement) { // Factory method implementation return null; // Placeholder } } ``` -------------------------------- ### RealmsSelectFileToUploadScreen$Entry Constructor Source: https://mappings.dev/1.21.1/com/mojang/realmsclient/gui/screens/RealmsSelectFileToUploadScreen%24Entry The constructor for RealmsSelectFileToUploadScreen$Entry initializes a new entry with a reference to the parent screen and a LevelSummary object. This is used to represent a selectable file for upload. ```java public RealmsSelectFileToUploadScreen$Entry(RealmsSelectFileToUploadScreen p_89560_, LevelSummary summary) ```