From b1caf1e9d64cbee07ffb8ff8362326553bfb0dec Mon Sep 17 00:00:00 2001 From: modmuss Date: Thu, 12 Dec 2024 15:58:49 +0000 Subject: [PATCH] Update checkstyle (#4280) * Update checkstyle * Fix --- build.gradle | 2 +- .../api/lookup/v1/block/BlockApiLookup.java | 6 +-- .../api/lookup/v1/custom/ApiLookupMap.java | 2 +- .../api/lookup/v1/entity/EntityApiLookup.java | 2 +- .../api/lookup/v1/item/ItemApiLookup.java | 4 +- .../fabric/api/lookup/v1/package-info.java | 15 +++----- .../fabric/api/biome/v1/TheEndBiomes.java | 20 +++++----- .../convention/v2/ConventionalBiomeTags.java | 4 +- .../convention/v2/ConventionalBlockTags.java | 4 +- .../convention/v2/ConventionalFluidTags.java | 4 +- .../convention/v2/ConventionalItemTags.java | 8 ++-- .../ingredient/CustomIngredientSync.java | 2 +- .../fabric/api/resource/package-info.java | 38 +++++++++---------- .../fabric/api/transfer/v1/package-info.java | 15 +++----- .../api/transfer/v1/storage/Storage.java | 4 +- 15 files changed, 60 insertions(+), 70 deletions(-) diff --git a/build.gradle b/build.gradle index 7e71f6b344..7d5f3af5cf 100644 --- a/build.gradle +++ b/build.gradle @@ -271,7 +271,7 @@ allprojects { checkstyle { configFile = rootProject.file("checkstyle.xml") - toolVersion = "10.12.1" + toolVersion = "10.20.2" } tasks.withType(AbstractArchiveTask).configureEach { diff --git a/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/block/BlockApiLookup.java b/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/block/BlockApiLookup.java index d8baa831b2..3676316fb1 100644 --- a/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/block/BlockApiLookup.java +++ b/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/block/BlockApiLookup.java @@ -40,7 +40,7 @@ * *

Note: If you are going to query APIs a lot, consider using {@link BlockApiCache}, it may drastically improve performance. * - *

Usage Example

+ *

Usage Example

* Let us pretend we have the following interface that we would like to attach to some blocks depending on the direction. * *
{@code
@@ -106,7 +106,7 @@
  *     // return something if available, or null
  * });}
* - *

Improving performance

+ *

Improving performance

* When performing queries every tick, it is recommended to use {@link BlockApiCache BlockApiCache<A, C>} * instead of directly querying the {@code BlockApiLookup}. * @@ -129,7 +129,7 @@ * * // no need to destroy the cache, the garbage collector will take care of it} * - *

Generic context types

+ *

Generic context types

