mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-21 03:10:54 -04:00
Mark SidedStorageBlockEntity
's side as nullable (#3281)
(cherry picked from commit 195226a756
)
This commit is contained in:
parent
0287208bff
commit
ceabd7613a
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue