Giter Club home page Giter Club logo

nbtexplorer's People

Contributors

codewarrior0 avatar flarn2006 avatar jaquadro avatar maruohon avatar thaliaarchi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nbtexplorer's Issues

Wrong JSON export

        "GameRules": 
        {
            "doTileDrops": "true",
            "doFireTick": "true",
            "mobGriefing": "true",
            "commandBlockOutput": "true",
            "openblocks:spawn_graves": "true",
            "doMobSpawning": "true",
            "naturalRegeneration": "true",
            "doMobLoot": "true",
            "doDaylightCycle": "true",
            "keepInventory": "false"
        },

There's special types for true/false values. They must not be represented as strings.
Ref: http://json.org/

Add Unsigned short, unsigned integer and unsigned long tags.

Add the unsigned short, unsigned integer and unsigned long because for exemple, into idcounts.dat, the tag map is an unsigned short into minecraft. Actually we can't set (with your app) more than 32767 (max of signed short)... Please fixe it !

Save action still disabled after deleting a tag

I had opened a file and deleted a tag representing an item in a player's inventory, but the Save button didn't appear after making the change.

I found a workaround where if you pick a simple integer value, edit it to another value and back again, Save will now be enabled and will properly save the file with the tag deleted.

XmlException while closing NBTExplorer running on mono (Ubuntu Linux)

Overview

NBTExplorer throws the following error twice on closing the window; happens every time I launch the program. The full error log is below the message posted.

--------------------------
NBTExplorer failed to run
---------------------------
NBTExplorer encountered the following exception while trying to run: XmlException
Message: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 11, position 9.

Additional error detail has been written to:
/home/juozas/.config/NBTExplorer/error.log

---------------------------
OK   
---------------------------

Launcher Setup

Command line: mono NBTExplorer.exe /home/juozas/.minecraft/saves/
Working directory: /home/juozas/NBTExplorer/

Full error report

NBTExplorer Error Report
2016-04-23 09:05:46
-------
NBTExplorer encountered the following exception while trying to run: XmlException
Message: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 11, position 9.

