2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/IInventory.java
|
|
|
|
+++ b/net/minecraft/world/IInventory.java
|
2023-03-14 17:30:00 +01:00
|
|
|
@@ -9,6 +9,11 @@
|
|
|
|
import net.minecraft.world.level.World;
|
|
|
|
import net.minecraft.world.level.block.entity.TileEntity;
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2021-03-15 23:00:00 +01:00
|
|
|
+// CraftBukkit start
|
2023-09-21 18:40:00 +02:00
|
|
|
+import net.minecraft.world.item.crafting.RecipeHolder;
|
2021-03-15 23:00:00 +01:00
|
|
|
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
|
|
|
+// CraftBukkit end
|
2021-03-08 22:47:33 +01:00
|
|
|
+
|
2019-04-23 04:00:00 +02:00
|
|
|
public interface IInventory extends Clearable {
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
int LARGE_MAX_STACK_SIZE = 64;
|
2023-03-14 17:30:00 +01:00
|
|
|
@@ -26,9 +31,7 @@
|
2019-04-23 04:00:00 +02:00
|
|
|
|
|
|
|
void setItem(int i, ItemStack itemstack);
|
|
|
|
|
|
|
|
- default int getMaxStackSize() {
|
|
|
|
- return 64;
|
|
|
|
- }
|
|
|
|
+ int getMaxStackSize(); // CraftBukkit
|
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
void setChanged();
|
2019-04-23 04:00:00 +02:00
|
|
|
|
2023-03-14 17:30:00 +01:00
|
|
|
@@ -88,4 +91,29 @@
|
2019-04-23 04:00:00 +02:00
|
|
|
|
2023-03-14 17:30:00 +01:00
|
|
|
return world == null ? false : (world.getBlockEntity(blockposition) != tileentity ? false : entityhuman.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) <= (double) (i * i));
|
2018-07-15 02:00:00 +02:00
|
|
|
}
|
2015-02-26 23:41:06 +01:00
|
|
|
+
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit start
|
2016-11-17 02:41:03 +01:00
|
|
|
+ java.util.List<ItemStack> getContents();
|
2014-11-25 22:32:16 +01: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-02-29 22:32:46 +01:00
|
|
|
+ org.bukkit.Location getLocation();
|
|
|
|
+
|
2023-09-21 18:40:00 +02:00
|
|
|
+ default RecipeHolder<?> getCurrentRecipe() {
|
2018-07-15 02:00:00 +02:00
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
2023-09-21 18:40:00 +02:00
|
|
|
+ default void setCurrentRecipe(RecipeHolder<?> recipe) {
|
2018-07-15 02:00:00 +02:00
|
|
|
+ }
|
|
|
|
+
|
2014-11-25 22:32:16 +01:00
|
|
|
+ int MAX_STACK = 64;
|
|
|
|
+ // CraftBukkit end
|
|
|
|
}
|