diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-08-03 19:18:23 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-08-03 19:30:04 -0500 |
commit | 4942f5184a29e945d7b47aaf8b93f668ea20ce28 (patch) | |
tree | 8480530930935af3038ff127e35707b6c84e4d66 /src/main | |
parent | 8834d1423eddefc4f94c268fd1bbca3af79762c9 (diff) | |
download | craftbukkit-4942f5184a29e945d7b47aaf8b93f668ea20ce28.tar craftbukkit-4942f5184a29e945d7b47aaf8b93f668ea20ce28.tar.gz craftbukkit-4942f5184a29e945d7b47aaf8b93f668ea20ce28.tar.lz craftbukkit-4942f5184a29e945d7b47aaf8b93f668ea20ce28.tar.xz craftbukkit-4942f5184a29e945d7b47aaf8b93f668ea20ce28.zip |
Don't merge items with enchantments. Fixes BUKKIT-2050
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityItem.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java index e4b95267..5003452c 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -122,6 +122,10 @@ public class EntityItem extends Entity { return entityitem.a(this); } else if (entityitem.itemStack.count + this.itemStack.count > entityitem.itemStack.getMaxStackSize()) { return false; + // CraftBukkit start - don't merge items with enchantments + } else if (entityitem.itemStack.hasEnchantments() || this.itemStack.hasEnchantments()) { + return false; + // CraftBukkit end } else { entityitem.itemStack.count += this.itemStack.count; entityitem.pickupDelay = Math.max(entityitem.pickupDelay, this.pickupDelay); |