mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 13:07:06 +01:00
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.
This commit is contained in:
parent
4e91fbd0db
commit
24c04dc784
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue