Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javadoc for the very helpful files #219

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/main/java/net/minecraftforge/common/ForgeHooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,21 @@ public static double getPlayerVisibilityDistance(EntityPlayer player, double xzD
return value >= maxXZDistance ? maxXZDistance : value;
}

/**
* Determines if the entity is on a ladder.
*
* Checks if the block at the current position is a ladder or checks
* multiple block positions within the entity's bounding box if
* {@code fullBoundingBoxLadders} is enabled. If the entity is a spectator it
* will return false
*
* @param state The current {@link IBlockState} of the block at the specified position.
* @param world The {@link World} object representing the current world.
* @param pos The {@link BlockPos} object representing the block position.
* @param entity The {@link EntityLivingBase} entity whose ladder status is being checked.
*
* @return {@code true} if the entity is standing on a ladder, {@code false} otherwise.
*/
public static boolean isLivingOnLadder(@Nonnull IBlockState state, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull EntityLivingBase entity)
{
boolean isSpectator = (entity instanceof EntityPlayer && ((EntityPlayer)entity).isSpectator());
Expand Down Expand Up @@ -1000,7 +1015,7 @@ public static boolean onNoteChange(TileEntityNote te, byte old)

/**
* Default implementation of IRecipe.func_179532_b {getRemainingItems} because
* this is just copy pasted over a lot of recipes.
* this is just copy-pasted over a lot of recipes.
*
* @param inv Crafting inventory
* @return Crafting inventory contents after the recipe.
Expand Down