mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Rebuild our patches for upstream changes
This commit is contained in:
@@ -400,89 +400,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Slot.java b/src/main/java/net/minecraft/server/Slot.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/Slot.java
|
||||
@@ -0,0 +0,0 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+public class Slot {
|
||||
+
|
||||
+ public final int index;
|
||||
+ public final IInventory inventory;
|
||||
+ public int rawSlotIndex;
|
||||
+ public int f;
|
||||
+ public int g;
|
||||
+
|
||||
+ public Slot(IInventory iinventory, int i, int j, int k) {
|
||||
+ this.inventory = iinventory;
|
||||
+ this.index = i;
|
||||
+ this.f = j;
|
||||
+ this.g = k;
|
||||
+ }
|
||||
+
|
||||
+ public void a(ItemStack itemstack, ItemStack itemstack1) {
|
||||
+ if (itemstack != null && itemstack1 != null) {
|
||||
+ if (itemstack.getItem() == itemstack1.getItem()) {
|
||||
+ int i = itemstack1.count - itemstack.count;
|
||||
+
|
||||
+ if (i > 0) {
|
||||
+ this.a(itemstack, i);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected void a(ItemStack itemstack, int i) {}
|
||||
+
|
||||
+ protected void c(ItemStack itemstack) {}
|
||||
+
|
||||
+ public void a(EntityHuman entityhuman, ItemStack itemstack) {
|
||||
+ this.f();
|
||||
+ }
|
||||
+
|
||||
+ public boolean isAllowed(ItemStack itemstack) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public ItemStack getItem() {
|
||||
+ return this.inventory.getItem(this.index);
|
||||
+ }
|
||||
+
|
||||
+ public boolean hasItem() {
|
||||
+ return this.getItem() != null;
|
||||
+ }
|
||||
+
|
||||
+ public void set(ItemStack itemstack) {
|
||||
+ this.inventory.setItem(this.index, itemstack);
|
||||
+ this.f();
|
||||
+ }
|
||||
+
|
||||
+ public void f() {
|
||||
+ this.inventory.update();
|
||||
+ }
|
||||
+
|
||||
+ public int getMaxStackSize() {
|
||||
+ return this.inventory.getMaxStackSize();
|
||||
+ }
|
||||
+
|
||||
+ public int getMaxStackSize(ItemStack itemstack) {
|
||||
+ return this.getMaxStackSize();
|
||||
+ }
|
||||
+
|
||||
+ public ItemStack a(int i) {
|
||||
+ return this.inventory.splitStack(this.index, i);
|
||||
+ }
|
||||
+
|
||||
+ public boolean a(IInventory iinventory, int i) {
|
||||
+ return iinventory == this.inventory && i == this.index;
|
||||
+ }
|
||||
+
|
||||
+ public boolean isAllowed(EntityHuman entityhuman) {
|
||||
+ return true;
|
||||
+ }
|
||||
+}
|
||||
--
|
Reference in New Issue
Block a user