3
0

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

@ -34,7 +34,7 @@
+ this.theReportCategory.addCrashSectionCallable("KCauldron Version", new Callable<String>() { + this.theReportCategory.addCrashSectionCallable("KCauldron Version", new Callable<String>() {
+ @Override + @Override
+ public String call() throws Exception { + public String call() throws Exception {
+ return String.format("%s:%s:%s", KCauldron.getGroup(), KCauldron.getChannel(), KCauldron.getCurrentVersion()); + return String.format("%s:%s:%s %s", KCauldron.getGroup(), KCauldron.getChannel(), KCauldron.getCurrentVersion(), KCauldron.isOfficial() ? "Official" : "UNOFFICIAL DON'T REPORT THIS CRASH");
+ } + }
+ }); + });
+ this.theReportCategory.addCrashSectionCallable("Plugins", new Callable<String>() { + this.theReportCategory.addCrashSectionCallable("Plugins", new Callable<String>() {

View File

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