Filter negative values for all items.

This commit is contained in:
Travis Watkins 2013-03-16 13:26:29 -05:00
parent 6d88d545e9
commit 515830cda9

View File

@ -151,14 +151,12 @@ public final class ItemStack {
public void setData(int i) {
// CraftBukkit start - filter out data for items that shouldn't have it
if (!this.usesData()) {
this.damage = 0;
return;
i = 0;
}
// Filter wool to avoid confusing the client
if (this.id == Block.WOOL.id) {
this.damage = Math.min(15, i);
return;
i = Math.min(15, i);
}
// CraftBukkit end