-------
  at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) <0x41023ad0 + 0x000a3> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String arg) <0x410235c0 + 0x000ab> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.ParsePI (System.Text.StringBuilder piInDtdStringBuilder) <0x41023000 + 0x0013b> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.ParsePI () <0x40ffef20 + 0x0000f> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.ParseElementContent () <0x40f55a30 + 0x000bb> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.Read () <0x40f502f0 + 0x00057> in <filename unknown>:0 
  at System.Xml.XmlTextReader.Read () <0x40f502d0 + 0x0001a> in <filename unknown>:0 
  at System.Xml.XmlWriter.WriteNode (System.Xml.XmlReader reader, Boolean defattr) <0x40f5db30 + 0x0034c> in <filename unknown>:0 
  at System.Xml.XmlReader.ReadOuterXml () <0x40f5ccc0 + 0x0015a> in <filename unknown>:0 
  at System.Configuration.SectionInfo.ReadData (System.Configuration.Configuration config, System.Xml.XmlReader reader, Boolean overrideAllowed) <0x40f5c7d0 + 0x00283> in <filename unknown>:0 
  at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) <0x40f5c010 + 0x0031c> in <filename unknown>:0 
  at System.Configuration.SectionGroupInfo.ReadData (System.Configuration.Configuration config, System.Xml.XmlReader reader, Boolean overrideAllowed) <0x40f60d60 + 0x0005f> in <filename unknown>:0 
  at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) <0x40f5c010 + 0x0031c> in <filename unknown>:0 
  at System.Configuration.SectionGroupInfo.ReadRootData (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed) <0x40f5bfb0 + 0x00043> in <filename unknown>:0 
  at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) <0x40f4ff10 + 0x00223> in <filename unknown>:0 
  at System.Configuration.Configuration.Load () <0x40f4a750 + 0x0010b> in <filename unknown>:0 
  at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) <0x40f4a020 + 0x00227> in <filename unknown>:0 
  at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) <0x40f49600 + 0x00173> in <filename unknown>:0 
  at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) <0x40f48a80 + 0x0006f> in <filename unknown>:0 
  at System.Configuration.ConfigurationManager.OpenMappedExeConfiguration (System.Configuration.ExeConfigurationFileMap fileMap, ConfigurationUserLevel userLevel) <0x410228a0 + 0x000b4> in <filename unknown>:0 
  at System.Configuration.CustomizableFileSettingsProvider.LoadProperties (System.Configuration.ExeConfigurationFileMap exeMap, System.Configuration.SettingsPropertyCollection collection, ConfigurationUserLevel level, System.String sectionGroupName, Boolean allowOverwrite, System.String groupName) <0x41022380 + 0x0007b> in <filename unknown>:0 
  at System.Configuration.CustomizableFileSettingsProvider.GetPropertyValues (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection collection) <0x41020280 + 0x00193> in <filename unknown>:0 
  at System.Configuration.LocalFileSettingsProvider.GetPropertyValues (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection properties) <0x41020240 + 0x0002e> in <filename unknown>:0 
  at System.Configuration.ApplicationSettingsBase.CacheValuesByProvider (System.Configuration.SettingsProvider provider) <0x4101fbe0 + 0x0029c> in <filename unknown>:0 
  at System.Configuration.ApplicationSettingsBase.GetPropertyValue (System.String propertyName) <0x4101f8d0 + 0x00083> in <filename unknown>:0 
  at System.Configuration.ApplicationSettingsBase.get_Item (System.String propertyName) <0x4101f820 + 0x00053> in <filename unknown>:0 
  at NBTExplorer.Properties.Settings.get_RecentFiles () <0x4105aba0 + 0x0001a> in <filename unknown>:0 
  at NBTExplorer.Windows.MainForm.MainForm_Closing (System.Object sender, System.ComponentModel.CancelEventArgs e) <0x4105ab10 + 0x0002f> in <filename unknown>:0 
  at System.Windows.Forms.Form.OnFormClosing (System.Windows.Forms.FormClosingEventArgs e) <0x4105aa80 + 0x00065> in <filename unknown>:0 
  at System.Windows.Forms.Form.FireClosingEvents (CloseReason reason, Boolean cancel) <0x4105a930 + 0x0009d> in <filename unknown>:0 
  at System.Windows.Forms.Form.RaiseCloseEvents (Boolean last_check, Boolean cancel) <0x4105a780 + 0x00087> in <filename unknown>:0 
  at System.Windows.Forms.Form.WmClose (System.Windows.Forms.Message& m) <0x410593a0 + 0x00187> in <filename unknown>:0 
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m) <0x41027520 + 0x00147> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x40f91490 + 0x00024> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x40f91450 + 0x00036> in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x40f8fd90 + 0x0031c> in <filename unknown>:0 
-------

NBTExplorer Error Report
2016-04-23 09:05:52
-------
NBTExplorer encountered the following exception while trying to run: XmlException
Message: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 11, position 9.

