diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-12-12 03:03:01 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-12-12 03:08:14 -0600 |
commit | 24c04dc78443324566d7e853a73b3ae29867d84d (patch) | |
tree | f7e05dc7ef56dd3b5d0563a0035fab926e96b747 | |
parent | 4e91fbd0dbcc3a56b5b61e287a87e91079edec33 (diff) | |
download | craftbukkit-24c04dc78443324566d7e853a73b3ae29867d84d.tar craftbukkit-24c04dc78443324566d7e853a73b3ae29867d84d.tar.gz craftbukkit-24c04dc78443324566d7e853a73b3ae29867d84d.tar.lz craftbukkit-24c04dc78443324566d7e853a73b3ae29867d84d.tar.xz craftbukkit-24c04dc78443324566d7e853a73b3ae29867d84d.zip |
Don't run mob pickup code on players. Fixes BUKKIT-3150
When a player has canPickUpLoot set to true the code for mob pickup is
triggerd which does not know how to deal with player inventory. Since
players have their own logic for picking up items we simply disable this
code for them.
-rw-r--r-- | src/main/java/net/minecraft/server/EntityLiving.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index 5cbac214..5f6a40bb 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1274,7 +1274,8 @@ public abstract class EntityLiving extends Entity { this.world.methodProfiler.b(); this.world.methodProfiler.a("looting"); - if (!this.world.isStatic && this.canPickUpLoot && !this.bb && this.world.getGameRules().getBoolean("mobGriefing")) { + // CraftBukkit - Don't run mob pickup code on players + if (!this.world.isStatic && !(this instanceof EntityPlayer) && this.canPickUpLoot && !this.bb && this.world.getGameRules().getBoolean("mobGriefing")) { List list = this.world.a(EntityItem.class, this.boundingBox.grow(1.0D, 0.0D, 1.0D)); Iterator iterator = list.iterator(); |