### Get Examples Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/commands/arguments/ResourceArgument.html Returns a collection of example strings, likely for command usage or suggestions. ```APIDOC Collection getExamples() - Returns a collection of example strings. ``` -------------------------------- ### RecipeBookComponent Initialization Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.html Provides documentation for methods related to initializing and setting up the RecipeBookComponent, including its visual elements and dependencies. ```java public void init(int p_100310_, int p_100311_, Minecraft p_100312_, boolean p_100313_, RecipeBookMenu p_100314_) public void initVisuals() protected void initFilterButtonTextures() ``` -------------------------------- ### Getting Examples for ColumnPosArgument Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/commands/arguments/coordinates/ColumnPosArgument.html Returns a collection of example strings for the ColumnPosArgument. ```java public Collection getExamples() ``` -------------------------------- ### HTML Structure for Package Documentation Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/tutorial/package-summary.html Basic HTML structure for displaying package information, including navigation links and skip links. ```html [Skip navigation links](#skip-navbar-top "Skip navigation links") * [Overview](../../../../index.html) * Package * Class * [Tree](package-tree.html) * [Deprecated](../../../../deprecated-list.html) * [Index](../../../../index-all.html) * [Help](../../../../help-doc.html#package) * Package: * Description |  * [Related Packages](#related-package-summary) |  * [Classes and Interfaces](#class-summary) SEARCH: Package net.minecraft.client.tutorial ===================================== * * * @ParametersAreNonnullByDefault package net.minecraft.client.tutorial ``` -------------------------------- ### Minecraft GUI PresetsList Constructor and Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/PresetFlatWorldScreen.PresetsList.html Documentation for the `PresetsList` class, including its constructor and methods for setting selected entries. ```APIDOC PresetsList: __init__(RegistryAccess registryAccess, FeatureFlagSet featureFlagSet) Description: Constructs a new PresetsList. Parameters: registryAccess: Access to game registries. featureFlagSet: The set of enabled feature flags. setSelected(PresetsList.Entry entry) Description: Sets the currently selected entry in the list. Parameters: entry: The PresetsList.Entry to set as selected. ``` -------------------------------- ### Get Setup Ticks Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/gametest/framework/TestFunction.html Retrieves the setup ticks for the current context. This method is part of the core functionality. ```java public long getSetupTicks() ``` -------------------------------- ### PresetFlatWorldScreen.PresetsList.Entry Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/PresetFlatWorldScreen.PresetsList.Entry.html Provides documentation for the methods within the Entry class of PresetFlatWorldScreen.PresetsList, covering rendering, mouse interaction, selection, and UI blitting. ```java public void render(GuiGraphics p_283649_, int p_281641_, int p_281959_, int p_281428_, int p_282594_, int p_283493_, int p_283234_, int p_283185_, boolean p_282302_, float p_282855_) Specified by: render(net.minecraft.client.gui.GuiGraphics,int,int,int,int,int,int,int,boolean,float) in class net.minecraft.client.gui.components.AbstractSelectionList.Entry public boolean mouseClicked(double p_96481_, double p_96482_, int p_96483_) void select() private void blitSlot(GuiGraphics p_283196_, int p_282036_, int p_281683_, Item p_282242_) private void blitSlotBg(GuiGraphics p_281359_, int p_282978_, int p_283152_) public Component getNarration() Specified by: getNarration() in class net.minecraft.client.gui.components.ObjectSelectionList.Entry ``` -------------------------------- ### Get Examples for ArgumentType Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/commands/arguments/GameProfileArgument.html Retrieves example usages for a given argument type. This is crucial for providing helpful suggestions to users when they are typing commands. ```Java public interface ArgumentType { T parse(StringReader reader) throws CommandSyntaxException; Collection getExamples(); // ... other methods } ``` -------------------------------- ### Vec2Argument Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/commands/arguments/coordinates/Vec2Argument.html Contains methods for getting examples, parsing coordinates, and listing suggestions. ```java public Collection getExamples() public static Vec2 getVec2(com.mojang.brigadier.context.CommandContext p_120826_, String p_120827_) public CompletableFuture listSuggestions(com.mojang.brigadier.context.CommandContext p_120830_, SuggestionsBuilder p_120831_) public Coordinates parse(StringReader p_120824_) ``` -------------------------------- ### RealmsSelectFileToUploadScreen.Entry Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/com/mojang/realmsclient/gui/screens/RealmsSelectFileToUploadScreen.Entry.html Provides a summary of the methods available in the RealmsSelectFileToUploadScreen.Entry class, categorized into instance methods and concrete methods. ```java Component getNarrationIdentifier(); ``` -------------------------------- ### CraftPlanksTutorialStep Fields Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/tutorial/CraftPlanksTutorialStep.html Describes the static and instance fields of the CraftPlanksTutorialStep class, including HINT_DELAY, CRAFT_TITLE, CRAFT_DESCRIPTION, tutorial, toast, and timeWaiting. ```APIDOC HINT_DELAY: private static final int CRAFT_TITLE: private static final Component CRAFT_DESCRIPTION: private static final Component tutorial: private final Tutorial toast: private TutorialToast timeWaiting: private int ``` -------------------------------- ### NeutralMob Interface Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/world/entity/animal/IronGolem.html This section details methods specified by the NeutralMob interface, related to managing persistent anger timers and targets. These include starting the anger timer, setting and getting the remaining anger time, and setting and getting the target UUID. ```APIDOC startPersistentAngerTimer() Specified by: [startPersistentAngerTimer](../NeutralMob.html#startPersistentAngerTimer()) in interface [NeutralMob] Description: Starts the persistent anger timer for the mob. ``` ```APIDOC setRemainingPersistentAngerTime(int p_28859_) Specified by: [setRemainingPersistentAngerTime](../NeutralMob.html#setRemainingPersistentAngerTime(int)) in interface [NeutralMob] Description: Sets the remaining time for the persistent anger. ``` ```APIDOC getRemainingPersistentAngerTime() Specified by: [getRemainingPersistentAngerTime](../NeutralMob.html#getRemainingPersistentAngerTime()) in interface [NeutralMob] Description: Gets the remaining time for the persistent anger. ``` ```APIDOC setPersistentAngerTarget(@Nullable UUID p_28855_) Specified by: [setPersistentAngerTarget](../NeutralMob.html#setPersistentAngerTarget(java.util.UUID)) in interface [NeutralMob] Description: Sets the target UUID for persistent anger. ``` ```APIDOC getPersistentAngerTarget() Specified by: [getPersistentAngerTarget](../NeutralMob.html#getPersistentAngerTarget()) in interface [NeutralMob] Description: Gets the target UUID for persistent anger. ``` -------------------------------- ### Package Navigation and Initialization Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/tutorial/package-summary.html Includes JavaScript for dynamic table styling and navigation, along with package-level annotations. ```javascript var evenRowColor = "even-row-color"; var oddRowColor = "odd-row-color"; var tableTab = "table-tab"; var activeTableTab = "active-table-tab"; var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` -------------------------------- ### TestFunctionArgument Constructor and Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/gametest/framework/TestFunctionArgument.html This section details the constructor and various methods of the TestFunctionArgument class. It includes the parse method for parsing StringReader, a static method to get an instance of TestFunctionArgument, a static method to retrieve a TestFunction, a method for listing suggestions, and a method to get example strings. ```APIDOC TestFunctionArgument: __init__() Constructs a new TestFunctionArgument. parse(p_128090_: com.mojang.brigadier.StringReader) -> TestFunction Parses a StringReader to produce a TestFunction. Specified by: parse in interface com.mojang.brigadier.arguments.ArgumentType Throws: com.mojang.brigadier.exceptions.CommandSyntaxException testFunctionArgument() -> TestFunctionArgument Static method to get an instance of TestFunctionArgument. getTestFunction(p_128092_: com.mojang.brigadier.context.CommandContext, p_128093_: String) -> TestFunction Retrieves a TestFunction from a CommandContext. listSuggestions(p_128096_: com.mojang.brigadier.context.CommandContext, p_128097_: com.mojang.brigadier.suggestion.SuggestionsBuilder) -> CompletableFuture Provides suggestions for command completion. Specified by: listSuggestions in interface com.mojang.brigadier.arguments.ArgumentType getExamples() -> Collection Returns a collection of example strings for the argument type. Specified by: getExamples in interface com.mojang.brigadier.arguments.ArgumentType ``` ```java public TestFunctionArgument() public TestFunction parse(com.mojang.brigadier.StringReader p_128090_) throws com.mojang.brigadier.exceptions.CommandSyntaxException public static TestFunctionArgument testFunctionArgument() public static TestFunction getTestFunction(com.mojang.brigadier.context.CommandContext p_128092_, String p_128093_) public CompletableFuture listSuggestions(com.mojang.brigadier.context.CommandContext p_128096_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_128097_) public Collection getExamples() ``` -------------------------------- ### DimensionArgument Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/commands/arguments/DimensionArgument.html Details the methods available in the DimensionArgument class for command argument processing, including getting dimensions, examples, suggestions, and parsing. ```APIDOC Method Summary -------------- All MethodsStatic MethodsInstance MethodsConcrete Methods Modifier and Type Method Description `static [DimensionArgument](DimensionArgument.html "class in net.minecraft.commands.arguments")` `[dimension](#dimension())()` `static [ServerLevel](../../server/level/ServerLevel.html "class in net.minecraft.server.level")` `[getDimension](#getDimension(com.mojang.brigadier.context.CommandContext,java.lang.String))(com.mojang.brigadier.context.CommandContext<[CommandSourceStack](../CommandSourceStack.html "class in net.minecraft.commands")> p_88809_, [String](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html "class or interface in java.lang") p_88810_) `[Collection](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html "class or interface in java.util")<[String](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html "class or interface in java.lang")>` `[getExamples](#getExamples())()` ` [CompletableFuture](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/CompletableFuture.html "class or interface in java.util.concurrent")` `[listSuggestions](#listSuggestions(com.mojang.brigadier.context.CommandContext,com.mojang.brigadier.suggestion.SuggestionsBuilder))(com.mojang.brigadier.context.CommandContext p_88817_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_88818_) `[ResourceLocation](../../resources/ResourceLocation.html "class in net.minecraft.resources")` `[parse](#parse(com.mojang.brigadier.StringReader))(com.mojang.brigadier.StringReader p_88807_)` ``` -------------------------------- ### Initial JavaScript Setup Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/data/worldgen/BootstapContext.html This snippet shows the initial JavaScript variables and function calls typically found in a documentation page, setting up colors, table tabs, and script loading. ```javascript var evenRowColor = "even-row-color"; var oddRowColor = "odd-row-color"; var tableTab = "table-tab"; var activeTableTab = "active-table-tab"; var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` -------------------------------- ### JoinMultiplayerScreen Initialization and Lifecycle Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.html Provides documentation for the core lifecycle methods of JoinMultiplayerScreen: init for setup, tick for updates, and removed for cleanup. ```java protected void init() public void tick() public void removed() ``` -------------------------------- ### Item Usage Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/world/entity/LivingEntity.html Provides methods for starting, managing, and completing the use of an item by an entity. Includes getting item details and remaining ticks. ```java public void startUsingItem(InteractionHand p_21159_) public void completeUsingItem() public ItemStack getUseItem() public int getUseItemRemainingTicks() public int getTicksUsingItem() public void releaseUsingItem() public void stopUsingItem() ``` -------------------------------- ### DetailsList Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/CreateFlatWorldScreen.DetailsList.html Provides documentation for the concrete methods implemented in the DetailsList class. ```APIDOC DetailsList: getScrollbarPosition() protected int Returns the current position of the scrollbar. resetRows() void Resets the rows within the list. setSelected(net.minecraft.client.gui.screens.CreateFlatWorldScreen.DetailsList.Entry p_95855_) void Sets the currently selected entry in the list. Parameters: p_95855_: The entry to set as selected. ``` -------------------------------- ### Neutral Mob Anger Management Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/world/entity/animal/Wolf.html Methods for managing the persistent anger state of neutral mobs, including getting and setting the remaining anger time and starting the anger timer. ```Java public int getRemainingPersistentAngerTime() Specified by: `getRemainingPersistentAngerTime` in interface `NeutralMob` ``` ```Java public void setRemainingPersistentAngerTime(int p_30404_) Specified by: `setRemainingPersistentAngerTime` in interface `NeutralMob` ``` ```Java public void startPersistentAngerTimer() ``` -------------------------------- ### RecipeBookTabButton Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/recipebook/RecipeBookTabButton.html Details the methods available for the RecipeBookTabButton, including getting the category, rendering the button's icon and widget, starting animations, and updating visibility based on the client's recipe book state. ```APIDOC getCategory() - Returns the RecipeBookCategories associated with this button. - Returns: The RecipeBookCategories enum. renderIcon(GuiGraphics p_281802_, ItemRenderer p_282499_) - Renders the icon for the button. - Parameters: - p_281802_: The GuiGraphics object for rendering. - p_282499_: The ItemRenderer for rendering items. - Returns: void renderWidget(GuiGraphics p_283195_, int p_283508_, int p_281788_, float p_283269_) - Renders the entire widget, including its state and position. - Parameters: - p_283195_: The GuiGraphics object for rendering. - p_283508_: The X-coordinate for rendering. - p_281788_: The Y-coordinate for rendering. - p_283269_: The partial tick for animation smoothness. - Returns: void startAnimation(Minecraft p_100452_) - Initiates the button's animation sequence. - Parameters: - p_100452_: The Minecraft instance. - Returns: void updateVisibility(ClientRecipeBook p_100450_) - Updates the button's visibility based on the provided ClientRecipeBook state. - Parameters: - p_100450_: The ClientRecipeBook instance. - Returns: boolean - True if the visibility was updated, false otherwise. ``` -------------------------------- ### init Method Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/OptionsScreen.html Initializes the OptionsScreen, setting up its components and layout. ```java protected void init() ``` -------------------------------- ### WolfAvoidEntityGoal Java Example Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/world/entity/animal/Wolf.WolfAvoidEntityGoal.html A conceptual Java code snippet demonstrating how WolfAvoidEntityGoal might be used within a Wolf entity's AI goal setup. This is illustrative and based on typical modding patterns. ```java import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.ai.goal.AvoidEntityGoal; public class Wolf extends net.minecraft.world.entity.animal.Animal { // ... other Wolf class members ... protected void registerGoals() { // Example: Wolf avoids Skeletons within 10 blocks with a 5 block avoidance radius this.goalSelector.addGoal(3, new WolfAvoidEntityGoal<>(this, Skeleton.class, 10.0F, 1.2D, 2.0D)); // Example: Wolf avoids Zombies within 12 blocks with a 6 block avoidance radius this.goalSelector.addGoal(4, new WolfAvoidEntityGoal<>(this, Zombie.class, 12.0F, 1.4D, 2.4D)); } // ... rest of the Wolf class ... } ``` -------------------------------- ### CreateFlatWorldScreen Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/CreateFlatWorldScreen.html Provides documentation for the methods of the CreateFlatWorldScreen class, including settings retrieval, configuration updates, initialization, button updates, selection validation, closing the screen, and rendering. ```APIDOC CreateFlatWorldScreen: settings(): FlatLevelGeneratorSettings Returns the current flat world generator settings. setConfig(FlatLevelGeneratorSettings p_95826_): void Sets the flat world generator settings. init(): void Overrides: init() in Screen Initializes the screen's UI elements and components. updateButtonValidity(): void Updates the validity state of buttons within the screen. hasValidSelection(): boolean Checks if the current selection in the screen is valid. onClose(): void Overrides: onClose() in Screen Called when the screen is closed. render(GuiGraphics p_282393_, int p_95829_, int p_95830_, float p_95831_): void Specified by: render(net.minecraft.client.gui.GuiGraphics,int,int,float) in interface Renderable Overrides: render(net.minecraft.client.gui.GuiGraphics,int,int,float) in Screen Renders the screen and its components. ``` -------------------------------- ### IntProvider Constructor Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/util/valueproviders/IntProvider.html Describes the constructor for the IntProvider class. The constructor initializes a new instance of the IntProvider. ```APIDOC Constructor Summary: IntProvider() ``` -------------------------------- ### ColorArgument Class and Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/commands/arguments/ColorArgument.html API documentation for the ColorArgument class, which handles color parsing in command arguments. It includes methods for creating an instance, getting color values, parsing color strings, listing suggestions, and retrieving example values. ```APIDOC ColorArgument: Field Details: EXAMPLES: private static final Collection EXAMPLES - A collection of example string representations for color arguments. ERROR_INVALID_VALUE: public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_VALUE - Exception type for invalid color values. Constructor Details: ColorArgument(): private ColorArgument() - Private constructor for the ColorArgument class. Method Details: color(): public static ColorArgument color() - Returns a new instance of ColorArgument. getColor(CommandContext p_85467_, String p_85468_): public static ChatFormatting getColor(com.mojang.brigadier.context.CommandContext p_85467_, String p_85468_) - Retrieves the ChatFormatting enum value associated with a color argument from a command context. parse(StringReader p_85465_): public ChatFormatting parse(com.mojang.brigadier.StringReader p_85465_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Parses a color string from a StringReader and returns the corresponding ChatFormatting enum. - Specified by: parse in interface com.mojang.brigadier.arguments.ArgumentType - Throws: CommandSyntaxException if the color string is invalid. listSuggestions(CommandContext p_85473_, SuggestionsBuilder p_85474_): public CompletableFuture listSuggestions(com.mojang.brigadier.context.CommandContext p_85473_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_85474_) - Provides suggestions for color arguments based on the current command context and builder. - Specified by: listSuggestions in interface com.mojang.brigadier.arguments.ArgumentType getExamples(): public Collection getExamples() - Returns a collection of example strings for the color argument type. - Specified by: getExamples in interface com.mojang.brigadier.arguments.ArgumentType ``` -------------------------------- ### RealmsInviteScreen Constructor and Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/com/mojang/realmsclient/gui/screens/RealmsInviteScreen.html Details the constructor and key methods of the RealmsInviteScreen class, including initialization, input handling, and rendering. ```APIDOC RealmsInviteScreen: __init__(p_88703_: RealmsConfigureWorldScreen, p_88704_: Screen, p_88705_: RealmsServer) Initializes the RealmsInviteScreen with necessary screen and server objects. init() Initializes the screen's components and layout. keyPressed(p_88707_: int, p_88708_: int, p_88709_: int) -> boolean Handles key press events, returning true if the event was consumed. onInvite() Private method to handle the invitation logic. render(p_282206_: GuiGraphics, p_283415_: int, p_282016_: int, p_283011_: float) Renders the screen's GUI elements. showMessage(p_289685_: Component) Displays a message to the user. ``` -------------------------------- ### FleeSunGoal Constructor and Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/world/entity/ai/goal/FleeSunGoal.html Details the constructor and key methods of the FleeSunGoal class, including starting the goal, checking if it can be continued, checking if it can be used, getting a hiding position, and setting a wanted position. These methods control the entity's behavior when fleeing from the sun. ```java public class FleeSunGoal extends Goal { // ... fields ... public FleeSunGoal(PathfinderMob p_25221_, double p_25222_) { // Constructor implementation } @Override public boolean canContinueToUse() { // Implementation to check if the goal can continue return false; } @Override public boolean canUse() { // Implementation to check if the goal can be used return false; } protected Vec3 getHidePos() { // Implementation to get a hiding position return null; } protected boolean setWantedPos() { // Implementation to set a wanted position return false; } @Override public void start() { // Implementation to start the goal } } ``` -------------------------------- ### JavaScript Initialization Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/renderer/block/model/multipart/package-summary.html Initializes JavaScript variables for styling and navigation, and loads scripts. This is a common pattern for web page setup. ```javascript var evenRowColor = "even-row-color"; var oddRowColor = "odd-row-color"; var tableTab = "table-tab"; var activeTableTab = "active-table-tab"; var pathtoroot = "../../../../../../../"; loadScripts(document, 'script'); ``` -------------------------------- ### NbtPathArgument Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/commands/arguments/NbtPathArgument.html This section details the methods available in the NbtPathArgument class. It includes methods for creating tag predicates, getting examples, parsing NBT paths, and reading unquoted names. It also lists inherited methods from the Object class and the ArgumentType interface. ```APIDOC createTagPredicate(CompoundTag p_99511_): Predicate - Creates a tag predicate from a CompoundTag. getExamples(): Collection - Retrieves a collection of example NBT paths. getPath(CommandContext p_99499_, String p_99500_): NbtPathArgument.NbtPath - Gets the NbtPath from a command context. isAllowedInUnquotedName(char p_99489_): boolean - Checks if a character is allowed in an unquoted name. nbtPath(): NbtPathArgument - Returns an instance of NbtPathArgument. parse(StringReader p_99491_): NbtPathArgument.NbtPath - Parses an NbtPath from a StringReader. parseNode(StringReader p_99496_, boolean p_99497_): NbtPathArgument.Node - Parses a node within an NBT path. readObjectNode(StringReader p_99493_, String p_99494_): NbtPathArgument.Node - Reads an object node from a StringReader. readUnquotedName(StringReader p_99509_): String - Reads an unquoted name from a StringReader. Methods inherited from class java.lang.Object: clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Methods inherited from interface com.mojang.brigadier.arguments.ArgumentType: listSuggestions ``` -------------------------------- ### Entry Constructor and getServer Method Source: https://github.com/mcrib884/1.20.1docs/blob/main/com/mojang/realmsclient/RealmsMainScreen.Entry.html Provides details for the Entry constructor and the getServer method, which retrieves a RealmsServer object. ```APIDOC Entry: __init__() Constructor for the Entry class. getServer(): RealmsServer Retrieves the associated RealmsServer object. Returns: A RealmsServer object or null if not set. ``` -------------------------------- ### Start Class Constructor Source: https://github.com/mcrib884/1.20.1docs/blob/main/mcp/client/Start.html The default constructor for the Start class. It does not take any arguments. ```java public Start() ``` -------------------------------- ### Initialization Script Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/server/WorldLoader.InitConfig.html Basic JavaScript setup for table styling and navigation links. ```javascript var evenRowColor = "even-row-color"; var oddRowColor = "odd-row-color"; var tableTab = "table-tab"; var activeTableTab = "active-table-tab"; var pathtoroot = "../../../"; loadScripts(document, 'script'); ``` -------------------------------- ### Java Method Details: start Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/world/entity/animal/Dolphin.PlayWithItemsGoal.html The start method is called when the goal begins execution. It overrides the start method from the Goal class. ```APIDOC start(): public void Overrides: Goal.start() ``` -------------------------------- ### Function Argument Examples Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/commands/arguments/item/FunctionArgument.html Retrieves a collection of example strings for the Function argument type. This is useful for providing usage hints or examples to users. ```APIDOC getExamples() : Collection - Retrieves example strings for the Function argument. - Specified by: getExamples in interface com.mojang.brigadier.arguments.ArgumentType - Returns: A collection of example strings. ``` -------------------------------- ### ShareToLanScreen Method Details Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/ShareToLanScreen.html Details of the key methods within the ShareToLanScreen class, including initialization, port parsing, and rendering. ```APIDOC ShareToLanScreen Methods: init(): void - Initializes the screen, setting up UI elements and event handlers. - Overrides: Screen.init() tryParsePort(String portString): Component | null - Attempts to parse a string into a valid port number. - Returns: A Component representing the parsed port if valid, or null if invalid. - Parameters: - portString: The string to parse as a port number. render(GuiGraphics graphics, int mouseX, int mouseY, float partialTicks): void - Renders the ShareToLanScreen GUI. - Specified by: Renderable.render - Overrides: Screen.render - Parameters: - graphics: The GuiGraphics object for rendering. - mouseX: The current X coordinate of the mouse. - mouseY: The current Y coordinate of the mouse. - partialTicks: The fraction of the current tick that has elapsed. ``` -------------------------------- ### InitConfig Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/server/WorldLoader.InitConfig.html Documentation for the toString, hashCode, and equals methods of the InitConfig class. ```APIDOC toString(): String Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. Specified by: toString in class Record Returns: a string representation of this object hashCode(): int Returns a hash code value for this object. The value is derived from the hash code of each of the record components. Specified by: hashCode in class Record Returns: a hash code value for this object equals(Object o): boolean Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='. Specified by: equals in class Record ``` -------------------------------- ### Java Method Details: start Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.html The start method is called when the goal becomes active. It overrides the start method from the TargetGoal class. ```APIDOC start(): void - Called when the goal is activated. - Overrides: TargetGoal.start() ``` -------------------------------- ### Tutorial Class Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/tutorial/Tutorial.html Lists and describes the methods available in the Tutorial class, covering actions like adding toasts, retrieving Minecraft instance, checking survival mode, creating keys, and handling game events. ```APIDOC Method Summary: All MethodsStatic MethodsInstance MethodsConcrete Methods Modifier and Type Method Description `void` `[addTimedToast(TutorialToast p_120573_, int p_120574_)]()` Adds a timed toast to the tutorial display with a specified duration. `Minecraft` `[getMinecraft()]()` Returns the Minecraft instance associated with this tutorial. `boolean` `[isSurvival()]()` Checks if the current game mode is survival. `static Component` `[key(String p_120593_)]()` Creates a translatable component for a given key string. `void` `[onDestroyBlock(ClientLevel p_120582_, BlockPos p_120583_, BlockState p_120584_, float p_120585_)]()` Handles the event when a block is destroyed. `void` `[onGetItem(ItemStack p_120569_)]()` Handles the event when an item is obtained. `void` `[onInput(Input p_120587_)]()` Handles player input events. ``` -------------------------------- ### RestrictSunGoal start Method Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/world/entity/ai/goal/RestrictSunGoal.html Starts the AI goal's execution. This method overrides the start method from the base Goal class. ```Java public void start() Overrides: start(Goal.html#start()) in class Goal(Goal.html "class in net.minecraft.world.entity.ai.goal") ``` -------------------------------- ### Field Details: EXAMPLES Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/gametest/framework/TestFunctionArgument.html Details for the static final field EXAMPLES, which is a Collection of Strings. This field likely holds example values or usage patterns for the TestFunctionArgument. ```APIDOC EXAMPLES: Type: Collection Modifiers: private static final Description: Holds example strings for the TestFunctionArgument. ``` -------------------------------- ### PresetFlatWorldScreen.PresetsList Initialization Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/PresetFlatWorldScreen.PresetsList.html Initializes the PresetFlatWorldScreen.PresetsList with necessary variables for UI elements and script loading. It sets up colors, table tabs, and the path to root resources. ```javascript var evenRowColor = "even-row-color"; var oddRowColor = "odd-row-color"; var tableTab = "table-tab"; var activeTableTab = "active-table-tab"; var pathtoroot = "../../../.."; loadScripts(document, 'script'); ``` -------------------------------- ### CreateFlatWorldScreen Constructor and Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/CreateFlatWorldScreen.html Details the constructor and key methods of the CreateFlatWorldScreen class, including initialization, rendering, and configuration updates. ```APIDOC CreateFlatWorldScreen Constructor: CreateFlatWorldScreen(CreateWorldScreen p_95822_, Consumer p_95823_, FlatLevelGeneratorSettings p_95824_) - Parameters: - p_95822_: The parent CreateWorldScreen. - p_95823_: A Consumer for FlatLevelGeneratorSettings. - p_95824_: The initial FlatLevelGeneratorSettings. Methods: hasValidSelection(): boolean - Returns true if the current selection is valid. init(): void - Initializes the screen's components. onClose(): void - Called when the screen is closed. render(GuiGraphics p_282393_, int p_95829_, int p_95830_, float p_95831_): void - Renders the screen. - Parameters: - p_282393_: The GuiGraphics object for rendering. - p_95829_: The mouse X position. - p_95830_: The mouse Y position. - p_95831_: The partial tick delta. setConfig(FlatLevelGeneratorSettings p_95826_): void - Sets the FlatLevelGeneratorSettings for the screen. settings(): FlatLevelGeneratorSettings - Returns the current FlatLevelGeneratorSettings. updateButtonValidity(): void - Updates the validity state of buttons within the screen. ``` -------------------------------- ### Java Method: start Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/world/entity/ai/goal/target/OwnerHurtByTargetGoal.html The public void method 'start' which overrides the 'start' method in the TargetGoal class. It is responsible for initiating the AI goal's behavior. ```java public void start() Overrides: start() in class TargetGoal ``` -------------------------------- ### Screen Class Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/com/mojang/realmsclient/gui/screens/RealmsSettingsScreen.html Documentation for methods within the Screen class, including initialization, key press handling, and rendering. ```APIDOC Screen: init() Initializes the screen. keyPressed(int p_89833_, int p_89834_, int p_89835_) Handles key press events. Specified by: keyPressed in interface ContainerEventHandler Specified by: keyPressed in interface GuiEventListener Overrides: keyPressed in class Screen render(GuiGraphics p_283580_, int p_281307_, int p_282074_, float p_282669_) Renders the screen. Specified by: render in interface Renderable Overrides: render in class Screen save() Saves the current state of the screen. ``` -------------------------------- ### MobEffectTextureManager Constructor and Get Method Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/resources/MobEffectTextureManager.html This documentation covers the MobEffectTextureManager class, including its constructor and the get method. The constructor initializes the manager with a TextureManager, and the get method retrieves a TextureAtlasSprite for a given MobEffect. ```APIDOC MobEffectTextureManager API: Constructor: MobEffectTextureManager(TextureManager p_118730_) - Initializes the MobEffectTextureManager with a TextureManager. Method: get(MobEffect p_118733_): TextureAtlasSprite - Retrieves the TextureAtlasSprite associated with the given MobEffect. - Parameters: - p_118733_: The MobEffect for which to get the texture. ``` -------------------------------- ### Package Overview and Navigation Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/narration/package-summary.html Provides an overview of the net.minecraft.client.gui.narration package and navigation links to related documentation. ```html Package net.minecraft.client.gui.narration Overview Package Classes and Interfaces ``` -------------------------------- ### Floats EXAMPLES Field Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/commands/arguments/RangeArgument.Floats.html Declaration of the static final EXAMPLES field within the Floats class. This field holds a Collection of Strings, likely used for providing usage examples for the Floats argument type. ```APIDOC EXAMPLES: Collection ``` -------------------------------- ### Java Code Example for UpdateNameOperation Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/network/protocol/game/ClientboundBossEventPacket.UpdateNameOperation.html Example demonstrating the usage of ClientboundBossEventPacket.UpdateNameOperation in Java for Minecraft modding. ```java var evenRowColor = "even-row-color"; var oddRowColor = "odd-row-color"; var tableTab = "table-tab"; var activeTableTab = "active-table-tab"; var pathtoroot = "../../../.."; loadScripts(document, 'script'); ``` -------------------------------- ### Minecraft Tutorial Constructor Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/tutorial/Tutorial.html Constructor for the Tutorial class, initializing the tutorial system with necessary client components. ```APIDOC Tutorial(Minecraft p_175022_, Options p_175023_) - Initializes the Tutorial system. - Parameters: - p_175022_: The Minecraft client instance. - p_175023_: The game options. ``` -------------------------------- ### GlStateManager Shader Fog Start Source: https://github.com/mcrib884/1.20.1docs/blob/main/com/mojang/blaze3d/systems/RenderSystem.html Sets and retrieves the start distance for shader fog. Includes public and private methods. ```Java public static void setShaderFogStart(float p_157446_) private static void _setShaderFogStart(float p_157172_) public static float getShaderFogStart() ``` -------------------------------- ### ShareToLanScreen Constructor and Methods Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/screens/ShareToLanScreen.html Details the constructor for ShareToLanScreen and its core methods, including initialization and rendering. It also includes a utility method for parsing network ports. ```APIDOC ShareToLanScreen: __init__(Screen p_96650_) Initializes the ShareToLanScreen with a parent screen. init() Protected method to initialize the screen. render(GuiGraphics p_281738_, int p_96653_, int p_96654_, float p_96655_) Renders the screen with the provided GuiGraphics and coordinates. tryParsePort(String p_259426_) Private method to attempt parsing a port number from a string. ``` -------------------------------- ### Packet Handling Example (Java) Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/network/protocol/game/ClientboundChunksBiomesPacket.html Example of how a packet might be handled in Java, implementing the Packet interface. ```Java import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ClientGamePacketListener; public class MyPacket implements Packet { @Override public void write(FriendlyByteBuf buf) { // Implementation to write packet data } @Override public void handle(ClientGamePacketListener listener) { // Implementation to handle the packet } // Other methods like toString, hashCode, equals would be implemented here or inherited from Record } ``` -------------------------------- ### RealmsSubscriptionInfoScreen Constructor Source: https://github.com/mcrib884/1.20.1docs/blob/main/com/mojang/realmsclient/gui/screens/RealmsSubscriptionInfoScreen.html Provides documentation for the constructor of the RealmsSubscriptionInfoScreen class. It takes previous screen, server data, and main screen as parameters, likely to initialize the screen's state and context. ```java public RealmsSubscriptionInfoScreen(Screen p_89979_, RealmsServer p_89980_, Screen p_89981_) ``` -------------------------------- ### Initialization Script Source: https://github.com/mcrib884/1.20.1docs/blob/main/com/mojang/realmsclient/gui/screens/RealmsBackupScreen.Entry.html This JavaScript code initializes variables for styling and script loading, commonly used in web-based documentation or interfaces. ```javascript var evenRowColor = "even-row-color"; var oddRowColor = "odd-row-color"; var tableTab = "table-tab"; var activeTableTab = "active-table-tab"; var pathtoroot = "../../../.."; loadScripts(document, 'script'); ``` -------------------------------- ### MapRenderer.MapInstance Initialization Example Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/client/gui/MapRenderer.MapInstance.html A basic example of how to initialize a MapInstance in Java, assuming the necessary classes are imported. ```java import net.minecraft.client.gui.MapRenderer; import net.minecraft.world.level.saveddata.maps.MapItemSavedData; // Assuming 'mapData' is an instance of MapItemSavedData and 'mapId' is an integer // MapItemSavedData mapData = ...; // int mapId = ...; // MapRenderer.MapInstance mapInstance = new MapRenderer.MapInstance(mapId, mapData); ``` -------------------------------- ### RealmsBackupScreen Constructor Source: https://github.com/mcrib884/1.20.1docs/blob/main/com/mojang/realmsclient/gui/screens/RealmsBackupScreen.Entry.html Details the constructor for the RealmsBackupScreen class, used for initializing a new instance with backup data. ```APIDOC Entry(Backup p_88250_) Constructs a new Entry with the specified Backup object. ``` -------------------------------- ### ItemPredicate Builder Example Source: https://github.com/mcrib884/1.20.1docs/blob/main/net/minecraft/advancements/critereon/ItemPredicate.Builder.html Example of how to use the ItemPredicate.Builder to create a predicate for a specific item with certain conditions. ```java ItemPredicate.Builder builder = ItemPredicate.Builder.item(); builder.of(Items.DIAMOND_SWORD); builder.hasDurability(new MinMaxBounds.Ints(0.5F, 1.0F)); builder.hasEnchantment(new EnchantmentPredicate(Enchantments.SHARPNESS, MinMaxBounds.Ints.atLeast(3))); ItemPredicate predicate = builder.build(); ```