summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
diff options
context:
space:
mode:
authorGJ <gjmcferrin@gmail.com>2014-01-23 10:15:53 -0800
committerTravis Watkins <amaranth@ubuntu.com>2014-04-18 10:11:23 -0500
commit0a179711aaadabd5974ad23401e0c07210b87cc6 (patch)
tree4200cb696a9db2dbc65c9a51dba1d72d88ccc1ad /src/main/java/net/minecraft
parenta4fe7cd3c4a4f04d67c12e0addb20c2acd146273 (diff)
downloadcraftbukkit-0a179711aaadabd5974ad23401e0c07210b87cc6.tar
craftbukkit-0a179711aaadabd5974ad23401e0c07210b87cc6.tar.gz
craftbukkit-0a179711aaadabd5974ad23401e0c07210b87cc6.tar.lz
craftbukkit-0a179711aaadabd5974ad23401e0c07210b87cc6.tar.xz
craftbukkit-0a179711aaadabd5974ad23401e0c07210b87cc6.zip
[Bleeding] Fix some inventories not using maxStack. Fixes BUKKIT-2883
CraftBukkit adds the ability to specify the maxStack size for most inventories. However, some inventories were not overriding the getMaxStack method properly, and so the functionality was unavailable. This fixes the maxStack setting for Anvils, Minecarts, PlayerInventory, and Hoppers.
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r--src/main/java/net/minecraft/server/ContainerAnvilInventory.java6
-rw-r--r--src/main/java/net/minecraft/server/EntityMinecartContainer.java2
-rw-r--r--src/main/java/net/minecraft/server/PlayerInventory.java2
-rw-r--r--src/main/java/net/minecraft/server/TileEntityHopper.java2
4 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/ContainerAnvilInventory.java b/src/main/java/net/minecraft/server/ContainerAnvilInventory.java
index 20d7c69c..1afa6e79 100644
--- a/src/main/java/net/minecraft/server/ContainerAnvilInventory.java
+++ b/src/main/java/net/minecraft/server/ContainerAnvilInventory.java
@@ -46,6 +46,12 @@ public class ContainerAnvilInventory extends InventorySubcontainer { // CraftBuk
this.setMaxStackSize(1); // CraftBukkit
}
+ // CraftBukkit start - override inherited maxStack from InventorySubcontainer
+ public int getMaxStackSize() {
+ return maxStack;
+ }
+ // CraftBukkit end
+
public void update() {
super.update();
this.a.a((IInventory) this);
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index 9f3f196b..b599eeba 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -145,7 +145,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
}
public int getMaxStackSize() {
- return 64;
+ return maxStack; // CraftBukkit
}
public void b(int i) {
diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java
index 83cbb97c..e9b49d1e 100644
--- a/src/main/java/net/minecraft/server/PlayerInventory.java
+++ b/src/main/java/net/minecraft/server/PlayerInventory.java
@@ -411,7 +411,7 @@ public class PlayerInventory implements IInventory {
}
public int getMaxStackSize() {
- return 64;
+ return maxStack; // CraftBukkit
}
public boolean b(Block block) {
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index 3f1a910e..48a882ac 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -150,7 +150,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
}
public int getMaxStackSize() {
- return 64;
+ return maxStack; // CraftBukkit
}
public boolean a(EntityHuman entityhuman) {