-------
  at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) <0x41023ad0 + 0x000a3> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String arg) <0x410235c0 + 0x000ab> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.ParsePI (System.Text.StringBuilder piInDtdStringBuilder) <0x41023000 + 0x0013b> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.ParsePI () <0x40ffef20 + 0x0000f> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.ParseElementContent () <0x40f55a30 + 0x000bb> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.Read () <0x40f502f0 + 0x00057> in <filename unknown>:0 
  at System.Xml.XmlTextReader.Read () <0x40f502d0 + 0x0001a> in <filename unknown>:0 
  at System.Xml.XmlWriter.WriteNode (System.Xml.XmlReader reader, Boolean defattr) <0x40f5db30 + 0x0034c> in <filename unknown>:0 
  at System.Xml.XmlReader.ReadOuterXml () <0x40f5ccc0 + 0x0015a> in <filename unknown>:0 
  at System.Configuration.SectionInfo.ReadData (System.Configuration.Configuration config, System.Xml.XmlReader reader, Boolean overrideAllowed) <0x40f5c7d0 + 0x00283> in <filename unknown>:0 
  at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) <0x40f5c010 + 0x0031c> in <filename unknown>:0 
  at System.Configuration.SectionGroupInfo.ReadData (System.Configuration.Configuration config, System.Xml.XmlReader reader, Boolean overrideAllowed) <0x40f60d60 + 0x0005f> in <filename unknown>:0 
  at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) <0x40f5c010 + 0x0031c> in <filename unknown>:0 
  at System.Configuration.SectionGroupInfo.ReadRootData (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed) <0x40f5bfb0 + 0x00043> in <filename unknown>:0 
  at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) <0x40f4ff10 + 0x00223> in <filename unknown>:0 
  at System.Configuration.Configuration.Load () <0x40f4a750 + 0x0010b> in <filename unknown>:0 
  at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) <0x40f4a020 + 0x00227> in <filename unknown>:0 
  at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) <0x40f49600 + 0x00173> in <filename unknown>:0 
  at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) <0x40f48a80 + 0x0006f> in <filename unknown>:0 
  at System.Configuration.ConfigurationManager.OpenMappedExeConfiguration (System.Configuration.ExeConfigurationFileMap fileMap, ConfigurationUserLevel userLevel) <0x410228a0 + 0x000b4> in <filename unknown>:0 
  at System.Configuration.CustomizableFileSettingsProvider.LoadProperties (System.Configuration.ExeConfigurationFileMap exeMap, System.Configuration.SettingsPropertyCollection collection, ConfigurationUserLevel level, System.String sectionGroupName, Boolean allowOverwrite, System.String groupName) <0x41022380 + 0x0007b> in <filename unknown>:0 
  at System.Configuration.CustomizableFileSettingsProvider.GetPropertyValues (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection collection) <0x41020280 + 0x00193> in <filename unknown>:0 
  at System.Configuration.LocalFileSettingsProvider.GetPropertyValues (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection properties) <0x41020240 + 0x0002e> in <filename unknown>:0 
  at System.Configuration.ApplicationSettingsBase.CacheValuesByProvider (System.Configuration.SettingsProvider provider) <0x4101fbe0 + 0x0029c> in <filename unknown>:0 
  at System.Configuration.ApplicationSettingsBase.GetPropertyValue (System.String propertyName) <0x4101f8d0 + 0x00083> in <filename unknown>:0 
  at System.Configuration.ApplicationSettingsBase.get_Item (System.String propertyName) <0x4101f820 + 0x00053> in <filename unknown>:0 
  at NBTExplorer.Properties.Settings.get_RecentFiles () <0x4105aba0 + 0x0001a> in <filename unknown>:0 
  at NBTExplorer.Windows.MainForm.MainForm_Closing (System.Object sender, System.ComponentModel.CancelEventArgs e) <0x4105ab10 + 0x0002f> in <filename unknown>:0 
  at System.Windows.Forms.Form.OnFormClosing (System.Windows.Forms.FormClosingEventArgs e) <0x4105aa80 + 0x00065> in <filename unknown>:0 
  at System.Windows.Forms.Form.FireClosingEvents (CloseReason reason, Boolean cancel) <0x4105a930 + 0x0009d> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form:FireClosingEvents (System.Windows.Forms.CloseReason,bool)
  at System.Windows.Forms.Application.Exit (System.ComponentModel.CancelEventArgs e) <0x41073b70 + 0x001b7> in <filename unknown>:0 
  at System.Windows.Forms.Application.Exit () <0x41073b30 + 0x00027> in <filename unknown>:0 
  at NBTExplorer.Program.ProcessException (System.Exception ex) <0x4105ae20 + 0x004f7> in <filename unknown>:0 
  at NBTExplorer.Program.AppThreadFailureHandler (System.Object sender, System.Threading.ThreadExceptionEventArgs e) <0x4105adf0 + 0x00017> in <filename unknown>:0 
  at System.Windows.Forms.Application.OnThreadException (System.Exception t) <0x4105ac20 + 0x000ce> in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.OnThreadException (System.Exception e) <0x4105ac00 + 0x00013> in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x40f8fd90 + 0x00b51> in <filename unknown>:0 
  at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG& msg) <0x4103bc70 + 0x0001f> in <filename unknown>:0 
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG& msg) <0x4103bc40 + 0x0001f> in <filename unknown>:0 
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) <0x410244b0 + 0x00d03> in <filename unknown>:0 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) <0x41024400 + 0x00057> in <filename unknown>:0 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) <0x410240f0 + 0x00033> in <filename unknown>:0 
  at NBTExplorer.Program.Main (System.String[] args) <0x40f3fda0 + 0x0010b> in <filename unknown>:0 
