mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-20 12:20:05 +00:00
Fix player inventory not getting properly updated when dumping into drawers.
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user