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 TypeMethodDescriptionbooleanisEmpty()Returnstrueif this represents an empty resource.
-
Method Details
-
isEmpty
boolean isEmpty()Returnstrueif this represents an empty resource.Examples include item resource with air as an item, or fluid resource with empty fluid.
-