forked from xjboss/KCauldronX
Fix inventory wiping on keepInventory=true
This commit is contained in:
parent
0b251c5440
commit
84276822ea
@ -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>() {
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user