Fix player inventory not getting properly updated when dumping into drawers.

This commit is contained in:
Justin Aquadro committed 2015-04-29 01:32:23 -04:00
1 parent 5b009b27e5
commit bf96d8c02f
2 files changed
+11

No files matched your search

@@ -213,6 +213,9 @@ public abstract class TileEntityDrawers extends TileEntity implements IDrawerGro
}
}
if (count > 0)
StorageDrawers.proxy.updatePlayerInventory(player);
markDirty();
return count;
}
@@ -1,5 +1,8 @@
package com.jaquadro.minecraft.storagedrawers.core;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
public class CommonProxy
{
public int drawersRenderID = -1;
@@ -7,4 +10,9 @@ public class CommonProxy
public void registerRenderers ()
{ }
public void updatePlayerInventory (EntityPlayer player) {
if (player instanceof EntityPlayerMP)
((EntityPlayerMP) player).sendContainerToPlayer(player.inventoryContainer);
}
}