Skip to content

Commit df60a87

Browse files
authored
Fix items don't drop after death (#28)
cleanroom's believe that this.field_71071_by (this.inventory) not empty, but we have plugins, because need to clear this.inventory. for save item drops after death, we need items in capturedDrops and don't clear this array
1 parent 07cf657 commit df60a87

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,8 @@
428428

429429
if (!this.field_70170_p.func_82736_K().func_82766_b("keepInventory") && !this.func_175149_v())
430430
{
431-
+ captureDrops = true;
432-
+ capturedDrops.clear();
433-
this.func_190776_cN();
434-
this.field_71071_by.func_70436_m();
435-
+
436-
+ captureDrops = false;
431+
- this.func_190776_cN();
432+
- this.field_71071_by.func_70436_m();
437433
+ net.minecraftforge.event.entity.player.PlayerDropsEvent event = new net.minecraftforge.event.entity.player.PlayerDropsEvent(this, p_70645_1_, capturedDrops, field_70718_bc > 0);
438434
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event))
439435
+ {

0 commit comments

Comments
 (0)