2021-03-16 09:00:00 +11:00
|
|
|
--- a/net/minecraft/world/IInventory.java
|
|
|
|
+++ b/net/minecraft/world/IInventory.java
|
2025-03-26 03:05:00 +11:00
|
|
|
@@ -11,6 +11,11 @@
|
2023-03-15 03:30:00 +11:00
|
|
|
import net.minecraft.world.level.World;
|
|
|
|
import net.minecraft.world.level.block.entity.TileEntity;
|
2014-11-26 08:32:16 +11:00
|
|
|
|
2021-03-16 09:00:00 +11:00
|
|
|
+// CraftBukkit start
|
2023-09-22 02:40:00 +10:00
|
|
|
+import net.minecraft.world.item.crafting.RecipeHolder;
|
2021-03-16 09:00:00 +11:00
|
|
|
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
|
|
|
+// CraftBukkit end
|
2021-03-09 08:47:33 +11:00
|
|
|
+
|
2025-03-26 03:05:00 +11:00
|
|
|
public interface IInventory extends Clearable, Iterable<ItemStack> {
|
2019-04-23 12:00:00 +10:00
|
|
|
|
2024-04-24 01:15:00 +10:00
|
|
|
float DEFAULT_DISTANCE_BUFFER = 4.0F;
|
2025-03-26 03:05:00 +11:00
|
|
|
@@ -27,9 +32,7 @@
|
2019-04-23 12:00:00 +10:00
|
|
|
|
|
|
|
void setItem(int i, ItemStack itemstack);
|
|
|
|
|
|
|
|
- default int getMaxStackSize() {
|
2024-04-24 01:15:00 +10:00
|
|
|
- return 99;
|
2019-04-23 12:00:00 +10:00
|
|
|
- }
|
|
|
|
+ int getMaxStackSize(); // CraftBukkit
|
|
|
|
|
2024-04-24 01:15:00 +10:00
|
|
|
default int getMaxStackSize(ItemStack itemstack) {
|
|
|
|
return Math.min(this.getMaxStackSize(), itemstack.getMaxStackSize());
|
2025-03-26 03:05:00 +11:00
|
|
|
@@ -94,6 +97,24 @@
|
|
|
|
return new IInventory.a(this);
|
2018-07-15 10:00:00 +10:00
|
|
|
}
|
2025-03-26 03:05:00 +11:00
|
|
|
|
2014-11-26 08:32:16 +11:00
|
|
|
+ // CraftBukkit start
|
2016-11-17 12:41:03 +11:00
|
|
|
+ java.util.List<ItemStack> getContents();
|
2014-11-26 08:32:16 +11:00
|
|
|
+
|
|
|
|
+ void onOpen(CraftHumanEntity who);
|
|
|
|
+
|
|
|
|
+ void onClose(CraftHumanEntity who);
|
|
|
|
+
|
|
|
|
+ java.util.List<org.bukkit.entity.HumanEntity> getViewers();
|
|
|
|
+
|
|
|
|
+ org.bukkit.inventory.InventoryHolder getOwner();
|
|
|
|
+
|
|
|
|
+ void setMaxStackSize(int size);
|
|
|
|
+
|
2016-03-01 08:32:46 +11:00
|
|
|
+ org.bukkit.Location getLocation();
|
|
|
|
+
|
2024-04-24 01:15:00 +10:00
|
|
|
+ int MAX_STACK = 99;
|
2014-11-26 08:32:16 +11:00
|
|
|
+ // CraftBukkit end
|
2025-03-26 03:05:00 +11:00
|
|
|
+
|
|
|
|
public static class a implements Iterator<ItemStack> {
|
|
|
|
|
|
|
|
private final IInventory container;
|