mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-21 03:10:54 -04:00
Make dimension API stable. Remove usage of @Deprecated for experimental modules.
This commit is contained in:
parent
af0cec4081
commit
edf35c6176
42 changed files with 34 additions and 77 deletions
fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/api/biome/v1
BiomeModification.javaBiomeModificationContext.javaBiomeModifications.javaBiomeSelectionContext.javaBiomeSelectors.javaModificationPhase.javaNetherBiomes.javaTheEndBiomes.java
fabric-dimensions-v1/src/main
fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1
client/fluid
context
fluid
item
storage
transaction
|
@ -31,7 +31,6 @@ import net.fabricmc.fabric.impl.biome.modification.BiomeModificationImpl;
|
|||
*
|
||||
* @see BiomeModifications
|
||||
*/
|
||||
@Deprecated
|
||||
public class BiomeModification {
|
||||
private final Identifier id;
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ import net.fabricmc.fabric.impl.biome.modification.BuiltInRegistryKeys;
|
|||
*
|
||||
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface BiomeModificationContext {
|
||||
/**
|
||||
* @see Biome#getCategory()
|
||||
|
|
|
@ -39,7 +39,6 @@ import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
|
|||
*
|
||||
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
|
||||
*/
|
||||
@Deprecated
|
||||
public final class BiomeModifications {
|
||||
/**
|
||||
* Convenience method to add a feature to one or more biomes.
|
||||
|
|
|
@ -32,7 +32,6 @@ import net.fabricmc.fabric.impl.biome.modification.BuiltInRegistryKeys;
|
|||
*
|
||||
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface BiomeSelectionContext {
|
||||
RegistryKey<Biome> getBiomeKey();
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ import net.fabricmc.fabric.impl.biome.OverworldBiomeData;
|
|||
*
|
||||
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
|
||||
*/
|
||||
@Deprecated
|
||||
public final class BiomeSelectors {
|
||||
private BiomeSelectors() {
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ package net.fabricmc.fabric.api.biome.v1;
|
|||
*
|
||||
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
|
||||
*/
|
||||
@Deprecated
|
||||
public enum ModificationPhase {
|
||||
/**
|
||||
* The appropriate phase for enriching biomes by adding to them without relying on
|
||||
|
|
|
@ -27,7 +27,6 @@ import net.fabricmc.fabric.impl.biome.NetherBiomeData;
|
|||
*
|
||||
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
|
||||
*/
|
||||
@Deprecated
|
||||
public final class NetherBiomes {
|
||||
private NetherBiomes() {
|
||||
}
|
||||
|
|
|
@ -25,11 +25,10 @@ import net.fabricmc.fabric.impl.biome.TheEndBiomeData;
|
|||
/**
|
||||
* API that exposes some internals of the minecraft default biome source for The End.
|
||||
*
|
||||
* @deprecated Experimental feature, may be removed or changed without further notice.
|
||||
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
|
||||
* Because of the volatility of world generation in Minecraft 1.16, this API is marked experimental
|
||||
* since it is likely to change in future Minecraft versions.
|
||||
*/
|
||||
@Deprecated
|
||||
public final class TheEndBiomes {
|
||||
private TheEndBiomes() {
|
||||
}
|
||||
|
|
|
@ -27,10 +27,7 @@ import net.fabricmc.fabric.impl.dimension.FabricDimensionInternals;
|
|||
|
||||
/**
|
||||
* This class consists exclusively of static methods that operate on world dimensions.
|
||||
*
|
||||
* @deprecated Experimental feature, may be removed or changed without further notice due to potential changes to Dimensions in subsequent versions.
|
||||
*/
|
||||
@Deprecated
|
||||
public final class FabricDimensions {
|
||||
private FabricDimensions() {
|
||||
throw new AssertionError();
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
"fabric-dimensions-v1.mixins.json"
|
||||
],
|
||||
"custom": {
|
||||
"fabric-api:module-lifecycle": "experimental"
|
||||
"fabric-api:module-lifecycle": "stable"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,11 +37,10 @@ import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant;
|
|||
* Defines how {@linkplain FluidVariant fluid variants} of a given Fluid should be displayed to clients.
|
||||
* Register with {@link FluidVariantRendering#register}.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
@Environment(EnvType.CLIENT)
|
||||
public interface FluidVariantRenderHandler {
|
||||
/**
|
||||
|
|
|
@ -41,11 +41,10 @@ import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant;
|
|||
/**
|
||||
* Client-side display of fluid variants.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class FluidVariantRendering {
|
||||
private static final ApiProviderMap<Fluid, FluidVariantRenderHandler> HANDLERS = ApiProviderMap.create();
|
||||
|
|
|
@ -82,11 +82,10 @@ import net.fabricmc.fabric.impl.transfer.context.SingleSlotContainerItemContext;
|
|||
* In the water bucket example, this function can be used to combine steps 1, 2 and 3.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public interface ContainerItemContext {
|
||||
/**
|
||||
* Return a context for the passed player's hand. This is recommended for item use interactions.
|
||||
|
|
|
@ -48,11 +48,10 @@ import net.fabricmc.fabric.impl.transfer.fluid.CauldronStorage;
|
|||
* <li>{@code amountPerLevel} defines how much fluid (in droplets) there is in one level of the cauldron.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public final class CauldronFluidContent {
|
||||
/**
|
||||
* Block of the cauldron.
|
||||
|
|
|
@ -24,11 +24,10 @@ import org.jetbrains.annotations.ApiStatus;
|
|||
* <p>If you don't know how much droplets you should pick for a specific resource that has a block form,
|
||||
* the convention is to use 81000 droplets for what is worth one block of that resource.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public final class FluidConstants {
|
||||
public static final long BUCKET = 81000;
|
||||
public static final long BOTTLE = 27000;
|
||||
|
|
|
@ -46,11 +46,10 @@ import net.fabricmc.fabric.mixin.transfer.BucketItemAccessor;
|
|||
/**
|
||||
* Access to {@link Storage Storage<FluidVariant>} instances.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public final class FluidStorage {
|
||||
/**
|
||||
* Sided block access to fluid variant storages.
|
||||
|
|
|
@ -38,11 +38,10 @@ import net.fabricmc.fabric.impl.transfer.fluid.FluidVariantImpl;
|
|||
* <p><b>Fluid variants must always be compared with {@link #equals}, never by reference!</b>
|
||||
* {@link #hashCode} is guaranteed to be correct and constant time independently of the size of the NBT.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
@ApiStatus.NonExtendable
|
||||
public interface FluidVariant extends TransferVariant<Fluid> {
|
||||
/**
|
||||
|
|
|
@ -56,11 +56,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
* and it is inefficient to have one storage registered per fluid
|
||||
* so Fabric API has a storage that accepts any fluid with a corresponding full bucket).
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public final class EmptyItemFluidStorage implements InsertionOnlyStorage<FluidVariant> {
|
||||
private final ContainerItemContext context;
|
||||
private final Item emptyItem;
|
||||
|
|
|
@ -38,11 +38,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
*
|
||||
* <p>This is used similarly to {@link EmptyItemFluidStorage}.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public final class FullItemFluidStorage implements ExtractionOnlyStorage<FluidVariant>, SingleSlotStorage<FluidVariant> {
|
||||
private final ContainerItemContext context;
|
||||
private final Item fullItem;
|
||||
|
|
|
@ -45,11 +45,10 @@ import net.fabricmc.fabric.impl.transfer.item.InventoryStorageImpl;
|
|||
* <p><b>Important note:</b> This wrapper assumes that the inventory owns its slots.
|
||||
* If the inventory does not own its slots, for example because it delegates to another inventory, this wrapper should not be used!
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
@ApiStatus.NonExtendable
|
||||
public interface InventoryStorage extends Storage<ItemVariant> {
|
||||
/**
|
||||
|
|
|
@ -40,11 +40,10 @@ import net.fabricmc.fabric.mixin.transfer.DoubleInventoryAccessor;
|
|||
/**
|
||||
* Access to {@link Storage Storage<ItemVariant>} instances.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public final class ItemStorage {
|
||||
/**
|
||||
* Sided block access to item variant storages.
|
||||
|
|
|
@ -34,11 +34,10 @@ import net.fabricmc.fabric.api.transfer.v1.storage.TransferVariant;
|
|||
*
|
||||
* <p>Do not implement, use the static {@code of(...)} functions instead.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
@ApiStatus.NonExtendable
|
||||
public interface ItemVariant extends TransferVariant<Item> {
|
||||
/**
|
||||
|
|
|
@ -38,11 +38,10 @@ import net.fabricmc.fabric.impl.transfer.item.CursorSlotWrapper;
|
|||
* For simple insertions, {@link #offer} or {@link #offerOrDrop} is recommended.
|
||||
* {@link #getSlots} can also be used and combined with {@link CombinedStorage} to retrieve a wrapper around a specific range of slots.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
@ApiStatus.NonExtendable
|
||||
// TODO: Consider explicitly syncing stacks by sending a ScreenHandlerSlotUpdateS2CPacket if that proves to be necessary.
|
||||
// TODO: Vanilla doesn't seem to be doing it reliably, so we ignore it for now.
|
||||
|
|
|
@ -36,11 +36,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.base.SnapshotParticipant;
|
|||
* {@link #supportsInsertion} and/or {@link #supportsExtraction}.
|
||||
* {@link #getCapacity(ItemVariant)} can be overridden to change the maximum capacity depending on the item variant.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public abstract class SingleStackStorage extends SnapshotParticipant<ItemStack> implements SingleSlotStorage<ItemVariant> {
|
||||
/**
|
||||
* Return the stack of this storage. It will be modified directly sometimes to avoid needless copies.
|
||||
|
|
|
@ -62,11 +62,10 @@ import net.fabricmc.fabric.impl.transfer.TransferApiImpl;
|
|||
* @param <T> The type of the stored resources.
|
||||
* @see Transaction
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public interface Storage<T> {
|
||||
/**
|
||||
* Return an empty storage.
|
||||
|
|
|
@ -24,11 +24,10 @@ import org.jetbrains.annotations.ApiStatus;
|
|||
* <p>In particular, {@link #notNegative} or {@link #notBlankNotNegative} can be used by implementations of
|
||||
* {@link Storage#insert} and {@link Storage#extract} to fail-fast if the arguments are invalid.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public class StoragePreconditions {
|
||||
/**
|
||||
* Ensure that the passed transfer variant is not blank.
|
||||
|
|
|
@ -35,11 +35,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
* <p>Note that the functions that take a predicate iterate over the entire inventory in the worst case.
|
||||
* If the resource is known, there will generally be a more performance efficient way.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public final class StorageUtil {
|
||||
/**
|
||||
* Move resources between two storages, matching the passed filter, and return the amount that was successfully transferred.
|
||||
|
|
|
@ -27,11 +27,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
*
|
||||
* @param <T> The type of the stored resource.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public interface StorageView<T> {
|
||||
/**
|
||||
* Try to extract a resource from this view.
|
||||
|
|
|
@ -35,11 +35,10 @@ import net.minecraft.network.PacketByteBuf;
|
|||
*
|
||||
* @param <O> The type of the immutable object instance, for example {@code Item} or {@code Fluid}.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public interface TransferVariant<O> {
|
||||
/**
|
||||
* Return true if this variant is blank, and false otherwise.
|
||||
|
|
|
@ -26,11 +26,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
* A transfer variant storage view that contains a blank variant all the time (it's always empty), but may have a nonzero capacity.
|
||||
* This can be used to give capacity hints even if the storage is empty.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public class BlankVariantView<T extends TransferVariant<?>> implements StorageView<T> {
|
||||
private final T blankVariant;
|
||||
private final long capacity;
|
||||
|
|
|
@ -36,11 +36,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction;
|
|||
* @param <T> The type of the stored resources.
|
||||
* @param <S> The class of every part. {@code ? extends Storage<T>} can be used if the parts are of different types.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public class CombinedStorage<T, S extends Storage<T>> implements Storage<T> {
|
||||
public List<S> parts;
|
||||
|
||||
|
|
|
@ -24,11 +24,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
/**
|
||||
* A {@link Storage} that supports extraction, and not insertion.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public interface ExtractionOnlyStorage<T> extends Storage<T> {
|
||||
@Override
|
||||
default boolean supportsInsertion() {
|
||||
|
|
|
@ -36,11 +36,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
*
|
||||
* @param <T> The type of the stored resources.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public abstract class FilteringStorage<T> implements Storage<T> {
|
||||
protected final Supplier<Storage<T>> backingStorage;
|
||||
|
||||
|
|
|
@ -24,11 +24,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
/**
|
||||
* A {@link Storage} that supports insertion, and not extraction.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public interface InsertionOnlyStorage<T> extends Storage<T> {
|
||||
@Override
|
||||
default boolean supportsExtraction() {
|
||||
|
|
|
@ -22,10 +22,9 @@ import org.jetbrains.annotations.ApiStatus;
|
|||
* An immutable object storing both a resource and an amount, provided for convenience.
|
||||
* @param <T> The type of the stored resource.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public record ResourceAmount<T> (T resource, long amount) {
|
||||
}
|
||||
|
|
|
@ -30,11 +30,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
*
|
||||
* @param <T> The type of the stored resource.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public interface SingleSlotStorage<T> extends Storage<T>, StorageView<T> {
|
||||
@Override
|
||||
default Iterator<StorageView<T>> iterator(TransactionContext transaction) {
|
||||
|
|
|
@ -47,11 +47,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
*
|
||||
* @param <T> The type of the stored transfer variant.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public abstract class SingleVariantItemStorage<T extends TransferVariant<?>> implements SingleSlotStorage<T> {
|
||||
/**
|
||||
* Reference to the context.
|
||||
|
|
|
@ -32,11 +32,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.base.SnapshotParticipant;
|
|||
* If one of these two functions is overridden to always return false, implementors may also wish to override
|
||||
* {@link #supportsInsertion} and/or {@link #supportsExtraction}.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public abstract class SingleVariantStorage<T extends TransferVariant<?>> extends SnapshotParticipant<ResourceAmount<T>> implements SingleSlotStorage<T> {
|
||||
public T variant = getBlankVariant();
|
||||
public long amount = 0;
|
||||
|
|
|
@ -34,11 +34,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
*
|
||||
* @param <T> The type of the stored resource.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public final class SingleViewIterator<T> implements Iterator<StorageView<T>>, Transaction.CloseCallback {
|
||||
/**
|
||||
* Create a new iterator for the passed storage view, tied to the passed transaction.
|
||||
|
|
|
@ -74,11 +74,10 @@ import net.fabricmc.fabric.impl.transfer.transaction.TransactionManagerImpl;
|
|||
* and attempts to use it on another thread will throw an exception.
|
||||
* Consequently, transactions can be concurrent across multiple threads, as long as they don't share any state.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
@ApiStatus.NonExtendable
|
||||
public interface Transaction extends AutoCloseable, TransactionContext {
|
||||
/**
|
||||
|
|
|
@ -22,11 +22,10 @@ import org.jetbrains.annotations.ApiStatus;
|
|||
* A subset of a {@link Transaction} that lets participants properly take part in transactions, manage their state,
|
||||
* or open nested transactions, but does not allow them to close the transaction they are passed.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <p><b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
@ApiStatus.NonExtendable
|
||||
public interface TransactionContext {
|
||||
/**
|
||||
|
|
|
@ -41,11 +41,10 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
|||
*
|
||||
* @param <T> The objects that this participant uses to save its state snapshots.
|
||||
*
|
||||
* @deprecated Experimental feature, we reserve the right to remove or change it without further notice.
|
||||
* <b>Experimental feature</b>, we reserve the right to remove or change it without further notice.
|
||||
* The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated
|
||||
public abstract class SnapshotParticipant<T> implements Transaction.CloseCallback, Transaction.OuterCloseCallback {
|
||||
private final List<T> snapshots = new ArrayList<>();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue