mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 04:33:56 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/server/PlayerInventory.java
|
||||
+++ b/net/minecraft/server/PlayerInventory.java
|
||||
@@ -5,6 +5,15 @@
|
||||
import java.util.List;
|
||||
@@ -6,6 +6,15 @@
|
||||
import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -16,7 +16,7 @@
|
||||
public class PlayerInventory implements IInventory {
|
||||
|
||||
public final NonNullList<ItemStack> items;
|
||||
@@ -16,6 +25,49 @@
|
||||
@@ -17,6 +26,49 @@
|
||||
private ItemStack carried;
|
||||
private int h;
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
public PlayerInventory(EntityHuman entityhuman) {
|
||||
this.items = NonNullList.a(36, ItemStack.a);
|
||||
this.armor = NonNullList.a(4, ItemStack.a);
|
||||
@@ -41,6 +93,23 @@
|
||||
return itemstack.getItem() == itemstack1.getItem() && (!itemstack.usesData() || itemstack.getData() == itemstack1.getData()) && ItemStack.equals(itemstack, itemstack1);
|
||||
@@ -42,6 +94,23 @@
|
||||
return itemstack.getItem() == itemstack1.getItem() && ItemStack.equals(itemstack, itemstack1);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start - Watch method above! :D
|
||||
@@ -78,7 +78,7 @@
|
||||
+ if (itemstack1.isEmpty()) return itemstack.getCount();
|
||||
+
|
||||
+ // Taken from firstPartial(ItemStack)
|
||||
+ if (!itemstack1.isEmpty() && itemstack1.getItem() == itemstack.getItem() && itemstack1.isStackable() && itemstack1.getCount() < itemstack1.getMaxStackSize() && itemstack1.getCount() < this.getMaxStackSize() && (!itemstack1.usesData() || itemstack1.getData() == itemstack.getData()) && ItemStack.equals(itemstack1, itemstack)) {
|
||||
+ if (!this.a(itemstack, itemstack1)) {
|
||||
+ remains -= (itemstack1.getMaxStackSize() < this.getMaxStackSize() ? itemstack1.getMaxStackSize() : this.getMaxStackSize()) - itemstack1.getCount();
|
||||
+ }
|
||||
+ if (remains <= 0) return itemstack.getCount();
|
||||
@@ -90,7 +90,7 @@
|
||||
public int getFirstEmptySlotIndex() {
|
||||
for (int i = 0; i < this.items.size(); ++i) {
|
||||
if (((ItemStack) this.items.get(i)).isEmpty()) {
|
||||
@@ -524,7 +593,7 @@
|
||||
@@ -502,7 +571,7 @@
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
@@ -99,7 +99,7 @@
|
||||
}
|
||||
|
||||
public boolean b(IBlockData iblockdata) {
|
||||
@@ -580,6 +649,11 @@
|
||||
@@ -552,6 +621,11 @@
|
||||
}
|
||||
|
||||
public ItemStack getCarried() {
|
||||
|
Reference in New Issue
Block a user