2024-12-13 19:17:03 +01:00
|
|
|
--- a/net/minecraft/world/Container.java
|
|
|
|
+++ b/net/minecraft/world/Container.java
|
|
|
|
@@ -24,9 +_,7 @@
|
|
|
|
|
|
|
|
void setItem(int slot, ItemStack stack);
|
|
|
|
|
|
|
|
- default int getMaxStackSize() {
|
|
|
|
- return 99;
|
|
|
|
- }
|
2024-12-19 11:30:22 +01:00
|
|
|
+ int getMaxStackSize(); // CraftBukkit
|
2024-12-13 19:17:03 +01:00
|
|
|
|
|
|
|
default int getMaxStackSize(ItemStack stack) {
|
|
|
|
return Math.min(this.getMaxStackSize(), stack.getMaxStackSize());
|
|
|
|
@@ -87,4 +_,22 @@
|
|
|
|
BlockPos blockPos = blockEntity.getBlockPos();
|
|
|
|
return level != null && level.getBlockEntity(blockPos) == blockEntity && player.canInteractWithBlock(blockPos, distance);
|
|
|
|
}
|
|
|
|
+
|
2024-12-19 11:30:22 +01:00
|
|
|
+ // CraftBukkit start
|
2024-12-13 19:17:03 +01:00
|
|
|
+ java.util.List<ItemStack> getContents();
|
|
|
|
+
|
2024-12-16 17:29:46 +01:00
|
|
|
+ void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity player);
|
2024-12-13 19:17:03 +01:00
|
|
|
+
|
2024-12-16 17:29:46 +01:00
|
|
|
+ void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity player);
|
2024-12-13 19:17:03 +01:00
|
|
|
+
|
|
|
|
+ java.util.List<org.bukkit.entity.HumanEntity> getViewers();
|
|
|
|
+
|
2024-12-19 11:30:22 +01:00
|
|
|
+ org.bukkit.inventory.@org.jetbrains.annotations.Nullable InventoryHolder getOwner();
|
2024-12-13 19:17:03 +01:00
|
|
|
+
|
|
|
|
+ void setMaxStackSize(int size);
|
|
|
|
+
|
|
|
|
+ org.bukkit.Location getLocation();
|
|
|
|
+
|
2024-12-16 17:29:46 +01:00
|
|
|
+ int MAX_STACK = Item.ABSOLUTE_MAX_STACK_SIZE;
|
2024-12-19 11:30:22 +01:00
|
|
|
+ // CraftBukkit end
|
2024-12-13 19:17:03 +01:00
|
|
|
}
|