mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
49 lines
1.5 KiB
Diff
49 lines
1.5 KiB
Diff
--- 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<ItemStack> getContents();
|
|
+
|
|
+ void onOpen(CraftHumanEntity who);
|
|
+
|
|
+ void onClose(CraftHumanEntity who);
|
|
+
|
|
+ java.util.List<org.bukkit.entity.HumanEntity> getViewers();
|
|
+
|
|
+ org.bukkit.inventory.@org.jetbrains.annotations.Nullable InventoryHolder getOwner(); // Paper - annotation
|
|
+
|
|
+ void setMaxStackSize(int size);
|
|
+
|
|
+ org.bukkit.Location getLocation();
|
|
+
|
|
+ int MAX_STACK = 99;
|
|
+ // CraftBukkit end
|
|
}
|