[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

@@ -24,7 +24,8 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
/**
* Call {@link net.minecraft.client.world.DimensionRenderInfo#setCloudRenderHandler(ICloudRenderHandler)}, obtained from a {@link ClientWorld} with an implementation of this to override all cloud rendering with your own.
* Call {@link net.minecraft.client.renderer.DimensionSpecialEffects#setCloudRenderHandler(ICloudRenderHandler)},
* obtained from a {@link ClientLevel} with an implementation of this to override all cloud rendering with your own.
* This is only responsible for rendering clouds.
*/
@FunctionalInterface
@@ -24,7 +24,8 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
/**
* Call {@link net.minecraft.client.world.DimensionRenderInfo#setSkyRenderHandler(ISkyRenderHandler)}, obtained from a {@link ClientWorld} with an implementation of this to override all sky rendering with your own.
* Call {@link net.minecraft.client.renderer.DimensionSpecialEffects#setSkyRenderHandler(ISkyRenderHandler)}, obtained
* from a {@link ClientLevel} with an implementation of this to override all sky rendering with your own.
* This includes the sun, moon, stars, and sky-coloring.
*/
@FunctionalInterface
@@ -24,7 +24,8 @@ import net.minecraft.client.Camera;
import net.minecraft.client.multiplayer.ClientLevel;
/**
* Call {@link net.minecraft.client.world.DimensionRenderInfo#setWeatherParticleRenderHandler(net.minecraftforge.client.IWeatherParticleRenderHandler)}, obtained from a {@link ClientWorld} with an implementation of this to override all weather particle rendering with your own.
* Call {@link net.minecraft.client.renderer.DimensionSpecialEffects#setWeatherParticleRenderHandler(IWeatherParticleRenderHandler)},
* obtained from a {@link ClientLevel} with an implementation of this to override all weather particle rendering with your own.
* This handles ground particles that can be seen when it's raining (splash/smoke particles).
* This also includes playing rain sounds.
*/
@@ -24,7 +24,8 @@ import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.multiplayer.ClientLevel;
/**
* Call {@link net.minecraft.client.world.DimensionRenderInfo#setWeatherRenderHandler(IWeatherRenderHandler)}, obtained from a {@link ClientWorld} with an implementation of this to override all weather rendering with your own.
* Call {@link net.minecraft.client.renderer.DimensionSpecialEffects#setWeatherRenderHandler(IWeatherRenderHandler)},
* obtained from a {@link ClientLevel} with an implementation of this to override all weather rendering with your own.
* This includes rain and snow.
*/
@FunctionalInterface
@@ -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
@@ -30,7 +30,7 @@ public interface IForgeRenderChunk
* Extending classes can change the behavior of the cache, allowing to visually change
* blocks (schematics etc).
*
* @see RegionRenderCache
* @see RenderChunkRegion
* @param world The world to cache.
* @param from The starting position of the chunk minus one on each axis.
* @param to The ending position of the chunk plus one on each axis.
@@ -24,7 +24,7 @@ import com.mojang.math.Transformation;
import net.minecraft.client.resources.model.ModelState;
/**
* An {@link IModelTransform} that combines the transforms from two child {@link IModelTransform}.
* An {@link ModelState} that combines the transforms from two child {@link ModelState}.
*/
public class CompositeModelState implements ModelState
{
@@ -25,6 +25,7 @@ import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonObject;
import com.mojang.datafixers.util.Pair;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.block.model.ItemModelGenerator;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import com.mojang.blaze3d.vertex.VertexFormat;
import com.mojang.blaze3d.vertex.VertexFormatElement;
@@ -55,7 +56,7 @@ import net.minecraft.client.resources.model.UnbakedModel;
/**
* Forge reimplementation of vanilla {@link ItemModelGenerator}, i.e. builtin/generated models,
* with the following changes:
* - Represented as a true {@link IUnbakedModel} so it can be baked as usual instead of using
* - Represented as a true {@link UnbakedModel} so it can be baked as usual instead of using
* special-case logic like vanilla does.
* - Various fixes in the baking logic.
* - Not limited to 4 layers maximum.
@@ -44,7 +44,7 @@ public final class ItemTextureQuadConverter
* Takes a texture and converts it into BakedQuads.
* The conversion is done by scanning the texture horizontally and vertically and creating "strips" of the texture.
* Strips that are of the same size and follow each other are converted into one bigger quad.
* </br>
* <br/>
* The resulting list of quads is the texture represented as a list of horizontal OR vertical quads,
* depending on which creates less quads. If the amount of quads is equal, horizontal is preferred.
*
@@ -35,6 +35,7 @@ import net.minecraft.core.Direction;
import net.minecraft.util.GsonHelper;
import net.minecraft.resources.ResourceLocation;
import com.mojang.math.Transformation;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.model.geometry.IModelGeometry;
import net.minecraftforge.client.model.geometry.ISimpleModelGeometry;
import net.minecraftforge.client.model.obj.OBJLoader;
@@ -97,7 +98,7 @@ public class ModelLoaderRegistry
// Minecraft recreates the ModelBakery on resource reload, but this should only run once during init.
if (!registryFrozen)
{
net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.ModelRegistryEvent());
net.minecraftforge.fml.ModLoader.get().postEvent(new ModelRegistryEvent());
registryFrozen = true;
}
}
@@ -45,7 +45,7 @@ import net.minecraftforge.common.property.Properties;
import net.minecraftforge.common.util.LazyOptional;
/**
* Generic {@link TileGameRenderer} that works with the Forge model system and animations.
* Generic {@link BlockEntityRenderer} that works with the Forge model system and animations.
*/
public class AnimationBlockEntityRenderer<T extends BlockEntity> implements BlockEntityRenderer<T>, IEventHandler<T>
{
@@ -31,7 +31,7 @@ import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.core.Direction;
/**
* Convenience interface with default implementation of {@link IBakedModel#getQuads(net.minecraft.block.BlockState, net.minecraft.util.Direction, java.util.Random)}.
* Convenience interface with default implementation of {@link BakedModel#getQuads(BlockState, Direction, Random, IModelData)}.
*/
public interface IDynamicBakedModel extends BakedModel
{
@@ -93,7 +93,7 @@ public final class ConfiguredModel {
*
* @throws NullPointerException if {@code model} is {@code null}
* @throws IllegalArgumentException if x and/or y rotation are not valid (see
* {@link ModelRotation})
* {@link BlockModelRotation})
* @throws IllegalArgumentException if weight is less than or equal to zero
*/
public ConfiguredModel(ModelFile model, int rotationX, int rotationY, boolean uvLock, int weight) {
@@ -118,7 +118,7 @@ public final class ConfiguredModel {
*
* @throws NullPointerException if {@code model} is {@code null}
* @throws IllegalArgumentException if x and/or y rotation are not valid (see
* {@link ModelRotation})
* {@link BlockModelRotation})
*/
public ConfiguredModel(ModelFile model, int rotationX, int rotationY, boolean uvLock) {
this(model, rotationX, rotationY, uvLock, DEFAULT_WEIGHT);
@@ -228,7 +228,7 @@ public final class ConfiguredModel {
* @param value the x-rotation value
* @return this builder
* @throws IllegalArgumentException if {@code value} is not a valid x-rotation
* (see {@link ModelRotation})
* (see {@link BlockModelRotation})
*/
public Builder<T> rotationX(int value) {
checkRotation(value, rotationY);
@@ -242,7 +242,7 @@ public final class ConfiguredModel {
* @param value the y-rotation value
* @return this builder
* @throws IllegalArgumentException if {@code value} is not a valid y-rotation
* (see {@link ModelRotation})
* (see {@link BlockModelRotation})
*/
public Builder<T> rotationY(int value) {
checkRotation(rotationX, value);
@@ -137,7 +137,7 @@ public class VariantBlockStateBuilder implements IGeneratedBlockstate {
*
* @param state The {@link PartialBlockstate partial state} for which to set
* the models
* @param models A set of models to assign to this state
* @param model A set of models to assign to this state
* @return this builder
* @throws IllegalArgumentException if {@code state} has already been configured
* @see #addModels(PartialBlockstate, ConfiguredModel...)
@@ -38,7 +38,7 @@ import net.minecraft.client.resources.model.ModelState;
import net.minecraft.client.resources.model.UnbakedModel;
/**
* General interface for any model that can be baked, superset of vanilla {@link net.minecraft.client.renderer.model.IUnbakedModel}.
* General interface for any model that can be baked, superset of vanilla {@link UnbakedModel}.
* Models can be baked to different vertex formats and with different state.
*/
public interface IModelGeometry<T extends IModelGeometry<T>>
@@ -19,18 +19,20 @@
package net.minecraftforge.client.settings;
import net.minecraft.client.KeyMapping;
/**
* Defines the context that a {@link KeyBinding} is used.
* Key conflicts occur when a {@link KeyBinding} has the same {@link IKeyConflictContext} and has conflicting modifiers and keyCodes.
* Defines the context that a {@link KeyMapping} is used.
* Key conflicts occur when a {@link KeyMapping} has the same {@link IKeyConflictContext} and has conflicting modifiers and keyCodes.
*/
public interface IKeyConflictContext {
/**
* @return true if conditions are met to activate {@link KeyBinding}s with this context
* @return true if conditions are met to activate {@link KeyMapping}s with this context
*/
boolean isActive();
/**
* @return true if the other context can have {@link KeyBinding} conflicts with this one.
* @return true if the other context can have {@link KeyMapping} conflicts with this one.
* This will be called on both contexts to check for conflicts.
*/
boolean conflicts(IKeyConflictContext other);
@@ -20,6 +20,7 @@
package net.minecraftforge.client.settings;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.Screen;
public enum KeyConflictContext implements IKeyConflictContext
{
@@ -42,7 +43,7 @@ public enum KeyConflictContext implements IKeyConflictContext
},
/**
* Gui key bindings are only used when a {@link GuiScreen} is open.
* Gui key bindings are only used when a {@link Screen} is open.
*/
GUI {
@Override
@@ -59,7 +60,7 @@ public enum KeyConflictContext implements IKeyConflictContext
},
/**
* In-game key bindings are only used when a {@link GuiScreen} is not open.
* In-game key bindings are only used when a {@link Screen} is not open.
*/
IN_GAME {
@Override