Skip to content

Commit

Permalink
Mark SidedStorageBlockEntity's side as nullable (#3281)
Browse files Browse the repository at this point in the history
  • Loading branch information
deirn authored Sep 3, 2023
1 parent 8cafc14 commit 195226a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,23 @@
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;
}
}

0 comments on commit 195226a

Please sign in to comment.