27 lines
806 B
Java
27 lines
806 B
Java
// SPDX-FileCopyrightText: 2018 The CC: Tweaked Developers
|
|
//
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package dan200.computercraft.shared.container;
|
|
|
|
import net.minecraft.core.Direction;
|
|
import net.minecraft.world.WorldlyContainer;
|
|
import net.minecraft.world.item.ItemStack;
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
/**
|
|
* A basic implementation of {@link WorldlyContainer} which operates on a {@linkplain #getItems() list of stacks}.
|
|
*/
|
|
public interface BasicWorldlyContainer extends BasicContainer, WorldlyContainer {
|
|
@Override
|
|
default boolean canPlaceItemThroughFace(int slot, ItemStack stack, @Nullable Direction side) {
|
|
return canPlaceItem(slot, stack);
|
|
}
|
|
|
|
@Override
|
|
default boolean canTakeItemThroughFace(int slot, ItemStack stack, Direction side) {
|
|
return true;
|
|
}
|
|
}
|