* Note that {@code FluidContainer} and {@code Direction} were completely arbitrary in this example. * We can define any {@code BlockApiLookup<A, C>}, where {@code A} is the type of the queried API, and {@code C} is the type of the additional context * (the direction parameter in the previous example). diff --git a/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/custom/ApiLookupMap.java b/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/custom/ApiLookupMap.java index 11f3014255..c7bba6cf34 100644 --- a/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/custom/ApiLookupMap.java +++ b/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/custom/ApiLookupMap.java @@ -29,7 +29,7 @@ * A map meant to be used as the backing storage for custom {@code ApiLookup} instances, * to implement a custom equivalent of {@link net.fabricmc.fabric.api.lookup.v1.block.BlockApiLookup#get BlockApiLookup#get}. * - *

Usage Example

+ *

Usage Example

* We will be implementing the following simplified version of an API lookup interface for item stacks * to illustrate how to use {@link ApiLookupMap} and {@link ApiProviderMap}. *
{@code
diff --git a/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/entity/EntityApiLookup.java b/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/entity/EntityApiLookup.java
index 836a4cc10f..e0ef604c5a 100644
--- a/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/entity/EntityApiLookup.java
+++ b/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/entity/EntityApiLookup.java
@@ -34,7 +34,7 @@
  * 

When trying to {@link #find} an API for an entity, the provider registered for the entity type will be queried if it exists. * If it doesn't exist, or if it returns {@code null}, the fallback providers will be queried in order. * - *

Usage Example

+ *

Usage Example

* Let's pretend that we have the following interface that we want to attach to entities. *
{@code
  * public interface Leveled {
diff --git a/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/item/ItemApiLookup.java b/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/item/ItemApiLookup.java
index 6dc03be491..6bb7620eb1 100644
--- a/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/item/ItemApiLookup.java
+++ b/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/item/ItemApiLookup.java
@@ -34,7 +34,7 @@
  * 

When trying to {@link #find} an API for an item stack, the provider registered for the item of the stack will be queried if it exists. * If it doesn't exist, or if it returns {@code null}, the fallback providers will be queried in order. * - *

Usage Example

+ *

Usage Example

* Let us reuse {@code FluidContainer} from {@linkplain BlockApiLookup the BlockApiLookup example}. * We will query {@code FluidContainer} instances from the stack directly. * We need no context, so we will use {@code Void}. @@ -82,7 +82,7 @@ * // return something if available, or null * });}
* - *

Generic context types

+ *

Generic context types

* Note that {@code FluidContainer} and {@code Void} were completely arbitrary in this example. * We can define any {@code ItemApiLookup<A, C>}, where {@code A} is the type of the queried API, and {@code C} is the type of the additional context * (the void parameter in the previous example). diff --git a/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/package-info.java b/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/package-info.java index ff89757a52..fce5ad60ab 100644 --- a/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/package-info.java +++ b/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/package-info.java @@ -20,15 +20,14 @@ *

This module allows API instances to be associated with game objects without specifying how the association is implemented. * This is useful when the same API could be implemented more than once or implemented in different ways.

* - *

Definitions and purpose

+ *

Definitions and purpose

* - *

* - *

Retrieving APIs from blocks in the world

+ *

Retrieving APIs from blocks in the world

* - *

* - *

Retrieving APIs from item stacks

+ *

Retrieving APIs from item stacks

* - *

* - *

Retrieving APIs from entities

+ *

Retrieving APIs from entities

* - *

* - *

Retrieving APIs from custom game objects

+ *

Retrieving APIs from custom game objects

* - *

*/ package net.fabricmc.fabric.api.lookup.v1; diff --git a/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/TheEndBiomes.java b/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/TheEndBiomes.java index 8a69dfdf6e..cba0dd9f19 100644 --- a/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/TheEndBiomes.java +++ b/fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1/TheEndBiomes.java @@ -31,10 +31,10 @@ private TheEndBiomes() { } /** - *

Adds the biome as a main end island biome with the specified weight; note that this includes the main island + * Adds the biome as a main end island biome with the specified weight; note that this includes the main island * and some of the land encircling the empty space. Note that adding a biome to this region could potentially mess * with the generation of the center island and cause it to generate incorrectly; this method only exists for - * consistency.

+ * consistency. * * @param biome the biome to be added * @param weight the weight of the entry. The weight in this method corresponds to its selection likelihood, with @@ -46,8 +46,8 @@ public static void addMainIslandBiome(RegistryKey biome, double weight) { } /** - *

Adds the biome as an end highlands biome with the specified weight. End Highlands biomes make up the - * center region of the large outer islands in The End.

+ * Adds the biome as an end highlands biome with the specified weight. End Highlands biomes make up the + * center region of the large outer islands in The End. * * @param biome the biome to be added * @param weight the weight of the entry. The weight in this method corresponds to its selection likelihood, with @@ -59,8 +59,8 @@ public static void addHighlandsBiome(RegistryKey biome, double weight) { } /** - *

Adds a custom biome as a small end islands biome with the specified weight; small end island biomes - * make up the smaller islands in between the larger islands of the end.

+ * Adds a custom biome as a small end islands biome with the specified weight; small end island biomes + * make up the smaller islands in between the larger islands of the end. * * @param biome the biome to be added * @param weight the weight of the entry. The weight in this method corresponds to its selection likelihood, with @@ -72,9 +72,9 @@ public static void addSmallIslandsBiome(RegistryKey biome, double weight) } /** - *

Adds the biome as an end midlands of the parent end highlands biome. End Midlands make up the area on + * Adds the biome as an end midlands of the parent end highlands biome. End Midlands make up the area on * the large outer islands between the highlands and the barrens and are similar to edge biomes in the - * overworld. If you don't call this method, the vanilla biome will be used by default.

+ * overworld. If you don't call this method, the vanilla biome will be used by default. * * @param highlands The highlands biome to where the midlands biome is added * @param midlands the biome to be added as a midlands biome @@ -87,9 +87,9 @@ public static void addMidlandsBiome(RegistryKey highlands, RegistryKeyAdds the biome as an end barrens of the parent end highlands biome. End Midlands make up the area on + * Adds the biome as an end barrens of the parent end highlands biome. End Midlands make up the area on * the edge of the large outer islands and are similar to edge biomes in the overworld. If you don't call - * this method, the vanilla biome will be used by default.

+ * this method, the vanilla biome will be used by default. * * @param highlands The highlands biome to where the barrens biome is added * @param barrens the biome to be added as a barrens biome diff --git a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalBiomeTags.java b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalBiomeTags.java index 2a25983986..6982d7e9ab 100644 --- a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalBiomeTags.java +++ b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalBiomeTags.java @@ -48,8 +48,8 @@ private ConventionalBiomeTags() { * Biomes that spawn in the Overworld. * (This is for people who want to tag their biomes as Overworld without getting * side effects from {@link net.minecraft.registry.tag.BiomeTags#IS_OVERWORLD}. - *

- * NOTE: If you do not add to the vanilla Overworld tag, be sure to add to + * + *

NOTE: If you do not add to the vanilla Overworld tag, be sure to add to * {@link net.minecraft.registry.tag.BiomeTags#STRONGHOLD_HAS_STRUCTURE} so * some Strongholds do not go missing.) */ diff --git a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalBlockTags.java b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalBlockTags.java index 7ba67dee7a..70ef546afc 100644 --- a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalBlockTags.java +++ b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalBlockTags.java @@ -121,8 +121,8 @@ private ConventionalBlockTags() { /** * A storage block is generally a block that has a recipe to craft a bulk of 1 kind of resource to a block * and has a mirror recipe to reverse the crafting with no loss in resources. - *

- * Honey Block is special in that the reversing recipe is not a perfect mirror of the crafting recipe + * + *

Honey Block is special in that the reversing recipe is not a perfect mirror of the crafting recipe * and so, it is considered a special case and not given a storage block tag. */ public static final TagKey STORAGE_BLOCKS = register("storage_blocks"); diff --git a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalFluidTags.java b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalFluidTags.java index fc5600387e..ce7a7334a1 100644 --- a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalFluidTags.java +++ b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalFluidTags.java @@ -24,8 +24,8 @@ /** * See {@link net.minecraft.registry.tag.FluidTags} for vanilla tags. * Note that addition to some vanilla tags implies having certain functionality. - *

- * Note, fluid tags should not be plural to match the vanilla standard. + * + *

Note, fluid tags should not be plural to match the vanilla standard. * This is the only tag category exempted from many-different-types plural rule. * *

(See {@link net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants} for the correct droplet rates for containers) diff --git a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java index 0ad00f20b4..215a807ed6 100644 --- a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java +++ b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java @@ -275,8 +275,8 @@ private ConventionalItemTags() { * Tag that holds all blocks and items that can be dyed a specific color. * (Does not include color blending items like leather armor. * Use {@link net.minecraft.registry.tag.ItemTags#DYEABLE} tag instead for color blending items) - *

- * Note: Use custom ingredients in recipes to do tag intersections and/or tag exclusions + * + *

Note: Use custom ingredients in recipes to do tag intersections and/or tag exclusions * to make more powerful recipes utilizing multiple tags such as dyed tags for an ingredient. * See {@link net.fabricmc.fabric.api.recipe.v1.ingredient.DefaultCustomIngredients} * children classes for various custom ingredients available that can also be used in data generation. @@ -303,8 +303,8 @@ private ConventionalItemTags() { /** * A storage block is generally a block that has a recipe to craft a bulk of 1 kind of resource to a block * and has a mirror recipe to reverse the crafting with no loss in resources. - *

- * Honey Block is special in that the reversing recipe is not a perfect mirror of the crafting recipe + * + *

Honey Block is special in that the reversing recipe is not a perfect mirror of the crafting recipe * and so, it is considered a special case and not given a storage block tag. */ public static final TagKey STORAGE_BLOCKS = register("storage_blocks"); diff --git a/fabric-recipe-api-v1/src/main/java/net/fabricmc/fabric/impl/recipe/ingredient/CustomIngredientSync.java b/fabric-recipe-api-v1/src/main/java/net/fabricmc/fabric/impl/recipe/ingredient/CustomIngredientSync.java index 92245cc343..df1742a53b 100644 --- a/fabric-recipe-api-v1/src/main/java/net/fabricmc/fabric/impl/recipe/ingredient/CustomIngredientSync.java +++ b/fabric-recipe-api-v1/src/main/java/net/fabricmc/fabric/impl/recipe/ingredient/CustomIngredientSync.java @@ -38,7 +38,7 @@ * If a specific client doesn't support a custom ingredient, we send the matching stacks as a regular ingredient. * This is fine since all recipe computation happens server-side anyway. * - *

    + *
      *
    • Each client sends a packet with the set of custom ingredients it supports.
    • *
    • We store that set inside the {@link EncoderHandler} using {@link EncoderHandlerMixin}.
    • *
    • When serializing a custom ingredient, we get access to the current {@link EncoderHandler}, diff --git a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/package-info.java b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/package-info.java index 95010b1262..8223904f38 100644 --- a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/package-info.java +++ b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/package-info.java @@ -17,37 +17,37 @@ /** * The Resource Loader, version 0. * - *

      Quick note about vocabulary in Minecraft:

      - *

      Resource Pack refers to both client-sided resource pack and data pack.

      + *

      Quick note about vocabulary in Minecraft:

      + * Resource Pack refers to both client-sided resource pack and data pack. * - *

      Modded Resource Pack Handling

      - *

      There are two types of resource packs that mods can provide.

      + *

      Modded Resource Pack Handling

      + * There are two types of resource packs that mods can provide. * - *

      Bundled Resource Pack

      - *

      Mods can "bundle" resource packs with the mod by putting files inside the {@code assets} or {@code data} + *

      Bundled Resource Pack

      + * Mods can "bundle" resource packs with the mod by putting files inside the {@code assets} or {@code data} * sub-directories of the {@code resources} directory. They are always enabled, initially loaded after the vanilla pack, * and cannot be disabled. Individual mods' packs are hidden to users in the Resource Pack option screen or the {@code /datapack} * command. Instead, a placeholder pack, named "Fabric Mods", will be displayed. This pack, with the ID {@code fabric}, provides - * no resource itself; it is merely a marker used internally.

      + * no resource itself; it is merely a marker used internally. * - *

      Built-in Mod Resource Pack

      - *

      The Resource Loader adds manually registered mod resource packs. Those resource packs are located inside the + *

      Built-in Mod Resource Pack

      + * The Resource Loader adds manually registered mod resource packs. Those resource packs are located inside the * {@code resources/resourcepacks/} directory. For example, a built-in data pack with the ID {@code example:test} should be placed * under {@code resources/resourcepacks/test/data/}. The packs are then registered with * {@link net.fabricmc.fabric.api.resource.ResourceManagerHelper#registerBuiltinResourcePack(net.minecraft.util.Identifier, net.fabricmc.loader.api.ModContainer, net.fabricmc.fabric.api.resource.ResourcePackActivationType)}. - * Users can manually enable or disable the packs, unless it is specified to be always enabled.

      + * Users can manually enable or disable the packs, unless it is specified to be always enabled. * - *

      Programmer Art and High Contrast Support

      - *

      Bundled resource packs support Programmer Art and High Contrast vanilla resource packs. Simply place assets + *

      Programmer Art and High Contrast Support

      + * Bundled resource packs support Programmer Art and High Contrast vanilla resource packs. Simply place assets * under {@code resources/programmer_art/assets/} or {@code resources/high_contrast/assets/}, respectively. * Internally, these are treated as a separate internal pack, loaded just after the respective vanilla pack. - * Toggling the vanilla packs automatically toggles the bundled ones as well; you cannot separately enable or disable them.

      + * Toggling the vanilla packs automatically toggles the bundled ones as well; you cannot separately enable or disable them. * - *

      Example

      - *

      Mod A ({@code mod_a} provides a bundled resource pack with both Programmer Art and High Contrast support. + *

      Example

      + * Mod A ({@code mod_a} provides a bundled resource pack with both Programmer Art and High Contrast support. * Mod B ({@code mod_b}) provides a bundled resource pack and one built-in resource pack, Extra ({@code mod_b:extra}). * When neither the Programmer Art nor High Contrast is enabled, the user sees "Vanilla", "Fabric Mods", and "Extra" in the - * Resource Packs screen. Internally, between Fabric Mods and Extra packs, two hidden packs exist: {@code mod_a} and {@code mod_b}.

      + * Resource Packs screen. Internally, between Fabric Mods and Extra packs, two hidden packs exist: {@code mod_a} and {@code mod_b}. * *

      Suppose the user then enables both the Programmer Art and High Contrast, and the Resource Packs screen lists * "Vanilla", "Fabric", Programmer Art, "Extra", and High Contrast. Internally, there are 4 hidden packs:

      @@ -60,11 +60,11 @@ * *

      Note that while the current behavior is to sort bundled resource packs by mod ID in descending order (A to Z), this may change over time.

      * - *

      Resource Reload Listener

      - *

      The Resource Loader allows mods to register resource reload listeners through + *

      Resource Reload Listener

      + * The Resource Loader allows mods to register resource reload listeners through * {@link net.fabricmc.fabric.api.resource.ResourceManagerHelper#registerReloadListener(net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener)}, * which are triggered when resources are reloaded. - * A resource reload listener can depend on another and vanilla resource reload listener identifiers may be found in {@link net.fabricmc.fabric.api.resource.ResourceReloadListenerKeys}.

      + * A resource reload listener can depend on another and vanilla resource reload listener identifiers may be found in {@link net.fabricmc.fabric.api.resource.ResourceReloadListenerKeys}. */ package net.fabricmc.fabric.api.resource; diff --git a/fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1/package-info.java b/fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1/package-info.java index 140274365b..2307980822 100644 --- a/fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1/package-info.java +++ b/fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1/package-info.java @@ -19,16 +19,15 @@ * *

      This module provides common facilities for the transfer of fluids and other game resources. * - *

      Transactions

      + *

      Transactions

      * The {@link net.fabricmc.fabric.api.transfer.v1.transaction.Transaction Transaction} system provides a * scope that can be used to simulate any number of transfer operations, and then cancel or validate all of them at once. * One can think of transactions as video game checkpoints. A more detailed explanation can be found in the class javadoc of {@code Transaction}. * Every transfer operation requires a {@code Transaction} parameter. * {@link net.fabricmc.fabric.api.transfer.v1.transaction.base.SnapshotParticipant SnapshotParticipant} * is the reference implementation of a "participant", that is an object participating in a transaction. - *

      * - *

      Storages

      + *

      Storages

      * A {@link net.fabricmc.fabric.api.transfer.v1.storage.Storage Storage<T>} is any object that can store resources of type {@code T}. * Its contents can be read, and resources can be inserted into it or extracted from it. * {@link net.fabricmc.fabric.api.transfer.v1.storage.StorageUtil StorageUtil} provides a few helpful function to work with {@code Storage}s, @@ -37,17 +36,15 @@ * implementation of {@code Storage<T>}. * Usage of {@link net.fabricmc.fabric.api.transfer.v1.storage.StoragePreconditions StoragePreconditions} is recommended to detect * wrong usage of {@code Storage} and {@code StorageView} methods. - *

      * *

      Implementors of transfer variant storages with a fixed number of "slots" or "tanks" can use * {@link net.fabricmc.fabric.api.transfer.v1.storage.base.SingleVariantStorage SingleVariantStorage}, * and combine them with {@link net.fabricmc.fabric.api.transfer.v1.storage.base.CombinedStorage CombinedStorage}. * - *

      Fluid transfer

      + *

      Fluid transfer

      * A {@code Storage} is any object that can store fluids. It is just a {@code Storage}, where {@code T} is * {@link net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant FluidVariant}, the immutable combination of a {@code Fluid} and additional components. * Instances can be accessed through the API lookups defined in {@link net.fabricmc.fabric.api.transfer.v1.fluid.FluidStorage FluidStorage}. - *

      * *

      The amount for fluid transfer is droplets, that is 1/81000ths of a bucket. * {@link net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants FluidConstants} contains a few helpful constants to work with droplets. @@ -57,20 +54,18 @@ * {@code Fluid}s that wish to render differently depending on the stored components can register a * {@link net.fabricmc.fabric.api.transfer.v1.client.fluid.FluidVariantRenderHandler FluidVariantRenderHandler}. * - *

      Item transfer

      + *

      Item transfer

      * A {@code Storage} is any object that can store items. * Instances can be accessed through the API lookup defined in {@link net.fabricmc.fabric.api.transfer.v1.item.ItemStorage ItemStorage}. - *

      * *

      The lookup already provides compatibility with vanilla inventories, however it may sometimes be interesting to use * {@link net.fabricmc.fabric.api.transfer.v1.item.InventoryStorage InventoryStorage} or * {@link net.fabricmc.fabric.api.transfer.v1.item.PlayerInventoryStorage PlayerInventoryStorage} when interaction with * {@code Inventory}-based APIs is required. * - *

      {@code ContainerItemContext}

      + *

      {@code ContainerItemContext}

      * {@link net.fabricmc.fabric.api.transfer.v1.context.ContainerItemContext ContainerItemContext} is a context designed for {@code ItemApiLookup} queries * that allows the returned APIs to interact with the containing inventory. * Notably, it is used by the {@code FluidStorage.ITEM} lookup for fluid-containing items. - *

      */ package net.fabricmc.fabric.api.transfer.v1; diff --git a/fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1/storage/Storage.java b/fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1/storage/Storage.java index f8a13706d0..a105596643 100644 --- a/fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1/storage/Storage.java +++ b/fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1/storage/Storage.java @@ -34,7 +34,7 @@ *

      Most of the documentation that follows is quite technical. * For an easier introduction to the API, see the wiki page. * - *

        + *
          *
        • {@link #supportsInsertion} and {@link #supportsExtraction} can be used to tell if insertion and extraction * functionality are possibly supported by this storage.
        • *
        • {@link #insert} and {@link #extract} can be used to insert or extract resources from this storage.
        • @@ -153,7 +153,7 @@ default Iterator> nonEmptyIterator() { /** * Convenient helper to get an {@link Iterable} over the {@linkplain #nonEmptyIterator() non-empty views} of this storage, for use in for-each loops. * - *

          {@code
          +	 * 
          {@code
           	 * for (StorageView view : storage.nonEmptyViews()) {
           	 *     // Do something with the view
           	 * }