-------

Source code version?

What version of Visual Studio was used to create this because when i attempted to view the source in VS2010 it didnt work.

JSON format needs improvement

Currently the JSON format is only good for a peek on NBT contents.
You can't use it to recreate the file from scratch, as it lacking the value types.
I propose to change the format to represent data values for types, that aren't strings, 4-byte ints or 8-byte floats(doubles), as objects of the format similar to:

"name":{"tag_<type>":<value>}
"name":{"tag_<type>":[<value>, …]}

The reason to pick specifically these three types to be left alone is that strings are strings, wherever you encounter them, and combination "4-byte INT with 8-byte DOUBLE" is common for many platforms and languages, while not all of them have innate support for other data types or sizes Minecraft using.

Parse JSON book pages

A string in a written book can be a serialized JSON value in the same format as the 2nd argument to /tellraw, if that book has been edited using /give, /entitydata or external tools. Some features of written books, such as hyperlinks from one page to another, require the JSON syntax. Thus, it would be useful to have NBTExplorer descend into each page by deserializing it, so that hyperlinks could be added, removed, viewed, reformatted etc.

[Feature Request] create /summon command from entity NBT data

I would like for the program to automatically generate /summon commands from NBT data of entities. I was able to do this manually using NBTExplorer to get the data, but it would be nice if it were automatic. It also seems like it would be easy. I would add it, but I'm not sure where to start.

display of numbers in Hex View is little endian?

Hello,

first of all, thank you for this great and useful tool to visualize and edit NBT files! I'm using NBT as binary output format for the byte code of my scripting language, and NBT Explorer will be very useful to view and edit the binary.

I noticed a minor issue today: When viewing / editing an int array, the hex values are shown in reverse byte order (little endian). For example, the values '5' and '10' are shown as 05 00 00 00 0A 00 00 00.

Is this intentional? I think it should be displayed naturally, the way you read hexadecimal numbers: 00 00 00 05 00 00 00 0A.

Not a big issue, but I thought I should mention it. Keep up the good work!

[Suggestion] Cut/Copy/Paste, Move, Reload, Import/Export Arrays

I've been a long time fan of NBTedit, but I've realized I can't really stick with it thanks to it being outdated (it can't even load level.dat if your inventory has the newly-added fireworks items, for example). NBTExplorer definitely provides better support for the NBT format itself, including support for uncompressed files and other stuff not directly related to the NBT format.

However, I've noticed I still definitely prefer NBTedit over NBTExplorer, and it only recently occurred to me why: NBTedit has a number of GUI features NBTExplorer simply lacks:

  • Cut/Copy/Paste - as a map maker who relies extensively on custom NBT tags, I cannot tell you how invaluable this is. It's not fun recreating a complicated tree structure from scratch (and would you check out how complicated item NBT data has gotten ;p)
  • The Move Up/Down functions in NBTedit allow for reordering of list elements, which nowadays has become practical for enchantments, Lores, CustomPotionEffects, and even books.
  • Reload - I probably use this almost as frequently as C/C/P. If I'm editing my own inventory, trying to fine-tune enchantment or potion effects, I like to be able to simply reload the file after logging out, so changes I've made ingame are preserved. If I am using WorldEdit to export schematics of TileEntity objects so I can edit them, I am usually producing many different NBTedit'd objects (e.g. unicode/formatted sign text, custom spawners, and chests with custom items), and again, being able to Reload has streamlined the workflow a lot.
  • Import/Export Arrays - I'll admit it's not often I have to use this NBTedit feature... But there's also no editor I have found which is capable of importing/exporting Int arrays (NBTedit does not support those). NBTExplorer simply lets me know arrays are read-only, which isn't very helpful behavior for an editor. I understand making an array editing GUI is difficult, but simply offering to import/export the array is manageable, right? Because currently, there are no options, short of writing my own application, if, say, I wanted to create fireworks that use custom non-dye colors in their explosions. Oh, I should also note that NBTedit's array import/exporter has a GZip checkbox - some users may find that useful.

Anyways, this all just a suggestion to improve NBTExplorer's usability. I realize it's not like you're getting paid for it or anything, and that it doesn't really matter if people prefer NBTedit's GUI. I just want to throw this onto the table, and I understand if nothing comes of it. Thank you for reading, and great work!

