Class ResourceAmount<T>

java.lang.Object
net.fabricmc.fabric.api.transfer.v1.storage.base.ResourceAmount<T>
Type Parameters:
T - The type of the stored resource. Experimental feature, 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.

@Experimental public final class ResourceAmount<T> extends Object
An immutable object storing both a resource and an amount, provided for convenience.
  • Constructor Details

    • ResourceAmount

      public ResourceAmount(T resource, long amount)
  • Method Details

    • resource

      public T resource()
    • amount

      public long amount()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object