-
Notifications
You must be signed in to change notification settings - Fork 521
Some javadoc improvements #5114
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
base: 1.21.11
Are you sure you want to change the base?
Changes from 19 commits
7037ad5
534df53
15c3379
cf45e2a
64a0b61
6a417c7
9ee5a5c
e9542b6
68f5cba
9a704d5
b161448
da84b16
a2b1390
2677bd0
e90c519
69832ef
0e64ada
34e65ab
5db8f28
362d61d
5ca4d47
0518084
c971aae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -43,7 +43,7 @@ public interface BiomeSelectionContext { | |||||
| Holder<Biome> getBiomeRegistryEntry(); | ||||||
|
|
||||||
| /** | ||||||
| * Returns true if this biome contains a placed feature referencing a configured feature with the given key. | ||||||
| * Returns {@code true} if this biome contains a placed feature referencing a configured feature with the given key. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| */ | ||||||
| default boolean hasFeature(ResourceKey<ConfiguredFeature<?, ?>> key) { | ||||||
| List<HolderSet<PlacedFeature>> featureSteps = getBiome().getGenerationSettings().features(); | ||||||
|
|
@@ -60,7 +60,7 @@ default boolean hasFeature(ResourceKey<ConfiguredFeature<?, ?>> key) { | |||||
| } | ||||||
|
|
||||||
| /** | ||||||
| * Returns true if this biome contains a placed feature with the given key. | ||||||
| * Returns {@code true} if this biome contains a placed feature with the given {@link TagKey}. | ||||||
Kilip1000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| */ | ||||||
| default boolean hasPlacedFeature(ResourceKey<PlacedFeature> key) { | ||||||
| List<HolderSet<PlacedFeature>> featureSteps = getBiome().getGenerationSettings().features(); | ||||||
|
|
@@ -89,9 +89,8 @@ default boolean hasPlacedFeature(ResourceKey<PlacedFeature> key) { | |||||
| * from this biomes feature list. | ||||||
| */ | ||||||
| Optional<ResourceKey<PlacedFeature>> getPlacedFeatureKey(PlacedFeature placedFeature); | ||||||
|
|
||||||
| /** | ||||||
| * Returns true if the configured structure with the given key can start in this biome in any chunk generator | ||||||
| * Returns {@code true} if the configured structure with the given key can start in this biome in any chunk generator | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| * used by the current world-save. | ||||||
| */ | ||||||
| boolean validForStructure(ResourceKey<Structure> key); | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -60,7 +60,7 @@ public static void addNetherBiome(ResourceKey<Biome> biome, Climate.ParameterPoi | |||||
| } | ||||||
|
|
||||||
| /** | ||||||
| * Returns true if the given biome can generate in the nether, considering the Vanilla nether biomes, | ||||||
| * Returns {@code true} if the given biome can generate in the nether, considering the Vanilla nether biomes, | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| * and any biomes added to the Nether by mods. | ||||||
| */ | ||||||
| public static boolean canGenerateInNether(ResourceKey<Biome> biome) { | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,15 +44,15 @@ | |
| */ | ||
| public interface FabricItem { | ||
| /** | ||
| * When the components of an item stack in the main hand or off hand changes, vanilla runs an "update animation". | ||
| * When the components of an item stack in the main hand or offhand changes, vanilla runs an "update animation". | ||
| * This function is called on the client side when the components or count of the stack has changed, but not the item, | ||
| * and returning false cancels this animation. | ||
| * and returning {@code false} cancels this animation. | ||
| * | ||
| * @param player the current player; this may be safely cast to {@link net.minecraft.client.player.LocalPlayer} in client-only code | ||
| * @param hand the hand; this function applies both to the main hand and the off hand | ||
| * @param hand the hand; this function applies both to the main hand and the offhand | ||
| * @param oldStack the previous stack, of this item | ||
| * @param newStack the new stack, also of this item | ||
| * @return true to run the vanilla animation, false to cancel it. | ||
| * @return {@code true} to run the vanilla animation, {@code false} to cancel it. | ||
| */ | ||
| default boolean allowComponentsUpdateAnimation(Player player, InteractionHand hand, ItemStack oldStack, ItemStack newStack) { | ||
| return true; | ||
|
|
@@ -61,12 +61,12 @@ default boolean allowComponentsUpdateAnimation(Player player, InteractionHand ha | |
| /** | ||
| * When the components of the selected stack changes, block breaking progress is reset. | ||
| * This function is called when the components of the selected stack has changed, | ||
| * and returning true allows the block breaking progress to continue. | ||
| * and returning {@code true} allows the block breaking progress to continue. | ||
| * | ||
| * @param player the player breaking the block | ||
| * @param oldStack the previous stack, of this item | ||
| * @param newStack the new stack, also of this item | ||
| * @return true to allow continuing block breaking, false to reset the progress. | ||
| * @return {@code true} to allow continuing block breaking, {@code false} to reset the progress. | ||
| */ | ||
| default boolean allowContinuingBlockBreaking(Player player, ItemStack oldStack, ItemStack newStack) { | ||
| return false; | ||
|
|
@@ -75,9 +75,11 @@ default boolean allowContinuingBlockBreaking(Player player, ItemStack oldStack, | |
| /** | ||
| * Returns a leftover item stack after {@code stack} is consumed in a recipe. | ||
| * (This is also known as "recipe remainder".) | ||
| * For example, using a lava bucket in a furnace as fuel will leave an empty bucket. | ||
| * | ||
| * <p>Here is an example for a recipe remainder that increments the item's damage. | ||
| * <p>For example, using a lava bucket in a furnace as fuel will leave an empty bucket. | ||
| * | ||
| * <p> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency, this should probably be merged into the bottom line, i.e. |
||
| * Here is an example for a recipe remainder that increments the item's damage. | ||
| * | ||
| * <pre>{@code | ||
| * if (stack.getDamage() < stack.getMaxDamage() - 1) { | ||
|
|
@@ -177,7 +179,7 @@ default Item.Properties equipmentSlot(EquipmentSlotProvider equipmentSlotProvide | |
|
|
||
| /** | ||
| * Sets the custom damage handler of the item. | ||
| * Note that this is only called on an ItemStack if {@link ItemStack#isDamageableItem()} returns true. | ||
| * Note that this is only called on an ItemStack if {@link ItemStack#isDamageableItem()} returns {@code true}. | ||
| * | ||
| * @see CustomDamageHandler | ||
| */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO keep the
@returnand remove the above statement that says "Returns the invoker instance."