summaryrefslogtreecommitdiffstats
path: root/nms-patches/ContainerPlayer.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ContainerPlayer.patch')
-rw-r--r--nms-patches/ContainerPlayer.patch44
1 files changed, 37 insertions, 7 deletions
diff --git a/nms-patches/ContainerPlayer.patch b/nms-patches/ContainerPlayer.patch
index 1981486f..0bfc1e16 100644
--- a/nms-patches/ContainerPlayer.patch
+++ b/nms-patches/ContainerPlayer.patch
@@ -1,6 +1,6 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/ContainerPlayer.java 2014-11-28 17:43:43.021707437 +0000
-+++ src/main/java/net/minecraft/server/ContainerPlayer.java 2014-11-28 17:38:19.000000000 +0000
-@@ -1,15 +1,28 @@
+--- /home/matt/mc-dev-private//net/minecraft/server/ContainerPlayer.java 2015-02-26 22:40:22.427608141 +0000
++++ src/main/java/net/minecraft/server/ContainerPlayer.java 2015-02-26 22:40:22.427608141 +0000
+@@ -1,28 +1,42 @@
package net.minecraft.server;
+// CraftBukkit start
@@ -19,7 +19,7 @@
+ private PlayerInventory player;
+ // CraftBukkit end
- public ContainerPlayer(PlayerInventory playerinventory, boolean flag, EntityHuman entityhuman) {
+ public ContainerPlayer(final PlayerInventory playerinventory, boolean flag, EntityHuman entityhuman) {
this.g = flag;
this.h = entityhuman;
+ this.resultInventory = new InventoryCraftResult(); // CraftBukkit - moved to before InventoryCrafting construction
@@ -28,8 +28,38 @@
+ this.player = playerinventory; // CraftBukkit - save player
this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 144, 36)));
- int i;
-@@ -35,11 +48,22 @@
+- final int i;
++ // CraftBukkit - fixed multiple decompiler errors below, good luck
+ int j;
+
+- for (i = 0; i < 2; ++i) {
++ for (int i = 0; i < 2; ++i) {
+ for (j = 0; j < 2; ++j) {
+ this.a(new Slot(this.craftInventory, j + i * 2, 88 + j * 18, 26 + i * 18));
+ }
+ }
+
+- for (i = 0; i < 4; ++i) {
+- this.a(new Slot(playerinventory, playerinventory.getSize() - 1 - i, 8, 8 + i * 18) {
++ for (int ii = 0; ii < 4; ++ii) {
++ final int i = ii;
++ this.a(new Slot(playerinventory, playerinventory.getSize() - 1 - ii, 8, 8 + ii * 18) {
+ public int getMaxStackSize() {
+ return 1;
+ }
+@@ -33,21 +47,32 @@
+ });
+ }
+
+- for (i = 0; i < 3; ++i) {
++ for (int i = 0; i < 3; ++i) {
+ for (j = 0; j < 9; ++j) {
+ this.a(new Slot(playerinventory, j + (i + 1) * 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
+
+- for (i = 0; i < 9; ++i) {
++ for (int i = 0; i < 9; ++i) {
this.a(new Slot(playerinventory, i, 8 + i * 18, 142));
}
@@ -54,7 +84,7 @@
}
public void b(EntityHuman entityhuman) {
-@@ -119,4 +143,17 @@
+@@ -127,4 +152,17 @@
public boolean a(ItemStack itemstack, Slot slot) {
return slot.inventory != this.resultInventory && super.a(itemstack, slot);
}