1
0
forked from xjboss/KCauldronX

Fix inventory wiping on keepInventory=true

This commit is contained in:
Sergey Shatunov
2016-02-06 15:19:45 +07:00
parent 0b251c5440
commit 84276822ea
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ public enum ReverseClonner {
EntityPlayerMP shadowCopy = new EntityPlayerMP(player.mcServer, (WorldServer) player.worldObj,
player.getGameProfile(), new ItemInWorldManager(player.worldObj));
shadowCopy.clonePlayer(player, true);
if (wasDeath) {
if (wasDeath && !player.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) {
player.inventory.clearInventory(null, -1);
player.inventoryContainer = new ContainerPlayer(player.inventory, !player.worldObj.isRemote, player);
}