Commits
md_5 authored bf43ca62a65
357 357 | + // CraftBukkit end |
358 358 | + |
359 359 | } catch (Throwable throwable) { |
360 360 | CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); |
361 361 | CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); |
362 362 | |
363 363 | |
364 364 | public EntityItem a(ItemStack itemstack, float f) { |
365 365 | if (itemstack.count != 0 && itemstack.getItem() != null) { |
366 366 | + // CraftBukkit start - Capture drops for death event |
367 - | + if (this instanceof EntityLiving && ((EntityLiving) this).drops != null) { |
367 + | + if (this instanceof EntityLiving) { |
368 368 | + ((EntityLiving) this).drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); |
369 369 | + return null; |
370 370 | + } |
371 371 | + // CraftBukkit end |
372 372 | EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY + (double) f, this.locZ, itemstack); |
373 373 | |
374 374 | entityitem.q(); |
375 375 | |
376 376 | if (entity.by() != this) { |
377 377 | throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); |