Idea:

Can there be a Find&Set function?
it will find a certain Tag and set its value to what you have entered? would that be possible?

Cannot copy root-level compounds

At least I think that's what they are. When opening an Anvil (.mca) file, there is a list of chunks that have the compound icon. I can open them, I can delete them, but I can't copy or paste them.

Rework NBTUtil switches to make more sense

NBTUtil <file> [--path=<path>] [ options ]
NBTUtil <file>[:<path>] [ options ]

  <file> is a file with NBT-compatible structure, such as level.dat.
  <path> is a path inside the file.

Options are:

  --export[=<file>]
  --import[=<file>]
        Export(import) contents of NBT file at a given path in JSON format.
        STDIN/STDOUT is used if no <file> is specified.

  --print
        Print information about NBT node specified by <path>.
        This includes node name, type, value and generic information about
        existing subnodes, if any.

  --printtree
        Print complete tree of NBT structure starting from <path>.

  --types
        Show data types for --print/--printtree.

  --printval
        Print only value of NBT node specified by <path>.

  --printtype
        Print only type of NBT node specified by <path>.

  --set[<type>]=<value>
        Set value of the node specified by <path> to <value> of given <type>.
        If type is not supplied, it will be inferred from the value, unless it 
        already exists in the file.
        If type is not specified and new value is not compatible with the type
        of existing value, error will be generated and no changes will be made.

  --list-types
        List all supported types and their input formats.

  --help
        Show this help message and exit.

  --version
        Print version information and exit.

Fresh install on windows 8 Professional problem

So, I downloaded this today, I tried using it by dragging a seperate folder into the window and it loads up the NBT and whatnot, but the problem is... when I have a 13KiB player data, all that shows up is this: http://prntscr.com/5mv9u1

Now, before I moved to Windows 8, I had 0 problems with this. I don't know if its a problem with Windows 8 or not, but if there is a fix for this, that would be greatly appreciated :)

Build documentation

README should mention that your 'Substrate' package is required to build this thing. It would be nice, for those not too familiar with Mono, to explain the "right way" to install that package: I just copied the obj/Debug and obj/Bin files into the directories here, but that can't be it. README should mention that on Linux you use "xbuild NBTExplorer.csproj" to build, and that the build currently requires gmcs (which is packaged separately in Debian at least).

Nice tool--thanks much!

Copy exits the program

Any attempt to do Copy doesn't seem to copy anything. Sometimes it immediately exits the program as well (I don't get a crash dialog either - it's as if I had told it to exit.) This is on OS X 10.10.1.

I found it even happened from the About dialog - I was copying something from there to try and search for it in Google. :)

Pocket Edition World Save Compatibility

Basic Info

Adding support for pocket edition world saves isn't as daunting as it seems. First, the level.dat file is simply compressed using the zlib format, but is otherwise a normal NBT file. On top of that, the LevelDB format PE/Win10 uses is fairly straightforward to work with.

Adding LevelDB Support

On Mac/Linux, compile Mojang's LevelDB-MCPE as a .so or .dylib and link it to NBTExplorer at runtime.

On Windows, I have a working Visual Studio 2015 project which is setup to compile Mojang's LevelDB-MCPE which as a DLL (both x86 and x64).

The generated libraries have both C++ and C functions declared. In C#, it'd probably be easier to use the C functions as the basis for DLL/Native imports.

Setting up LevelDB

Create a new instance of Options by calling Pointer leveldb_options_create(); this will return a pointer to an instance of Options. Make sure to specify the compression type as Zlib:

// Specify 2 as the compression type, which is a constant that stands for ZLib compression
void leveldb_options_set_compression(Pointer options, int compressionType) 

Afterwards, create a new instance of LevelDB by calling:

// leveldb_open returns a pointer to the LevelDB instance.
// Error pointer is a reference which stores any errors that occur while opening the database
Pointer leveldb_open(Pointer options, String dbFolderPath, Pointer errorPointer)

Before you can read from the database, you need to create an instance of ReadOptions by calling Pointer leveldb_readoptions_create(); doing so will return a pointer to an instance of ReadOptions. There is no need to change the default read options.

After that, you can call leveldb_get like so:

