I'm playing on Survival. I typed /gamerule keepinventory true. It said you don't have permission to use this. I clicked Open to Lan and switched Allow Cheats:On, then typed the command. It seemed to work this time. I got the confirmation message. Then, I died but I didn't keep my inventory. What gives?
I think you misspelled "keepInventory" it seems to have a capital "I" so if I understand how it works you have created a new gamerule that doesn't do anything.
You might try looking at your player.dat information and see if the keepInventory bit is true. Or maybe it's a world.dat bit. Not sure. But check it manually and see what it says. I've been using Universal Minecraft Editor lately. You can see both player.dat stuff and world stuff.
You might try looking at your player.dat information and see if the keepInventory bit is true. Or maybe it's a world.dat bit. Not sure. But check it manually and see what it says. I've been using Universal Minecraft Editor lately. You can see both player.dat stuff and world stuff.
Where can we find the player.dat information please?
Can't see it in any of the folders.
Well, if you download Universal Minecraft Editor, it'll locate everything for you. Otherwise, if you really wanna know, type in %AppData% in an explorer window. It'll take you to somewhere like C:\Users\danie\AppData\Roaming. At or near the top you'll see .minecraft. Click that and then go to 'saves'. Open the folder for the world you wanna look at. In there you'll see a level.dat file and a folder called playerdata. In the playerdata folder will be all of the .dat files for each player in the world. To note, it's really hard to figure out which .dat file belongs to which player - they seem to have hashed or coded names. Even in UME you'll have this issue, where the player.dat files won't have easily identifiable markers. But you will be able to look at each one in UME and see whether keepInventory is true.
** I just opened up UME and checked. It's in the level.dat file. Make sure it's actually true there.
I think you misspelled "keepInventory" it seems to have a capital "I" so if I understand how it works you have created a new gamerule that doesn't do anything.
This is most likely the issue; you MUST use the exact capitalization or the game will think you entered in something entirely different, which has been the case since 1.8 added the ability to make your own gamerules (prior to then, e.g. in 1.6.4, you get a clear error message telling you that the gamerule doesn't exist but 1.8+ just acts like you set it without even telling you that you created a new gamerule, which would help reduce errors like this):
It is a good idea to use tab to autocomplete when you enter gamerules so you don't misspell them (note that the misspelled/capitalized gamerule will be listed as well, I think you can only remove it by using an NBT editor to delete the entry from level.dat)
@TheMasterCaver - Holy cow. I was gonna argue that they said the command had returned true, and it shouldn't have. Except it does. Apparently it doesn't parse out incorrect rule names. Didn't know that.
I'm playing on Survival. I typed /gamerule keepinventory true. It said you don't have permission to use this. I clicked Open to Lan and switched Allow Cheats:On, then typed the command. It seemed to work this time. I got the confirmation message. Then, I died but I didn't keep my inventory. What gives?
Same problem here. Playing 1.12.2.
Maybe it's a different command these days?
I think you misspelled "keepInventory" it seems to have a capital "I" so if I understand how it works you have created a new gamerule that doesn't do anything.
Just testing.
You might try looking at your player.dat information and see if the keepInventory bit is true. Or maybe it's a world.dat bit. Not sure. But check it manually and see what it says. I've been using Universal Minecraft Editor lately. You can see both player.dat stuff and world stuff.
Where can we find the player.dat information please?
Can't see it in any of the folders.
Well, if you download Universal Minecraft Editor, it'll locate everything for you. Otherwise, if you really wanna know, type in %AppData% in an explorer window. It'll take you to somewhere like C:\Users\danie\AppData\Roaming. At or near the top you'll see .minecraft. Click that and then go to 'saves'. Open the folder for the world you wanna look at. In there you'll see a level.dat file and a folder called playerdata. In the playerdata folder will be all of the .dat files for each player in the world. To note, it's really hard to figure out which .dat file belongs to which player - they seem to have hashed or coded names. Even in UME you'll have this issue, where the player.dat files won't have easily identifiable markers. But you will be able to look at each one in UME and see whether keepInventory is true.
** I just opened up UME and checked. It's in the level.dat file. Make sure it's actually true there.
This is most likely the issue; you MUST use the exact capitalization or the game will think you entered in something entirely different, which has been the case since 1.8 added the ability to make your own gamerules (prior to then, e.g. in 1.6.4, you get a clear error message telling you that the gamerule doesn't exist but 1.8+ just acts like you set it without even telling you that you created a new gamerule, which would help reduce errors like this):
https://bugs.mojang.com/browse/MC-65113
It is a good idea to use tab to autocomplete when you enter gamerules so you don't misspell them (note that the misspelled/capitalized gamerule will be listed as well, I think you can only remove it by using an NBT editor to delete the entry from level.dat)
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
@TheMasterCaver - Holy cow. I was gonna argue that they said the command had returned true, and it shouldn't have. Except it does. Apparently it doesn't parse out incorrect rule names. Didn't know that.
I already looked at the .dat file but couldn't read it as I don't have UME.
But I did try /gamerule keepInventory true and that worked.
So it is just that we had not used a capital I.
Thanks from me to all.
Same for me. The lower case i was the problem. Thanks, guys.