diff --git a/fabric-api-base/src/main/java/net/fabricmc/fabric/api/event/Event.java b/fabric-api-base/src/main/java/net/fabricmc/fabric/api/event/Event.java index 9e4e5f68f7..0c6d2ead08 100644 --- a/fabric-api-base/src/main/java/net/fabricmc/fabric/api/event/Event.java +++ b/fabric-api-base/src/main/java/net/fabricmc/fabric/api/event/Event.java @@ -39,10 +39,8 @@ public abstract class Event { * Returns the invoker instance. * *

An "invoker" is an object which hides multiple registered - * listeners of type T under one instance of type T, executing + * listeners of type {@code T} under one instance of type {@code T}, executing * them and leaving early as necessary. - * - * @return The invoker instance. */ public final T invoker() { return invoker; diff --git a/fabric-api-base/src/main/java/net/fabricmc/fabric/api/util/TriState.java b/fabric-api-base/src/main/java/net/fabricmc/fabric/api/util/TriState.java index c39ba48882..a0ec475bb7 100644 --- a/fabric-api-base/src/main/java/net/fabricmc/fabric/api/util/TriState.java +++ b/fabric-api-base/src/main/java/net/fabricmc/fabric/api/util/TriState.java @@ -27,7 +27,7 @@ import net.minecraft.util.StringRepresentable; /** - * Represents a boolean value which can be true, false or refer to a default value. + * Represents a boolean value which can be {@code true}, {@code false} or refer to a default value. */ public enum TriState implements StringRepresentable { /** @@ -71,7 +71,7 @@ public static TriState of(@Nullable Boolean bool) { /** * Gets the value of the tri-state. * - * @return true if the tri-state is {@link TriState#TRUE}, + * @return {@code true} if the tri-state is {@link TriState#TRUE}, * otherwise false. */ public boolean get() { diff --git a/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/BiomeModificationContext.java b/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/BiomeModificationContext.java index a646f64378..72d3fba3a1 100644 --- a/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/BiomeModificationContext.java +++ b/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/BiomeModificationContext.java @@ -286,7 +286,7 @@ default boolean removeFeature(ResourceKey placedFeatureKey) { /** * Removes all carvers with the given key from this biome. * - * @return True if any carvers were removed. + * @return {@code true} if any carvers were removed. */ boolean removeCarver(ResourceKey> configuredCarverKey); } @@ -318,7 +318,7 @@ interface SpawnSettingsContext { void addSpawn(MobCategory spawnGroup, MobSpawnSettings.SpawnerData spawnEntry, int weight); /** - * Removes any spawns matching the given predicate from this biome, and returns true if any matched. + * Removes any spawns matching the given predicate from this biome, and returns {@code true} if any matched. * *

Associated JSON property: spawners. */ @@ -329,7 +329,7 @@ interface SpawnSettingsContext { * *

Associated JSON property: spawners. * - * @return True if any spawns were removed. + * @return {@code true} if any spawns were removed. */ default boolean removeSpawnsOfEntityType(EntityType entityType) { return removeSpawns((spawnGroup, spawnEntry) -> spawnEntry.type() == entityType); diff --git a/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/BiomeSelectionContext.java b/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/BiomeSelectionContext.java index 1538c43dda..d017465a09 100644 --- a/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/BiomeSelectionContext.java +++ b/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/BiomeSelectionContext.java @@ -43,7 +43,7 @@ public interface BiomeSelectionContext { Holder 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. */ default boolean hasFeature(ResourceKey> key) { List> featureSteps = getBiome().getGenerationSettings().features(); @@ -60,7 +60,7 @@ default boolean hasFeature(ResourceKey> 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 {@linkplain ResourceKey key}. */ default boolean hasPlacedFeature(ResourceKey key) { List> featureSteps = getBiome().getGenerationSettings().features(); @@ -89,9 +89,8 @@ default boolean hasPlacedFeature(ResourceKey key) { * from this biomes feature list. */ Optional> 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 * used by the current world-save. */ boolean validForStructure(ResourceKey key); diff --git a/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/NetherBiomes.java b/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/NetherBiomes.java index 312fd78e31..4741fa8377 100644 --- a/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/NetherBiomes.java +++ b/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/NetherBiomes.java @@ -60,7 +60,7 @@ public static void addNetherBiome(ResourceKey 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, * and any biomes added to the Nether by mods. */ public static boolean canGenerateInNether(ResourceKey biome) { diff --git a/fabric-block-api-v1/src/main/java/net/fabricmc/fabric/mixin/block/ChunkSectionBlockStateCounterMixin.java b/fabric-block-api-v1/src/main/java/net/fabricmc/fabric/mixin/block/ChunkSectionBlockStateCounterMixin.java index 0d5537abaa..2539e15a49 100644 --- a/fabric-block-api-v1/src/main/java/net/fabricmc/fabric/mixin/block/ChunkSectionBlockStateCounterMixin.java +++ b/fabric-block-api-v1/src/main/java/net/fabricmc/fabric/mixin/block/ChunkSectionBlockStateCounterMixin.java @@ -27,7 +27,7 @@ public class ChunkSectionBlockStateCounterMixin { /** * Makes Chunk Sections not have isAir = true modded blocks be replaced with AIR against their will. - * Mojang report: https://bugs.mojang.com/browse/MC-232360 + * Mojang report: https://bugs.mojang.com/browse/MC-232360 */ @Redirect(method = "accept(Lnet/minecraft/world/level/block/state/BlockState;I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;isAir()Z")) diff --git a/fabric-command-api-v2/src/client/java/net/fabricmc/fabric/impl/command/client/ClientCommandInternals.java b/fabric-command-api-v2/src/client/java/net/fabricmc/fabric/impl/command/client/ClientCommandInternals.java index 63f3337867..ce6144f7bf 100644 --- a/fabric-command-api-v2/src/client/java/net/fabricmc/fabric/impl/command/client/ClientCommandInternals.java +++ b/fabric-command-api-v2/src/client/java/net/fabricmc/fabric/impl/command/client/ClientCommandInternals.java @@ -69,7 +69,7 @@ public static void setActiveDispatcher(@Nullable CommandDispatcherThe default is false. */ diff --git a/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/api/entity/event/v1/EntityElytraEvents.java b/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/api/entity/event/v1/EntityElytraEvents.java index 6335993d45..62a87292f7 100644 --- a/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/api/entity/event/v1/EntityElytraEvents.java +++ b/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/api/entity/event/v1/EntityElytraEvents.java @@ -28,7 +28,7 @@ public final class EntityElytraEvents { /** * An event to check if elytra flight (both through normal and custom elytras) is allowed. - * All listeners need to return true to allow the entity to fly, otherwise elytra flight will be blocked/stopped. + * All listeners need to return {@code true} to allow the entity to fly, otherwise elytra flight will be blocked/stopped. */ public static final Event ALLOW = EventFactory.createArrayBacked(Allow.class, listeners -> entity -> { for (Allow listener : listeners) { @@ -59,7 +59,7 @@ public final class EntityElytraEvents { @FunctionalInterface public interface Allow { /** - * @return false to block elytra flight, true to allow it (unless another listener returns false) + * @return {@code false} to block elytra flight, {@code true} to allow it (unless another listener returns {@code false}) */ boolean allowElytraFlight(LivingEntity entity); } @@ -86,8 +86,8 @@ public interface Custom { * } * * @param entity the entity - * @param tickElytra false if this is just to check if the custom elytra can be used, true if the custom elytra should also be ticked, i.e. perform side-effects of flying such as using resources. - * @return true to use a custom elytra, enabling elytra flight for the entity and cancelling subsequent handlers + * @param tickElytra {@code false} if this is just to check if the custom elytra can be used, {@code true} if the custom elytra should also be ticked, i.e. perform side-effects of flying such as using resources. + * @return {@code true} to use a custom elytra, enabling elytra flight for the entity and cancelling subsequent handlers */ boolean useCustomElytra(LivingEntity entity, boolean tickElytra); } diff --git a/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/api/entity/event/v1/ServerLivingEntityEvents.java b/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/api/entity/event/v1/ServerLivingEntityEvents.java index 658b12a6ce..1e7e6bfc35 100644 --- a/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/api/entity/event/v1/ServerLivingEntityEvents.java +++ b/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/api/entity/event/v1/ServerLivingEntityEvents.java @@ -64,7 +64,7 @@ public final class ServerLivingEntityEvents { * *

Mods can cancel this to keep the entity alive. * - *

Vanilla checks for entity health {@code <= 0} each tick (with {@link LivingEntity#isDeadOrDying()}), and kills if true - + *

Vanilla checks for entity health {@code <= 0} each tick (with {@link LivingEntity#isDeadOrDying()}), and kills if {@code true} - * so the entity will still die next tick if this event is cancelled. * It's assumed that the listener will do something to prevent this, for example, if the entity is a player: *