NBTLib
NBTLib
[ Download ] [ Javadoc ] [ Source ]
NBTLib provides:
- A convenient way to do everything you want with NBT data
- Access to Minecraft/Craftbukkit code without having to import the "evil" classes (=> won't break on MC update)
The downside:
- You have to catch lots of Exceptions.
If you're interested in NBT data handling, check the javadoc of the "NBT" and "Tag" classes.
If you're interested in accessing MC/CB code, check the javadoc of the NBTLib class.
Installation
Just drop the NBTLib.jar in your plugins folder.
ToDo
- Write an NBT editor GUI
Code Examples
[ Click ]
Maven
Quote:<repository> <id>siguza-repo</id> <url>http://ci.siguza.net/plugin/repository/everything/</url> </repository>
Quote:<dependency> <groupId>net.drgnome.nbtlib</groupId> <artifactId>NBTLib</artifactId> <version>0.3.3</version> <type>jar</type> <scope>compile</scope> </dependency>
Dev Builds
Quote:Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk!
[ Dev Builds ]
@Siguza
No problem, no worries. I completely understand, I've been there, with little free time.
It would be nice if you could post your progress as soon as you get a chance to work on it again. Other than that, take your time.
@wargamer2010
I'm sorry to say this, but I have to postpone this yet again. Some personal responsibilities came up, limiting my free time. I'm also going to be away from next Wednesday on for two and a half weeks, so I'm not gonna be able to get back to this soon. I'm really sorry. :/
@wargamer2010
Haha, I'm glad somebody actually uses this plugin.
^^
Making it compatible with MCPC turned out to be impossible to implement while keeping the current API, so I decided to rewrite it. I didn't finish that though, because I had finals I needed to pass and because of all the problems I had with VirtualPack lately (migration to UUIDs).
What I still have to do is rewrite the ClassProxy class and make my reflection classes understand the MCPC mapping files. It's the next thing I'll work on and I hope I'll have it ready next weekend.
Not trying to rush you into anything, but what's the status on making NBTLib compatible with MCPC?
I think it's a really cool plugin and I used it in Signshop to properly restore items to use in an infinite stock shop. (see here: https://github.com/wargamer/SignShop/blob/master/org/wargamer2010/signshop/blocks/NBTUtil.java)
Hope you don't mind :)
@Tomm121
If not, why would anyone install a plugin sent to them by a random stranger?
Someone named Digital copied your plugin claimed it was his own then used it to destroy other people's servers
@Siguza
Cool. I was looking into myself, but its a bit above my xp level atm
@TrenTech
I did some research on that topic and found out that MCPC actually does this kind of runtime-mapping already. I'm working on making NBTLib MCPC-compatible now.
@Siguza
yeah post 1.5.2 versions of mcpc having mappings.
@TrenTech
If there were mappings (like the MCP .csv files) for the classes, fields and methods, I think I could write a plugin that modifies the bytecode of plugin classes before they are loaded and replace net.minecraft.server class names by the actual class names. Do you know if such mappings exist?
@Siguza
I'll test that out.
mcpc doesn't register a package called net.minecraft.server. I don't think there's as easy way to fix this. mcpc remaps the obfuscated class names.
@TrenTech
Didn't test, but should work like this:
What is the problem with MCPC?
@TrenTech
This isn't MCPC friendly..
How would I go about using this to get custom NBT from an item? When I say custom NBT i mean like a mod item with its own set of NBT tags.
@mikeangel
I think so... the plugin itself doesn't do anything in-game, it just provides functions to other plugins (that's why it's called library).
Is it tekkit friendly? (for ex. IC2, Forestry)
Do this work on 1.6.2?
This looks like a really awesome plugin to grab access to NBT data, thanks!