[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

@@ -21,7 +21,9 @@ package net.minecraftforge.fluids;
import javax.annotation.Nullable;
import net.minecraft.world.item.BucketItem;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.dimension.DimensionType;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.item.ItemStack;
@@ -44,6 +46,7 @@ import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.phys.BlockHitResult;
/**
* Minecraft Forge Fluid Implementation
@@ -186,7 +189,7 @@ public class FluidAttributes
* Determines if this fluid should vaporize in dimensions where water vaporizes when placed.
* To preserve the intentions of vanilla, fluids that can turn lava into obsidian should vaporize.
* This prevents players from making the nether safe with a single bucket.
* Based on {@link net.minecraft.item.BucketItem#tryPlaceContainedLiquid(PlayerEntity, World, BlockPos)}
* Based on {@link BucketItem#emptyContents(Player, Level, BlockPos, BlockHitResult)}
*
* @param fluidStack The fluidStack is trying to be placed.
* @return true if this fluid should vaporize in dimensions where water vaporizes when placed.
@@ -200,9 +203,9 @@ public class FluidAttributes
}
/**
* Called instead of placing the fluid block if {@link net.minecraft.world.dimension.Dimension#doesWaterVaporize()} and {@link #doesVaporize(FluidStack)} are true.
* Called instead of placing the fluid block if {@link DimensionType#ultraWarm()} and {@link #doesVaporize(BlockAndTintGetter, BlockPos, FluidStack)} are true.
* Override this to make your explosive liquid blow up instead of the default smoke, etc.
* Based on {@link net.minecraft.item.BucketItem#tryPlaceContainedLiquid(PlayerEntity, World, BlockPos)}
* Based on {@link BucketItem#emptyContents(Player, Level, BlockPos, BlockHitResult)}
*
* @param player Player who tried to place the fluid. May be null for blocks like dispensers.
* @param worldIn World to vaporize the fluid in.
@@ -23,6 +23,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.base.Preconditions;
import net.minecraft.world.item.BucketItem;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.BucketPickup;
import net.minecraft.world.level.block.LiquidBlockContainer;
@@ -130,7 +131,7 @@ public class FluidUtil
*
* @param container The container to be filled. Will not be modified.
* Separate handling must be done to reduce the stack size, stow containers, etc, on success.
* See {@link #tryFillContainerAndStow(ItemStack, IFluidHandler, IItemHandler, int, PlayerEntity, boolean)}.
* See {@link #tryFillContainerAndStow(ItemStack, IFluidHandler, IItemHandler, int, Player, boolean)}.
* @param fluidSource The fluid handler to be drained.
* @param maxAmount The largest amount of fluid that should be transferred.
* @param player The player to make the filling noise. Pass null for no noise.
@@ -173,7 +174,7 @@ public class FluidUtil
*
* @param container The filled container. Will not be modified.
* Separate handling must be done to reduce the stack size, stow containers, etc, on success.
* See {@link #tryEmptyContainerAndStow(ItemStack, IFluidHandler, IItemHandler, int, PlayerEntity, boolean)}.
* See {@link #tryEmptyContainerAndStow(ItemStack, IFluidHandler, IItemHandler, int, Player, boolean)}.
* @param fluidDestination The fluid handler to be filled by the container.
* @param maxAmount The largest amount of fluid that should be transferred.
* @param player Player for making the bucket drained sound. Pass null for no noise.
@@ -514,11 +515,11 @@ public class FluidUtil
}
/**
* ItemStack version of {@link #tryPlaceFluid(PlayerEntity, World, Hand, BlockPos, IFluidHandler, FluidStack)}.
* ItemStack version of {@link #tryPlaceFluid(Player, Level, InteractionHand, BlockPos, IFluidHandler, FluidStack)}.
* Use the returned {@link FluidActionResult} to update the container ItemStack.
*
* @param player Player who places the fluid. May be null for blocks like dispensers.
* @param world World to place the fluid in
* @param world Level to place the fluid in
* @param hand
* @param pos The position in the world to place the fluid block
* @param container The fluid container holding the fluidStack to place
@@ -542,10 +543,10 @@ public class FluidUtil
* Honors the amount of fluid contained by the used container.
* Checks if water-like fluids should vaporize like in the nether.
*
* Modeled after {@link net.minecraft.item.BucketItem#tryPlaceContainedLiquid(PlayerEntity, World, BlockPos, BlockRayTraceResult)}
* Modeled after {@link BucketItem#emptyContents(Player, Level, BlockPos, BlockHitResult)}
*
* @param player Player who places the fluid. May be null for blocks like dispensers.
* @param world World to place the fluid in
* @param world Level to place the fluid in
* @param hand
* @param pos The position in the world to place the fluid block
* @param fluidSource The fluid source holding the fluidStack to place
@@ -618,8 +619,8 @@ public class FluidUtil
/**
* Internal method for getting a fluid block handler for placing a fluid.
*
* Modders: Instead of this method, use {@link #tryPlaceFluid(PlayerEntity, World, Hand, BlockPos, ItemStack, FluidStack)}
* or {@link #tryPlaceFluid(PlayerEntity, World, Hand, BlockPos, IFluidHandler, FluidStack)}
* Modders: Instead of this method, use {@link #tryPlaceFluid(Player, Level, InteractionHand, BlockPos, ItemStack, FluidStack)}
* or {@link #tryPlaceFluid(Player, Level, InteractionHand, BlockPos, IFluidHandler, FluidStack)}
*/
private static IFluidHandler getFluidBlockHandler(Fluid fluid, Level world, BlockPos pos)
{
@@ -629,9 +630,9 @@ public class FluidUtil
/**
* Destroys a block when a fluid is placed in the same position.
* Modeled after {@link net.minecraft.item.BucketItem#tryPlaceContainedLiquid(PlayerEntity, World, BlockPos, BlockRayTraceResult)}
* Modeled after {@link BucketItem#emptyContents(Player, Level, BlockPos, BlockHitResult)}
*
* This is a helper method for implementing {@link IFluidBlock#place(World, BlockPos, FluidStack, IFluidHandler.FluidAction)}.
* This is a helper method for implementing {@link IFluidBlock#place(Level, BlockPos, FluidStack, IFluidHandler.FluidAction)}.
*
* @param world the world that the fluid will be placed in
* @param pos the location that the fluid will be placed
@@ -29,8 +29,6 @@ import javax.annotation.Nonnull;
/**
* Implement this interface on Block classes which represent world-placeable Fluids.
*
* NOTE: Using/extending the reference implementations {@link BlockFluidBase} is encouraged.
*
*/
public interface IFluidBlock
{
@@ -26,7 +26,7 @@ import net.minecraftforge.fluids.*;
/**
* Implement this interface as a capability which should handle fluids, generally storing them in
* one or more internal {@link IFluidTank} objects.
* <p/>
* <p>
* A reference implementation is provided {@link TileFluidHandler}.
*/
public interface IFluidHandler
@@ -110,7 +110,7 @@ public interface IFluidHandler
/**
* Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.
* <p/>
* <p>
* This method is not Fluid-sensitive.
*
* @param maxDrain Maximum amount of fluid to drain.
@@ -33,8 +33,8 @@ import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
/**
* Wrapper around any block, only accounts for fluid placement, otherwise the block acts a void.
* If the block in question inherits from the default Vanilla or Forge implementations,
* consider using {@link BlockLiquidWrapper} or {@link FluidBlockWrapper} respectively.
* If the block in question inherits from the Forge implementations,
* consider using {@link FluidBlockWrapper}.
*/
public class BlockWrapper extends VoidFluidHandler
{