// returns a pointer to a byte array, the length of which is stored in a pointer to valLength
Pointer leveldb_get(Pointer db, Pointer readOptions, 
    byte[] keyAsBytes, int keyLength, 
    Pointer valLength, Pointer errorPointer)

Writing to the database is the same process as reading. Create an instance of WriteOptions by calling Pointer leveldb_writeoptions_create(); once again, it returns a pointer to an instance of WriteOptions, and the default options will again suffice.

Next call leveldb_put like so:

void leveldb_get(Pointer db, Pointer writeOptions, 
    byte[] keyAsBytes, int keyLength, 
    byte[] dataToWrite, int dataLength, 
    Pointer errorPointer)

Finally, to close the database, call:
void leveldb_close(Pointer db)

PE/Win10 Key Values

Here are some basic keys stored as UTF-8 strings which return NBT byte arrays:

  • "BiomeData"
  • "Overworld"
  • "Nether"
  • "TheEnd"
  • "mVillages"
  • "portals"
  • "~local_player"
  • "AutonomousEntities"
  • "dimension0"
  • "dimension1"
  • "dimension2"

Chunk NBT data is a little bit trickier as the keys aren't "readable". The format is described on the Minecraft Wiki: https://minecraft.gamepedia.com/Pocket_Edition_level_format

Read both the 0.9.0 and 1.0.0 sections; the only difference between the 0.9.0 and 1.0.0 LevelDB format is how keys for chunks are stored (i.e. in 1.0.0 chunks are split up into 16x16x16 subchunks). The key structure for both versions is still the same, and the way the game stores chunk NBT data (both for block entities and regular entities) hasn't changed.

Can't paste tags into an empty list

Tags can be pasted into a populated list if types map, but not empty ones. An empty list should accept tags and adopt the type of the pasted contents.

[Feature Request] Basic find command through CLI

Hello,

I'm working on a project to attempt to migrate my world between modpacks. I'm looking for a way to set item NBT information to it's "default" value should the particular block cause problems. I have already made progress on a utility I made to help me determine what the item's "default" NBT (in particular the TileEntity tags) would be. I just need a way to find the particular block and set it's TileEntity values through scripts.

I looked through the NBTUtil tool but as far as I can tell this feature isn't present through the command line (minus creating a dump from printtree, parsing the text, extracting locations, and then setting NBT values). Is a find feature feasible for the CLI (at least in a basic form i.e. print x,y,z location and the NBT path of every itemId:dammage at the given path)?

Also, is there documentation on the setvalue/setlist command? How would I, for example, set some info on a Tile Entity with 3 ints, a double, and some string tags all at once?

Thanks,
Mark

Search state never clears, requires program restart for each new search

After beginning a search using the Search -> Find... menu, the state of the Search menu becomes impossible to reset to normal. The Find... option is disabled, preventing a new search, and the Find Next option is enabled but using it eventually reaches the end of the results list and cannot be cleared (it continues to give the End of Results dialogue).

Expected behaviour:

Search -> Find... should never be disabled, allowing a new search to be begun at any time (which should discard the previous result set once the new search is initiated).

Search -> Find Next should display End of Results once, and then the second time should wrap around to display the first result again.

Allow opening NBT files with any file extension

Buildcraft's 'blueprints' are stored as *.bpt files, but are otherwise ordinary gzip-compressed NBT files. NBTExplorer fails to open these files unless they are renamed to *.nbt or *.dat. Similarly, the mod Recurrent Complex has its own export format stored as *.rc files that are also gzip-compressed NBT files. I have the feeling that there are other mods that store NBT files with an extension other than *.dat

Instead of adding these file extensions to NbtFileDataNode.SupportedNamePattern, a more general solution would be to change that pattern to match any file, and then add NbtFileDataNode to the filetype registry last, so it catches any types not matched by the other file nodes. I'm not sure how DirectoryDataNode would have to change to accommodate that, though.

This would also address #21.

JSON import

I don't know, if it is planned, but the ability to create NBT completely anew from JSON or selectively import certain tags at the specified locations would go a long way.

Change Tag Sort order

Tags are currently ordered by the numeric ID of the tag.

I propose a new sorting order, which I'm not ashamed to say is the one I use in MCEdit 2.0:

  • Compounds
  • Lists
  • All non-array types, ordered by tag name
  • Array types

