Interface Resource

All Known Subinterfaces:
DataComponentHolderResource<T>, RegisteredResource<T>
All Known Implementing Classes:
FluidResource, ItemResource

public interface Resource
Most general form of a resource that can be quantified and moved around.

Instances must all be immutable, comparable with Object.equals(Object) and they must implement a suitable Object.hashCode().

Note, the amount is not encoded in the resource, for that you can use something like ResourceStack.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if this represents an empty resource.
  • Method Details

    • isEmpty

      boolean isEmpty()
      Returns true if this represents an empty resource.

      Examples include item resource with air as an item, or fluid resource with empty fluid.