Mark SidedStorageBlockEntity's side as nullable ()

(cherry picked from commit 195226a756)
This commit is contained in:
deirn 2023-09-03 18:46:52 +07:00 committed by modmuss50
parent 0287208bff
commit ceabd7613a

View file

@ -47,19 +47,23 @@ import net.fabricmc.fabric.api.transfer.v1.storage.Storage;
public interface SidedStorageBlockEntity {
/**
* Return a fluid storage if available on the queried side, or null otherwise.
*
* @param side The side of the storage to query, {@code null} means that the full storage without the restriction should be returned instead.
*/
@ApiStatus.OverrideOnly
@Nullable
default Storage<FluidVariant> getFluidStorage(Direction side) {
default Storage<FluidVariant> getFluidStorage(@Nullable Direction side) {
return null;
}
/**
* Return an item storage if available on the queried side, or null otherwise.
*
* @param side The side of the storage to query, {@code null} means that the full storage without the restriction should be returned instead.
*/
@ApiStatus.OverrideOnly
@Nullable
default Storage<ItemVariant> getItemStorage(Direction side) {
default Storage<ItemVariant> getItemStorage(@Nullable Direction side) {
return null;
}
}