There's pretty much always some topic or another on the front page here asking for help with hex-editing one's inventory, so I'm going to attempt to explain it all as basically as I can, so everyone can understand how it's done. If anything below is unclear, please let me know, so I can explain it better!
You should read this entire post before proceeding to edit your level.dat, to make sure you understand what you're doing.
The first thing I should mention is the various inventory editors available to us now. They completely eliminate the need for hex-editing, so check them out in the spoiler below:
PocketInvEditor, by 500 Internal Server Error.
If you're on an Android device, then this app is definitely the way to go. It can put anything in your inventory that hexing can, and it's MUCH easier. Play Store link Thread link <-- Use this one if you don't have the Google Play Store.
MCPEedit, by Jocoba3.
This one works on Linux, Mac, and Windows. Thread Link
iMCPEdit, by Intyre.
And editor-in-progress for iOS. Thread Link
Anyway, with that said, now we dive in and learn how to do it the old fashioned way.
Question:Could you please explain how you get hex numbers from an original number? Answer is in the spoiler:
Could you please explain how you get hex numbers from an original number? (eg- 39 = 27 in hex)
Lucky for me, the hex-dec converter is part of the editor I'm using. It's a Mac app called "Hex Fiend".
See at the bottom of the window where it says "(select less data)" ...If I select just 1 or 2 bytes, it converts the values to decimal there.
Most hex editors out there have some sort of byte conversion feature like this, though they might not all be so easy to find/use, depending on the app. If all else fails, this site can be very helpful.
Also, the Wiki's Data Values page lists both dec and hex values for all items.
What I have selected in the hex editor below is 1 item slot. In this case, it's mossy cobble I hacked in. Let me break it all down: The count is currently 39 (27 in hex). For a full stack of 64 (40 in hex), type 40 in the count field.
For a stack of 99, type 63. Reference the table in the spoiler above for a full list.
If you're changing one of the infinite items (bricks, glass, & shears), the count will be 01, so be sure to raise it up, so you get more than 1 of the new item. The damage value is 0. This is used for tools, logs, leaves, slabs, and wools.
TOOLS can be repaired by resetting the damage value to 0.
Damage values for LEAVES: Block 18 (hex: 12). 00: | 01: | 02:
If you can't tell the difference, 00 is oak, 01 pine, 02 birch.
Damage values for SLABS: Block 43 (hex: 2B) for double slabs, 44 (hex: 2C) for singles. 00: | 01: | 02: | 03: | 04: | 06:
Double-stacked 44:0 and 44:6 are slightly different:
Damage values for WOOLS: Wool is always block 35 (hex: 23), with one of the damage values below to determine color.
Decimal values above
Hex values below
The slot ID should not be changed, under normal circumstances. The item ID is 48 (30 in hex). The ID is the last piece of data in each slot. When editing attributes of an item, such as count or damage, they always occur before the item ID itself.
Most blocks have 2-digit hex IDs. These should always have two tailing zeros.
So a block of wool, hex ID 23, would be entered as 2300. The 00 will probably already be there when you go to edit it.
When adding tools, or other items that have 3-digit hex IDs, they need to be reversed.
So with, say a diamond sword, ID 114, add a leading 0 so it's 4 digits; 0114, then swap the pairs; 1401
With a wooden door, ID 324: make it 4 digits; 0324, swap; 2403
The only blocks I have encountered that are still infinite when hacked in are iron/gold/diamond blocks. For everything else, just give yourself a higher quantity, like 64 or 99. Again, just remember to edit the count field that occurs before the item ID, not after.
The only question I can't answer is, "What is a good hex editor to use on iOS?"
I'm sorry, but not having an iOS device myself, I'm afraid I can offer no advice.
This guide is still a work in progress, so questions and comments are encouraged.
And please refrain from quoting the entire first post...It's quite long!
Really good explanation! I'm definately going to try that! Also thanks for explaining about the wool. In MCedit, coloured wool has different ID's. So when I tested it, they turned into weird blocks. With this guide, one can make really cool maps, where you start with for example a few torches and a sword. Thanks for this clear guide!
Really good explanation! I'm definately going to try that! Also thanks for explaining about the wool. In MCedit, coloured wool has different ID's. So when I tested it, they turned into weird blocks. With this guide, one can make really cool maps, where you start with for example a few torches and a sword. Thanks for this clear guide!
I could answer that question for you"which is a good HEX editor for iOS?" I would personally recommend iFinder, even the lite version comes with a builtin hex editor and it works perfectly
Well, i just want to replace bricks and shears with 64 lava and tnt. But I don't understand what the heck i'm changing...
Well first you want to find bricks and shears in the level.dat file. Bricks are block 45 (2D in hex), and shears are item 359 (167 in hex).
So search for "69642D".
(6964 is "id" in hex; it's included in the search, because 2D on its own can appear elsewhere in the file)
Change 2D to 2E to make bricks into TNT. Since the count for bricks is always 01, you'll probably want to change that to 40, to get a stack of 64 of them.
Now for the shears, search for "69646701", and change 6701 to 0B00. You'll again want to change the count from 01 to something higher.
Hope that helps you, and feel free to ask if anything is unclear.
Well first you want to find bricks and shears in the level.dat file. Bricks are block 45 (2D in hex), and shears are item 359 (167 in hex).
So search for "69642D".
(6964 is "id" in hex; it's included in the search, because 2D on its own can appear elsewhere in the file)
Change 2D to 2E to make bricks into TNT. Since the count for bricks is always 01, you'll probably want to change that to 40, to get a stack of 64 of them.
Now for the shears, search for "69646701", and change 6701 to 0B00. You'll again want to change the count from 01 to something higher.
Hope that helps you, and feel free to ask if anything is unclear.
Did you change the right count value? It's the one before the ID. If lava's neighbor in the inventory multiplied, then ya know you've got the wrong one.
Did you change the right count value? It's the one before the ID. If lava's neighbor in the inventory multiplied, then ya know you've got the wrong one.
Count value is correct, i think, it is 40 for a 64 stack?
Is anyone else having issues with the iOS part of this?? I'm using iFinder and I think I'm really just misunderstanding some of it. It's a very good tutorial though. Awesome job on it.
You should read this entire post before proceeding to edit your level.dat, to make sure you understand what you're doing.
The first thing I should mention is the various inventory editors available to us now. They completely eliminate the need for hex-editing, so check them out in the spoiler below:
If you're on an Android device, then this app is definitely the way to go. It can put anything in your inventory that hexing can, and it's MUCH easier.
Play Store link
Thread link <-- Use this one if you don't have the Google Play Store.
MCPEedit, by Jocoba3.
This one works on Linux, Mac, and Windows.
Thread Link
iMCPEdit, by Intyre.
And editor-in-progress for iOS.
Thread Link
Anyway, with that said, now we dive in and learn how to do it the old fashioned way.
Question: Could you please explain how you get hex numbers from an original number?
Answer is in the spoiler:
Lucky for me, the hex-dec converter is part of the editor I'm using. It's a Mac app called "Hex Fiend".
See at the bottom of the window where it says "(select less data)" ...If I select just 1 or 2 bytes, it converts the values to decimal there.
Most hex editors out there have some sort of byte conversion feature like this, though they might not all be so easy to find/use, depending on the app. If all else fails, this site can be very helpful.
Also, the Wiki's Data Values page lists both dec and hex values for all items.
What I have selected in the hex editor below is 1 item slot. In this case, it's mossy cobble I hacked in.
Let me break it all down:
The count is currently 39 (27 in hex). For a full stack of 64 (40 in hex), type 40 in the count field.
For a stack of 99, type 63. Reference the table in the spoiler above for a full list.
If you're changing one of the infinite items (bricks, glass, & shears), the count will be 01, so be sure to raise it up, so you get more than 1 of the new item.
The damage value is 0. This is used for tools, logs, leaves, slabs, and wools.
Damage values for LOGS:
Block 17 (hex: 11).
01:
Damage values for LEAVES:
Block 18 (hex: 12).
00:
If you can't tell the difference, 00 is oak, 01 pine, 02 birch.
Damage values for SLABS:
Block 43 (hex: 2B) for double slabs, 44 (hex: 2C) for singles.
00:
Double-stacked 44:0 and 44:6 are slightly different:
Damage values for WOOLS:
Wool is always block 35 (hex: 23), with one of the damage values below to determine color.
Decimal values above
Hex values below
The item ID is 48 (30 in hex). The ID is the last piece of data in each slot. When editing attributes of an item, such as count or damage, they always occur before the item ID itself.
Data Values (Pocket Edition)
Most blocks have 2-digit hex IDs. These should always have two tailing zeros.
So a block of wool, hex ID 23, would be entered as 2300. The 00 will probably already be there when you go to edit it.
When adding tools, or other items that have 3-digit hex IDs, they need to be reversed.
So with, say a diamond sword, ID 114, add a leading 0 so it's 4 digits; 0114, then swap the pairs; 1401
With a wooden door, ID 324: make it 4 digits; 0324, swap; 2403
The only blocks I have encountered that are still infinite when hacked in are iron/gold/diamond blocks. For everything else, just give yourself a higher quantity, like 64 or 99. Again, just remember to edit the count field that occurs before the item ID, not after.
The only question I can't answer is, "What is a good hex editor to use on iOS?"
I'm sorry, but not having an iOS device myself, I'm afraid I can offer no advice.
This guide is still a work in progress, so questions and comments are encouraged.
And please refrain from quoting the entire first post...It's quite long!
Proud to be a M.C.P.E.U member
Thanks, happy to help.
I'd be happy to dive deeper into whatever you're not understanding. Chances are, you're not the only one.
Well, i just want to replace bricks and shears with 64 lava and tnt. But I don't understand what the heck i'm changing...
Well first you want to find bricks and shears in the level.dat file. Bricks are block 45 (2D in hex), and shears are item 359 (167 in hex).
So search for "69642D".
(6964 is "id" in hex; it's included in the search, because 2D on its own can appear elsewhere in the file)
Change 2D to 2E to make bricks into TNT. Since the count for bricks is always 01, you'll probably want to change that to 40, to get a stack of 64 of them.
Now for the shears, search for "69646701", and change 6701 to 0B00. You'll again want to change the count from 01 to something higher.
Hope that helps you, and feel free to ask if anything is unclear.
Thanks heaps! I got it, though, lava is always 1.
Did you change the right count value? It's the one before the ID. If lava's neighbor in the inventory multiplied, then ya know you've got the wrong one.
Count value is correct, i think, it is 40 for a 64 stack?
Yes, that's right. I just want to make sure that it's the right count slot that you changed. You did the one that came before the ID, right?
*facepalm* That was my problem xD Thanks so much, I actually completely understand how to hex edit this.
Glad I could help ya!
For My Appreciation,I will give you a 1+ Vote for your Topic