User Tools

Site Tools


tutorial:transfer-api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:transfer-api [2022/02/02 20:36] – [Fluid, Item and Energy Transfer] technici4ntutorial:transfer-api [2022/02/04 18:39] – [The Item Transfer API] technici4n
Line 6: Line 6:
 All Transfer API classes are marked as ''@ApiStatus.Experimental''. This is temporary, and it means that there may be occasional breaking changes if a design flaw is encountered in the API, but we will try not to break the API to avoid disrupting the large amount of mods that are using it already. In practice, this means that you can mostly ignore this warning, and disable it in your IDE if it's too annoying. All Transfer API classes are marked as ''@ApiStatus.Experimental''. This is temporary, and it means that there may be occasional breaking changes if a design flaw is encountered in the API, but we will try not to break the API to avoid disrupting the large amount of mods that are using it already. In practice, this means that you can mostly ignore this warning, and disable it in your IDE if it's too annoying.
 ==== The Fluid Transfer API ==== ==== The Fluid Transfer API ====
-The Fabric Fluid Transfer API is how fluid-containing blocks such as machines, pipes and tanks communicate with each other. It's what allows all mods to be compatible with each other as far as fluid transfer is concerned. (If you are coming from Forge, it serves a purpose similar to ''IFluidHandler'').+The Fabric Fluid Transfer API is how fluid-containing blocks such as machines, pipesand tanks communicate with each other. It's what allows all mods to be compatible with each other as far as fluid transfer is concerned. (If you are coming from Forge, it serves a purpose similar to ''IFluidHandler'').
  
   - [[tutorial:transfer-api/simpletank|Creating a simple tank]] walks you through how you can create a simple tank block entity, and what ''FluidVariant'' is.   - [[tutorial:transfer-api/simpletank|Creating a simple tank]] walks you through how you can create a simple tank block entity, and what ''FluidVariant'' is.
Line 13: Line 13:
  
 ==== The Item Transfer API ==== ==== The Item Transfer API ====
-  - [Not yet written] This tutorial will explain how the item API is almost the same as the fluid API, and how wrappers around Inventory/PlayerInventory can be retrieved+The Fabric Item Transfer API is used by item-containing blocks such as chests, machines, or storage drawers to communicate with other. (If you are coming from Forge, it serves a purpose similar to ''IItemHandler''). 
-  - [Not yet written] Same as the fluid tutorialbut will also explain ''SingleStackStorage'' and how to use ''Inventory''/''SidedInventory''/''InventoryProvider''.+  - [[tutorial:transfer-api/item_storage|Item transfer with Storage<ItemVariant>]] explains how the item API is almost the same as the fluid API, how wrappers around Inventory/PlayerInventory can be retrieved, and how item storages can be implemented in practice. 
 + 
 +//Note: the existing item transfer API in Minecraft should be avoided in fabric mods due to its severe limitations. If you don't know what this means, you can ignore this warning.//
  
 ==== Fluid-containing items ==== ==== Fluid-containing items ====
tutorial/transfer-api.txt · Last modified: 2023/07/19 13:38 by technici4n