create TileStateInventoryHolder

a missing interface to centralize getSnapshotInventory methods
This commit is contained in:
Jake Potrebic
2024-09-20 21:40:23 -07:00
parent cd6fb23fab
commit 4fb38d1c36
6 changed files with 52 additions and 70 deletions

View File

@@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents a captured state of a chiseled bookshelf.
*/
public interface ChiseledBookshelf extends TileState, BlockInventoryHolder {
public interface ChiseledBookshelf extends io.papermc.paper.block.TileStateInventoryHolder { // Paper - TileStateInventoryHolder
/**
* Gets the last interacted inventory slot.
@@ -24,18 +24,12 @@ public interface ChiseledBookshelf extends TileState, BlockInventoryHolder {
*/
void setLastInteractedSlot(int lastInteractedSlot);
/**
* @return inventory
* @see Container#getInventory()
*/
// Paper - move docs to TileStateInventoryHolder
@NotNull
@Override
ChiseledBookshelfInventory getInventory();
/**
* @return snapshot inventory
* @see Container#getSnapshotInventory()
*/
@Override // Paper - move docs to TileStateInventoryHolder
@NotNull
ChiseledBookshelfInventory getSnapshotInventory();