[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

@@ -19,7 +19,11 @@
package net.minecraftforge.items;
import net.minecraft.world.Container;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
import javax.annotation.Nonnull;
@@ -59,7 +63,7 @@ public interface IItemHandler
* Inserts an ItemStack into the given slot and return the remainder.
* The ItemStack <em>should not</em> be modified in this function!
* </p>
* Note: This behaviour is subtly different from {@link IFluidHandler#fill(FluidStack, boolean)}
* Note: This behaviour is subtly different from {@link IFluidHandler#fill(FluidStack, IFluidHandler.FluidAction)}
*
* @param slot Slot to insert into.
* @param stack ItemStack to insert. This must not be modified by the item handler.
@@ -97,7 +101,7 @@ public interface IItemHandler
/**
* <p>
* This function re-implements the vanilla function {@link IInventory#isItemValidForSlot(int, ItemStack)}.
* This function re-implements the vanilla function {@link Container#canPlaceItem(int, ItemStack)}.
* It should be used instead of simulated insertions in cases where the contents and state of the inventory are
* irrelevant, mainly for the purpose of automation and logic (for instance, testing if a minecart can wait
* to deposit its items into a full inventory, or if the items in the minecart can never be placed into the
@@ -21,10 +21,12 @@ package net.minecraftforge.items.wrapper;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
/**
* Exposes the armor inventory of an {@link EntityLivingBase} as an {@link IItemHandler} using {@link EntityLivingBase#getItemStackFromSlot} and
* {@link EntityLivingBase#setItemStackToSlot}.
* Exposes the armor inventory of an {@link LivingEntity} as an {@link IItemHandler} using {@link LivingEntity#getItemBySlot(EquipmentSlot)} and
* {@link LivingEntity#setItemSlot(EquipmentSlot, ItemStack)}.
*/
public class EntityArmorInvWrapper extends EntityEquipmentInvWrapper
{
@@ -24,6 +24,7 @@ import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
import java.util.ArrayList;
@@ -32,8 +33,8 @@ import javax.annotation.Nonnull;
/**
* Exposes the armor or hands inventory of an {@link EntityLivingBase} as an {@link IItemHandler} using {@link EntityLivingBase#getItemStackFromSlot} and
* {@link EntityLivingBase#setItemStackToSlot}.
* Exposes the armor or hands inventory of an {@link LivingEntity} as an {@link IItemHandler} using {@link LivingEntity#getItemBySlot(EquipmentSlot)} and
* {@link LivingEntity#setItemSlot(EquipmentSlot, ItemStack)}.
*/
public abstract class EntityEquipmentInvWrapper implements IItemHandlerModifiable
{
@@ -43,7 +44,7 @@ public abstract class EntityEquipmentInvWrapper implements IItemHandlerModifiabl
protected final LivingEntity entity;
/**
* The slots exposed by this wrapper, with {@link EntityEquipmentSlot#index} as the index.
* The slots exposed by this wrapper, with {@link EquipmentSlot#getIndex()} as the index.
*/
protected final List<EquipmentSlot> slots;
@@ -21,10 +21,12 @@ package net.minecraftforge.items.wrapper;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
/**
* Exposes the hands inventory of an {@link EntityLivingBase} as an {@link IItemHandler} using {@link EntityLivingBase#getItemStackFromSlot} and
* {@link EntityLivingBase#setItemStackToSlot}.
* Exposes the hands inventory of an {@link LivingEntity} as an {@link IItemHandler} using {@link LivingEntity#getItemBySlot(EquipmentSlot)} and
* {@link LivingEntity#setItemSlot(EquipmentSlot, ItemStack)}.
*/
public class EntityHandsInvWrapper extends EntityEquipmentInvWrapper
{
@@ -34,7 +34,7 @@ public class RecipeWrapper implements Container {
}
/**
* Returns the size of this inventory. Must be equivalent to {@link #getHeight()} * {@link #getWidth()}.
* Returns the size of this inventory.
*/
@Override
public int getContainerSize()