13
0
geforkt von Mirrors/Paper

[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.
Dieser Commit ist enthalten in:
GJ 2014-01-23 10:15:53 -08:00 committet von Travis Watkins
Ursprung a4fe7cd3c4
Commit 0a179711aa
4 geänderte Dateien mit 9 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -46,6 +46,12 @@ public class ContainerAnvilInventory extends InventorySubcontainer { // CraftBuk
this.setMaxStackSize(1); // CraftBukkit this.setMaxStackSize(1); // CraftBukkit
} }
// CraftBukkit start - override inherited maxStack from InventorySubcontainer
public int getMaxStackSize() {
return maxStack;
}
// CraftBukkit end
public void update() { public void update() {
super.update(); super.update();
this.a.a((IInventory) this); this.a.a((IInventory) this);

Datei anzeigen

@ -145,7 +145,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
} }
public int getMaxStackSize() { public int getMaxStackSize() {
return 64; return maxStack; // CraftBukkit
} }
public void b(int i) { public void b(int i) {

Datei anzeigen

@ -411,7 +411,7 @@ public class PlayerInventory implements IInventory {
} }
public int getMaxStackSize() { public int getMaxStackSize() {
return 64; return maxStack; // CraftBukkit
} }
public boolean b(Block block) { public boolean b(Block block) {

Datei anzeigen

@ -150,7 +150,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
} }
public int getMaxStackSize() { public int getMaxStackSize() {
return 64; return maxStack; // CraftBukkit
} }
public boolean a(EntityHuman entityhuman) { public boolean a(EntityHuman entityhuman) {