This will put collection types first, which makes it easier to drill down into nested collections (e.g. level.dat/Data/Player). Plain data types are grouped together, ignoring the exact data type, making it easier to find a tag by name. Arrays are infrequently edited and are listed last.

If you know offhand which .NET classes are responsible for tree views and sort ordering, any implementation tips would be appreciated. I might use it as an excuse to get into .NET development.

TAG_List of TAG_End's cannot be parsed

A file containing a TAG_List whose type is TAG_End is well-formed (though odd) NBT, but cannot be opened by NBTExplorer. When trying to open it, NBTExplorer simply does nothing; after selecting the file in the open dialog, NBTExplorer does not produce an error message or show any indication that a file was opened at all. I've prepared a file which causes this issue (note that it is uncompressed). You may need to open it with a hex editor and parse it by hand. It consists of an unnamed root TAG_Compound (a la Minecraft), which contains a TAG_List named "tag list" of type TAG_End (0) and size 3. Since TAG_End has no payload, this terminates the TAG_List payload (i.e. the "list of TAG_End payloads" is just an empty string). A named TAG_End (i.e. null byte) terminates the root TAG_Compound and the file.

I'm running on Linux under Mono, if that makes a difference. NBTExplorer 2.3.0

Opening level.dat in Wine crashes.

NBTExplorer Error Report
13/05/2016 13:15:40
-------
NBTExplorer encountered the following exception while trying to run: IndexOutOfRangeException
Message: Array index is out of range.

-------
  at System.Windows.Forms.XplatUIWin32.ClipboardAvailableFormats (IntPtr handle) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Windows.Forms.XplatUIWin32:Win32DispatchMessage (System.Windows.Forms.MSG&)
  at System.Windows.Forms.XplatUIWin32.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in <filename unknown>:0 
  at NBTExplorer.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
-------

AppData location

This isn't an "issue" per se, more of a request, but I didn't know where else to put it.

On line 205 in MainForm.cs for Windows, could you change where your program pulls the ApplicationData folder? Right now it's pulling from the Registry, which is fine, except that a user can temporarily change the folder by using the APPDATA environmental variable, which allows for very simple manipulation of Minecraft's program/data repository. Mojang's program uses the variable, so changing line 205 to this would make yours act like Mojang's:

string path = Environment.ExpandEnvironmentVariables("%APPDATA%");

If you wanted a fallback, change line 205 to this instead:

string path = Environment.ExpandEnvironmentVariables("%APPDATA%");
if (!Directory.Exists(path)) {
    path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
}

although this fallback should never be needed on a Windows machine.

Thanks.

Modify an array of Bytes with NBTUtil.exe

How I can modify an array of Bytes tag with NBTUtil.exe

NBTUtil.exe --path=!path! --setvalue= ?

If I can't with NBTUtil ... how can I do that, I need to change 900 map_X.dat and reset the colors list !

Thanks in advance.

[Suggestion] "Multi Copy" and "Search and Replace"

Please add the function to copy multiple files at once, like you can delete multiple files at once.
And then please add a function to search and replace values. Like: select a package/folder. Insert value to find. Insert value to replace with. Replace the found values with new values.

String Array Tag

When trying to open an NBT with a StringArrayTag it fails to open

Searching in multiple .mca files and find list

Background:
I have a problem there someone on a server seems to have set up a witch spawner and using portals from Mystcraft to teleport them to my base, I can't find any files there the mod saves linking book information. The destination of a linking book is in NBT and I managed to find this data in a test world with NBT Explorer. The problem is our server has many worlds and some of them are big so I would like to avoid opening one .mca file at atime and using find in it.

I know what I am searching for and can find it with the find tool in NBT Explorer, but I have many .mca files to search in. Can I somehow select all my .mca -files in a folder and search in all of them and receive a list of matches and there I find them?

I am running Windows so solutions that only works on Mac/Linux don't work for me, (but maybe for someone else reading).

Secondary IDs

Hi, Great work! Just a quick question. Does this display or allow edits to the secondary IDs of inventory items? I've noticed that all Wood blocks just show as ID 17, and all Wool blocks just show as ID 35, etc. I was wondering if that is in the works, or not.

JEI Crash

It Crashes when i type pi in Search Box

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.