0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2024-11-24 15:46:15 +00:00
craftbukkit/nms-patches/net/minecraft/world/IInventory.patch
2024-06-14 01:05:00 +10:00

49 lines
1.3 KiB
Diff

--- a/net/minecraft/world/IInventory.java
+++ b/net/minecraft/world/IInventory.java
@@ -9,6 +9,11 @@
import net.minecraft.world.level.World;
import net.minecraft.world.level.block.entity.TileEntity;
+// CraftBukkit start
+import net.minecraft.world.item.crafting.RecipeHolder;
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+// CraftBukkit end
+
public interface IInventory extends Clearable {
float DEFAULT_DISTANCE_BUFFER = 4.0F;
@@ -25,9 +30,7 @@
void setItem(int i, ItemStack itemstack);
- default int getMaxStackSize() {
- return 99;
- }
+ int getMaxStackSize(); // CraftBukkit
default int getMaxStackSize(ItemStack itemstack) {
return Math.min(this.getMaxStackSize(), itemstack.getMaxStackSize());
@@ -91,4 +94,22 @@
return world == null ? false : (world.getBlockEntity(blockposition) != tileentity ? false : entityhuman.canInteractWithBlock(blockposition, (double) f));
}
+
+ // 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.InventoryHolder getOwner();
+
+ void setMaxStackSize(int size);
+
+ org.bukkit.Location getLocation();
+
+ int MAX_STACK = 99;
+ // CraftBukkit end
}