PaperMC/paper-server/nms-patches/net/minecraft/world/IInventory.patch
CraftBukkit/Spigot 43702a9e10 Update to Minecraft 1.18-pre5
By: md_5 <git@md-5.net>
2021-11-22 09:00:00 +11:00

55 lines
1.2 KiB
Diff

--- a/net/minecraft/world/IInventory.java
+++ b/net/minecraft/world/IInventory.java
@@ -5,6 +5,11 @@
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
+// CraftBukkit start
+import net.minecraft.world.item.crafting.IRecipe;
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+// CraftBukkit end
+
public interface IInventory extends Clearable {
int LARGE_MAX_STACK_SIZE = 64;
@@ -21,9 +26,7 @@
void setItem(int i, ItemStack itemstack);
- default int getMaxStackSize() {
- return 64;
- }
+ int getMaxStackSize(); // CraftBukkit
void setChanged();
@@ -62,4 +65,29 @@
return false;
}
+
+ // 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();
+
+ default IRecipe getCurrentRecipe() {
+ return null;
+ }
+
+ default void setCurrentRecipe(IRecipe recipe) {
+ }
+
+ int MAX_STACK = 64;
+ // CraftBukkit end
}