--- a/net/minecraft/world/Container.java +++ b/net/minecraft/world/Container.java @@ -6,8 +6,12 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +// CraftBukkit end public interface Container extends Clearable { @@ -25,9 +29,7 @@ void setItem(int slot, ItemStack stack); - default int getMaxStackSize() { - return 99; - } + int getMaxStackSize(); // CraftBukkit default int getMaxStackSize(ItemStack stack) { return Math.min(this.getMaxStackSize(), stack.getMaxStackSize()); @@ -91,4 +93,22 @@ return world == null ? false : (world.getBlockEntity(blockposition) != blockEntity ? false : player.canInteractWithBlock(blockposition, (double) range)); } + + // CraftBukkit start + java.util.List getContents(); + + void onOpen(CraftHumanEntity who); + + void onClose(CraftHumanEntity who); + + java.util.List getViewers(); + + org.bukkit.inventory.InventoryHolder getOwner(); + + void setMaxStackSize(int size); + + org.bukkit.Location getLocation(); + + int MAX_STACK = 99; + // CraftBukkit end }