[1.17.x Omnibus] Fix typos and javadocs across code base (#8144)

This commit is contained in:
sciwhiz12 authored and GitHub committed 2021-11-25 13:09:56 -08:00
1 parent df8954869a
commit b4feee8046
163 files changed
+708 -454

No files matched your search

@@ -20,13 +20,16 @@
package net.minecraftforge.client.event;
import com.google.common.base.Strings;
import net.minecraft.client.gui.screens.Screen;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
/**
* ClientChatEvent is fired whenever the client is about to send a chat message or command to the server. <br>
* This event is fired via {@link ForgeEventFactory#onClientSendMessage(String)},
* which is executed by {@link GuiScreen#sendChatMessage(String, boolean)}<br>
* which is executed by {@link Screen#sendMessage(String, boolean)}<br>
* <br>
* {@link #message} contains the message that will be sent to the server. This can be changed by mods.<br>
* {@link #originalMessage} contains the original message that was going to be sent to the server. This cannot be changed by mods.<br>
@@ -64,7 +64,7 @@ public class ClientChatReceivedEvent extends Event
/**
* The UUID of the player or entity that sent this message, or null if not known.
* This will be equal to {@link net.minecraft.util.Util#DUMMY_UUID} for system messages.
* This will be equal to {@link net.minecraft.Util#NIL_UUID} for system messages.
*/
@Nullable
public UUID getSenderUUID()
+26 -25
View File
@@ -24,15 +24,16 @@ import java.util.List;
import java.util.function.Consumer;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.gui.components.Widget;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.components.events.GuiEventListener;
import net.minecraft.client.gui.screens.inventory.EffectRenderingInventoryScreen;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraft.client.gui.components.AbstractWidget;
import net.minecraft.client.gui.screens.Screen;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
import org.lwjgl.glfw.GLFW;
/**
* Event classes for GuiScreen events.
@@ -91,10 +92,10 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires just after initializing {@link GuiScreen#mc}, {@link GuiScreen#fontRenderer},
* {@link GuiScreen#width}, and {@link GuiScreen#height}.<br/><br/>
* This event fires just after initializing the {@link Minecraft}, font renderer, width,
* and height fields.<br/><br/>
*
* If canceled the following lines are skipped in {@link GuiScreen#setWorldAndResolution(Minecraft, int, int)}:<br/>
* If canceled the following lines are skipped in {@link Screen#init(Minecraft, int, int)}:<br/>
* {@code this.buttonList.clear();}<br/>
* {@code this.children.clear();}<br/>
* {@code this.initGui();}<br/>
@@ -109,7 +110,7 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires right after {@link GuiScreen#initGui()}.
* This event fires right after {@code Screen#init()}.
* This is a good place to alter a GuiScreen's component layout if desired.
*/
public static class Post extends InitGuiEvent
@@ -170,8 +171,8 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires just before {@link GuiScreen#render(int, int, float)} is called.
* Cancel this event to skip {@link GuiScreen#render(int, int, float)}.
* This event fires just before {@link Screen#render(PoseStack, int, int, float)} is called.
* Cancel this event to skip the render method.
*/
@Cancelable
public static class Pre extends DrawScreenEvent
@@ -183,7 +184,7 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires just after {@link GuiScreen#render(int, int, float)} is called.
* This event fires just after {@link Screen#render(PoseStack, int, int, float)} is called.
*/
public static class Post extends DrawScreenEvent
{
@@ -195,7 +196,7 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires at the end of {@link GuiScreen#drawBackground(int)} and before the rest of the Gui draws.
* This event fires at the end of {@link Screen#renderBackground(PoseStack, int)} and before the rest of the Gui draws.
* This allows drawing next to Guis, above the background but below any tooltips.
*/
public static class BackgroundDrawnEvent extends GuiScreenEvent
@@ -218,8 +219,8 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires in {@link InventoryEffectRenderer#updateActivePotionEffects()}
* when potion effects are active and the gui wants to move over.
* This event fires in {@link EffectRenderingInventoryScreen} in the
* {@code checkEffectRendering} method when potion effects are active and the gui wants to move over.
* Cancel this event to prevent the Gui from being moved.
*/
@Cancelable
@@ -271,7 +272,7 @@ public class GuiScreenEvent extends Event
/**
* This event fires when a mouse click is detected for a GuiScreen, before it is handled.
* Cancel this event to bypass {@link IGuiEventListener#mouseClicked(double, double, int)}.
* Cancel this event to bypass {@link GuiEventListener#mouseClicked(double, double, int)}.
*/
@Cancelable
public static class Pre extends MouseClickedEvent
@@ -345,7 +346,7 @@ public class GuiScreenEvent extends Event
/**
* This event fires when a mouse release is detected for a GuiScreen, before it is handled.
* Cancel this event to bypass {@link IGuiEventListener#mouseReleased(double, double, int)}.
* Cancel this event to bypass {@link GuiEventListener#mouseReleased(double, double, int)}.
*/
@Cancelable
public static class Pre extends MouseReleasedEvent
@@ -433,7 +434,7 @@ public class GuiScreenEvent extends Event
/**
* This event fires when a mouse drag is detected for a GuiScreen, before it is handled.
* Cancel this event to bypass {@link IGuiEventListener#mouseDragged(double, double, int, double, double)}.
* Cancel this event to bypass {@link GuiEventListener#mouseDragged(double, double, int, double, double)}.
*/
@Cancelable
public static class Pre extends MouseDragEvent
@@ -445,7 +446,7 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires after {@link IGuiEventListener#mouseDragged(double, double, int, double, double)} if the drag was not already handled.
* This event fires after {@link GuiEventListener#mouseDragged(double, double, int, double, double)} if the drag was not already handled.
* Cancel this event when you successfully use the mouse drag, to prevent other handlers from using the same input.
*/
@Cancelable
@@ -475,7 +476,7 @@ public class GuiScreenEvent extends Event
/**
* This event fires when a mouse scroll is detected for a GuiScreen, before it is handled.
* Cancel this event to bypass {@link IGuiEventListener#mouseScrolled(double)}.
* Cancel this event to bypass {@link GuiEventListener#mouseScrolled(double, double, double)}.
*/
@Cancelable
public static class Pre extends MouseScrollEvent
@@ -487,7 +488,7 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires after {@link IGuiEventListener#mouseScrolled(double)} if the scroll was not already handled.
* This event fires after {@link GuiEventListener#mouseScrolled(double, double, double)} if the scroll was not already handled.
* Cancel this event when you successfully use the mouse scroll, to prevent other handlers from using the same input.
*/
@Cancelable
@@ -527,7 +528,7 @@ public class GuiScreenEvent extends Event
/**
* Platform-specific scan code.
* Used for {@link InputMappings#getInputByCode(int, int)}
* Used for {@link com.mojang.blaze3d.platform.InputConstants#getKey(int, int)}
*
* The scan code is unique for every key, regardless of whether it has a key code.
* Scan codes are platform-specific but consistent over time, so keys will have different scan codes depending
@@ -562,7 +563,7 @@ public class GuiScreenEvent extends Event
/**
* This event fires when keyboard input is detected for a GuiScreen, before it is handled.
* Cancel this event to bypass {@link IGuiEventListener#keyPressed(int, int, int)}.
* Cancel this event to bypass {@link GuiEventListener#keyPressed(int, int, int)}.
*/
@Cancelable
public static class Pre extends KeyboardKeyPressedEvent
@@ -574,7 +575,7 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires after {@link IGuiEventListener#keyPressed(int, int, int)} if the key was not already handled.
* This event fires after {@link GuiEventListener#keyPressed(int, int, int)} if the key was not already handled.
* Cancel this event when you successfully use the keyboard input to prevent other handlers from using the same input.
*/
@Cancelable
@@ -596,7 +597,7 @@ public class GuiScreenEvent extends Event
/**
* This event fires when keyboard input is detected for a GuiScreen, before it is handled.
* Cancel this event to bypass {@link IGuiEventListener#keyReleased(int, int, int)}.
* Cancel this event to bypass {@link GuiEventListener#keyReleased(int, int, int)}.
*/
@Cancelable
public static class Pre extends KeyboardKeyReleasedEvent
@@ -608,7 +609,7 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires after {@link IGuiEventListener#keyReleased(int, int, int)} if the key was not already handled.
* This event fires after {@link GuiEventListener#keyReleased(int, int, int)} if the key was not already handled.
* Cancel this event when you successfully use the keyboard input to prevent other handlers from using the same input.
*/
@Cancelable
@@ -656,7 +657,7 @@ public class GuiScreenEvent extends Event
/**
* This event fires when keyboard character input is detected for a GuiScreen, before it is handled.
* Cancel this event to bypass {@link IGuiEventListener#charTyped(char, int)}.
* Cancel this event to bypass {@link GuiEventListener#charTyped(char, int)}.
*/
@Cancelable
public static class Pre extends KeyboardCharTypedEvent
@@ -668,7 +669,7 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires after {@link IGuiEventListener#charTyped(char, int)} if the character was not already handled.
* This event fires after {@link GuiEventListener#charTyped(char, int)} if the character was not already handled.
* Cancel this event when you successfully use the keyboard input to prevent other handlers from using the same input.
*/
@Cancelable
@@ -19,10 +19,12 @@
package net.minecraftforge.client.event;
import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.KeyMapping;
import net.minecraft.world.InteractionHand;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
import org.lwjgl.glfw.GLFW;
public class InputEvent extends Event
{
@@ -215,7 +217,7 @@ public class InputEvent extends Event
/**
* Platform-specific scan code.
* Used for {@link InputMappings#getInputByCode(int, int)}
* Used for {@link InputConstants#getKey(int, int)}
*
* The scan code is unique for every key, regardless of whether it has a key code.
* Scan codes are platform-specific but consistent over time, so keys will have different scan codes depending
@@ -25,7 +25,7 @@ import net.minecraftforge.event.entity.player.PlayerEvent;
/**
* This event is fired after player movement inputs are updated.<br>
* Handlers can freely manipulate {@link MovementInput} to cancel movement.<br>
* Handlers can freely manipulate {@link Input} to cancel movement.<br>
*/
public class InputUpdateEvent extends PlayerEvent
{
@@ -19,11 +19,14 @@
package net.minecraftforge.client.event;
import net.minecraft.client.particle.ParticleEngine;
import net.minecraft.client.particle.ParticleProvider;
import net.minecraft.core.particles.ParticleType;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.fml.event.IModBusEvent;
/**
* Fired when you should call {@link net.minecraft.client.particle.ParticleManager#registerFactory}.
* Fired when you should call {@link ParticleEngine#register(ParticleType, ParticleProvider)}.
* Note that your {@code ParticleType}s should still be registered during the usual registry events, this
* is only for the factories.
*/
@@ -20,6 +20,7 @@
package net.minecraftforge.client.event;
import net.minecraft.world.item.crafting.RecipeManager;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.Event;
/**
@@ -148,7 +148,7 @@ public class RenderGameOverlayEvent extends Event
}
/**
* @return The {@link ClientBossInfo} currently being rendered
* @return The {@link LerpingBossEvent} currently being rendered
*/
public LerpingBossEvent getBossInfo()
{
@@ -24,6 +24,7 @@ import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.world.entity.Entity;
import net.minecraft.network.chat.Component;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.EntityEvent;
import net.minecraftforge.eventbus.api.Event;
@@ -44,7 +45,7 @@ import net.minecraftforge.eventbus.api.Event;
* <br>
* This event has a result. {@link HasResult}. <br>
* ALLOW will force-render name plate/tag, DEFAULT will ignore the hook and continue using the vanilla check
* & DENY will prevent name plate/tag from rendering<br>
* and DENY will prevent name plate/tag from rendering<br>
* <br>
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
**/
@@ -35,7 +35,7 @@ import java.io.IOException;
*
* {@link #screenshotFile} contains the file the screenshot will be/was saved to
* {@link #image} contains the {@link NativeImage} that will be saved
* {@link #resultMessage} contains the {@link ITextComponent} to be returned. If {@code null}, the default vanilla message will be used instead
* {@link #resultMessage} contains the {@link Component} to be returned. If {@code null}, the default vanilla message will be used instead
*/
@Cancelable
public class ScreenshotEvent extends Event