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:
Ursprung
a4fe7cd3c4
Commit
0a179711aa
@ -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);
|
||||
|
@ -145,7 +145,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
return 64;
|
||||
return maxStack; // CraftBukkit
|
||||
}
|
||||
|
||||
public void b(int i) {
|
||||
|
@ -411,7 +411,7 @@ public class PlayerInventory implements IInventory {
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
return 64;
|
||||
return maxStack; // CraftBukkit
|
||||
}
|
||||
|
||||
public boolean b(Block block) {
|
||||
|
@ -150,7 +150,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
return 64;
|
||||
return maxStack; // CraftBukkit
|
||||
}
|
||||
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren