Cube Genetics is a live NBT editing plugin for Bukkit servers. It lets you load the NBT structures of entities, tile entities (such as beacons, chests, signs, mobspawners), and players (both online and offline) right from the chat interface. Since it uses the chat menu along with Bukkit's conversations API, there's no client mod needed. Once the plugin is installed to your server, all players with permission (defaults to OP) can start using it to load and edit the NBT data of their surroundings. Get your copy below or continue reading to learn how it works.
To enter NBT editing mode, the user runs the /NBT command. Now the NBT data of objects you interact with will show up in your chat window. Since it uses the Bukkit conversations API, there are no other commands; rather, the plugin operates on your chat input. This minimizes conflicting commands with other plugins and makes interaction smoother. You can use the prev and next keywords to move through the results pages, cd to change directory, and up to move up a folder. You can create a new tag within the current folder, for instance newstring Name Awesome Sword, or you can edit a current tag, edit Name Awesomer Sword. Once you're done editing the NBT tags, the save keyword saves the tags back to the object they belong to, and exit or done takes you out of edit mode and back to regular chat.
Here's some examples of things you can do with Cube Genetics:
- Custom item names and lore
- Enchant un-enchantable items to ridiculous levels
- Infinite dispensers
- Custom player heads
- Editing villager offers
- Duplicate items
- Editing written books
- Custom potion effects (including effects not usually attainable in vanilla)
- Change paintings
- Colored and formatted text, including magic characters (Items, signs, books, command blocks)
- Edit player data (Walking speed, flight speed, inventory)
- Create custom spawners for your mobs (Player distance, maximum nearby entities, spawn rate)
- Give yourself cookies! (Well you could probably already do this but let's not allow that to detract from the greatness of more cookies)
For a full list of NBT tags you can tinker with, check the minecraft wiki here and here.
The best part about this plugin is it does it all live with no need to download .dat files, edit them in a standalone program like MCEdit or INVEdit, reupload them to the server and restart. It also doesn't rely on any other modifications or hacks of the game code. All this functionality is built into minecraft and would continue to work even if you were to uninstall the plugin.
If you've used inventory editors or SethBling's MCEdit filters before and wished you could do the same in real time on your bukkit server, this is the plugin for you.
(If for some reason you have a rare disease that prevents you from scrolling up)
Installation
1. After making a proper sacrifice to your preferred Mojang god, drop the jar into your server's plugin folder.
2. Think of a witty comment while the server restarts.
Done!
Commands
There's only one real command in the eyes of the server, and only one permission node to go along with it: CubeGenetics.NBT. The NBT command puts you into edit mode which then allows for the rest of the keyword commands to be typed into chat.
Note that commands and directory names aren't case sensitive but tag names and values are. Mojang decided to arbitrarily capitalize tag names so you'll probably need the wiki links above open as a reference until you get used to it.
Also, names aren't necessarily required for a tag if it's in a list instead of a compound, so these commands will create new tags with just a value if applicable. Optional parameters are denoted with {curly braces}. If you're editing or removing a tag in a list, use the tag's number in place of its name.
help - does what is says on the tin
cd [directory name] - changes to the directory you specify. You can put in multiple subdirectories instead of having to run the command multiple times, for example: "cd inventory 0 tag display" would take you to /Inventory/0/tag/display.
up{level} - goes up a level. You can add a number of levels to go up instead of running it multiple times.
next - displays the next page of data if there is one.
prev/previous - displays the previous page of data.
player [player name] or player me - loads a player's NBT data.
edit [name] [value] - edits an existing tag's value.
copy {name} - copies a tag or the current directory if no name is specified.
paste - pastes the copied tag into the current directory
remove [name] - removes a tag.
newcompound {name} - creates a new compound tag.
newlist {name} - creates a new list.
newstring {name} [value] - creates a new string. To use formatting codes replace the section sign (§) with an ampersand (&). If creating a unnamed string in a list, type null for the name. (This is due to the ability to have spaces in strings, leaving the plugin unsure whether the first word is the name of the string or the first word of the value)
newint {name} [value] - creates a new integer tag.
newbyte {name} [value] - creates a new byte tag.
newshort {name} [value] - creates a new short tag.
newdouble {name} [value] - creates a new double tag.
newlong {name} [value] - creates a new long tag.
newfloat {name} [value] - creates a new float tag.
newintarray {name} [value1],[value2],[value3],etc. - creates a new int array tag. Note that the values are delimited by commas and no brackets are required.
newbytearray {name} [value1],[value2],[value3],etc. - creates a new byte array tag. Same as above.
save - saves the tag data back to the object it came from.
exit/done- exits edit mode and goes back to regular chat.
This section down here
Also, this plugin counts as my intellectual property so don't steal it or distribute it or chop it up into little pieces without asking, okay? Okay.
Congratulations on reading/skimming this far! Have some screenshots!
The tag structure of a mob spawner.
The Invisible Hog Shack in action!
Sorry for the red eyes, I've been hitting the jungle leaves pretty hard.
Uh.. I'd be careful with that if I were you...
The real reason we're all here.
Now What?
Leave a comment! Whether you found this plugin useful or you printed the code out and used it to make origami boulders. If you have any feature requests or suggestions to make things better, I'll do my best to implement them. (Although I should warn you, there's already the maximum possible amount of cowbell crammed in, so don't ask for that)
I put the jar into my Bukkit 1.4.5's plugin folder, closed the server, re-ran it, and each time I have done so, the console gives me an error and doesn't load properly.
Error message:
[SEVERE] Could not load 'plugins\CubeGenetics.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/kyran/cubegenetics/CubeGenetics : Unsupported major.minor version 51.0
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:154)
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:227)
at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:205)
at net.minecraft.server.ServerConfigurationManagerAbstract.<init>(ServerConfigurationManagerAbstract.java:51)
at net.minecraft.server.ServerConfigurationManager.<init>(SourceFile:11)
at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:398)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:856)
Caused by: java.lang.UnsupportedClassVersionError: me/kyran/cubegenetics/CubeGenetics : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:44)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:143)
... 9 more
Any idea what I did wrong? :\
Rollback Post to RevisionRollBack
I am meowing at my lung’s fullest. I would even argue that the echo that reverberates back to me is the voice of someone I know…
I put the jar into my Bukkit 1.4.5's plugin folder, closed the server, re-ran it, and each time I have done so, the console gives me an error and doesn't load properly.
Error message:
[SEVERE] Could not load 'plugins\CubeGenetics.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/kyran/cubegenetics/CubeGenetics : Unsupported major.minor version 51.0
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:154)
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:227)
at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:205)
at net.minecraft.server.ServerConfigurationManagerAbstract.<init>(ServerConfigurationManagerAbstract.java:51)
at net.minecraft.server.ServerConfigurationManager.<init>(SourceFile:11)
at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:398)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:856)
Caused by: java.lang.UnsupportedClassVersionError: me/kyran/cubegenetics/CubeGenetics : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:44)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:143)
... 9 more
Any idea what I did wrong? :\
Update your craftbukkit to the newest beta. Should be R0.2. (Edit: if that doesn't work, see post below)
Could you possibly give it the gui of the forge one? I know you know which mod I'm talking about.
No because then it's a client mod not just a server plugin. I might eventually consider adding a modloader interface mod to go along with it but the plugin itself is meant to be a plug n play type thing that all ops on the server can use without modding their client. Once you get used to the commands you can get really fast with it though! Especially with the multiple path arguments in the cd command. I plan on adding some more features to it soon such as copy/paste and autocomplete that will make it quicker to use.
Also I'm thinking about making a macro feature with some built in ones that come with the plugin. So for instance, if you need to make a bunch of powered armored creeper spawners, you can save the action of editing a spawner's entity type, armor and powered tags and repeat that multiple times on different spawners.
Okay I've just updated the plugin to 1.01 to fix some java version issues. So if you were getting errors before and your craftbukkit is completely up to date, download the new version via the updated links in the OP.
I put the jar into my Bukkit 1.4.5's plugin folder, closed the server, re-ran it, and each time I have done so, the console gives me an error and doesn't load properly.
Error message:
snippage
Any idea what I did wrong? :\
You didn't do anything wrong. This error is because you're (probably) on Java 6, but Kyra_ compiled this plugin with Java 7. Edit: woops, according to the above post he fixed that.
I recommend you update to Java 7.
Plugin's now updated to 1.1!
Added copy/paste functionality and coded it to work with all craftbukkit versions from 1.4.4 onwards.
(Links in the OP have been updated)
Just in time for infinite fireworks dispensers for new year's!
(set the "Count" tag to -1)
This seems pretty amazing, defo gonna give this a try, until now i've been using NBTexplorer externally so using an internal editor might make life a lot easier!
Edit: It appears your filedropper links have expired or been removed
Hmm sorry about that, I've redirected them to the file repo on my bukkit dev account. That should be easier than trying to maintain download links here as well and the bukkit dev page should always have the most up-to-date files.
Hopefully you enjoy the plugin. It's definitely sped up my workflow on my server. It used to take ages to edit things externally and reupload. It's especially useful when testing custom potions and things like that, as you can make a lot of small adjustments without having to log out to use an external editor.
Thanks for fixing the link! First impression of it is that it is super easy to use, as soon as i figured out that i was using the cd command incorrectly managed to breeze through my first test with it (editing villager trades), very nice work.
Edit: Just noticed that when i try to copy a tag from one thing to another thing it says nothing to paste or something to that effect, is copy/paste only available between the same instance or did i do something incorrectly in regards to copying the tag over?
The clipboad is erased when you run 'done', not sure if that's what you were doing. 'Copy [tag name]' will grab a single tag and Copy without a name will copy the current directory you're in, ie a compound or list.
I was considering adding a persistent clipboard that would endure after exiting edit mode, perhaps with a modified copy command and an accompanying clear clipboard command. I wanted to avoid memory leaks with this being the default behavior though since most users, myself included, probably wouldn't remember to clear their clipboard before exiting every time.
You mention you can edit written books.... how can this be done?
http://www.minecraft...t#Written_Books
The tags are listed above. For instance if you wanted to change the title of a book, and you had it in your first hotbar slot you'd do:
/nbt
player me
cd inventory 0 tag
edit title (new title)
save
done
You can also use this to make colored or formatted text in books using the formatting codes. (Substituting & instead of §)
You can add:
• Allow to change Leather Armor color.
• Color, FireTime, etc. for fireworks.
And i will use your.
Also i think the character § can't be pasted in the chat (when writting command) and if you type & the plugin will change to § and if you want to have & you need to type &&, Good for formatting codes.
I'm not sure if you're asking if those features are included but they are. Anything you see on the nbt pages can be edited. And the plugin handles replacing the & sign with § for formatting text.
Yeah, the NBT editor would be so much easier to use if it had the same GUI as the Forge mod.
The goal with this plugin was to have something you could install to the server and have all OPs be able to use without having to mod their client. A gui apart from the chat would be nice but would just cause extra headaches I think. Especially given the new bukkit package naming that makes any plugin that uses the NMS code (ie NBT data) break on every update.
As you can imagine, I use this plugin a lot myself and I've gotten pretty quick with it. Most times you're gonna need the wiki nbt pages open for reference anyway and should be taking your time to make sure there's no errors in your input. (Mojang capitalized tags in a pretty arbitrary fashion and sometimes there's tags you forget to add) Usually I'm paying more attention to the wiki pages than the minecraft gui. For instance if I'm making an infinite item stack in my inventory, it's as simple as:
player me
cd inventory 0
edit Count -100
save
I can type faster than it would take to navigate a tree structure and click between text boxes. Keeping your hands on the keyboard saves time in my experience.
I appreciate the feedback though and it's always something I'd consider for the future. I've had comments from a couple people now who were curious about a gui mod. I'm interested in hearing from more people who've been using it for a while, ie power users, to hear how it suits their workflow.
Hello I am not very exsperinced in this type of stuff but was wodnering if anyone could make a quick tutorial on how to change villager offers? would be much help! Thank you
Hello I am not very exsperinced in this type of stuff but was wodnering if anyone could make a quick tutorial on how to change villager offers? would be much help! Thank you
Sure! Say you want a villager who trades 8 cookies for a blaze rod... (all names are case sensitive)
First right click the villager just to get him to populate the default trades.
run /nbt and then right click the villager. cd Offers Recipes 0 buy (assuming you want to edit the first offer, if not change the 0 to offer number-1) edit id 369 (this is the item id for blaze rods, substitute the id of whatever you want to pay to the villager) edit Count 1 (just one blaze rod will do) up cd sell edit id 357 (this is the item id of cookies, substitute the id of whatever you want the villager to give back) edit Count 8 (8 cookies for a blaze rod)
Now you can't make the trades infinite by setting a negative value like you can with despensers since the minecraft code checks >= not just ==. But you can get 4.2 billion trades which is pretty close to infinite. up edit maxUses 2147483647 (or whatever you want your trade limit to be) edit uses -2147483648 (it's easier to hit the up key here and just edit 'uses' and throw in the negative sign than retype that number. Set this to 0 if you set a different limit in the previous step.) save
done
Also note advanced users can copy in items and just remove the slot tag. For instance if you have a custom item already edited and want it to be a reward for a trade. Copy the item from your inventory, cd to 'sell' and paste it in, then cd down into the item directory and remove the Slot tag.
Cube Genetics is a live NBT editing plugin for Bukkit servers. It lets you load the NBT structures of entities, tile entities (such as beacons, chests, signs, mobspawners), and players (both online and offline) right from the chat interface. Since it uses the chat menu along with Bukkit's conversations API, there's no client mod needed. Once the plugin is installed to your server, all players with permission (defaults to OP) can start using it to load and edit the NBT data of their surroundings. Get your copy below or continue reading to learn how it works.
Also reserved.
Thanks dude, hope other people find it as useful as I do. I praise the gods every time I can use this instead of downloading and reupping .dat files.
Error message:
Any idea what I did wrong? :\
Update your craftbukkit to the newest beta. Should be R0.2. (Edit: if that doesn't work, see post below)
No because then it's a client mod not just a server plugin. I might eventually consider adding a modloader interface mod to go along with it but the plugin itself is meant to be a plug n play type thing that all ops on the server can use without modding their client. Once you get used to the commands you can get really fast with it though! Especially with the multiple path arguments in the cd command. I plan on adding some more features to it soon such as copy/paste and autocomplete that will make it quicker to use.
Also I'm thinking about making a macro feature with some built in ones that come with the plugin. So for instance, if you need to make a bunch of powered armored creeper spawners, you can save the action of editing a spawner's entity type, armor and powered tags and repeat that multiple times on different spawners.
You didn't do anything wrong.
but Kyra_ compiled this plugin with Java 7. Edit: woops, according to the above post he fixed that.I recommend you update to Java 7.
Cool plugin, anyway!
Added copy/paste functionality and coded it to work with all craftbukkit versions from 1.4.4 onwards.
(Links in the OP have been updated)
Just in time for infinite fireworks dispensers for new year's!
(set the "Count" tag to -1)
Cheers!
Hmm sorry about that, I've redirected them to the file repo on my bukkit dev account. That should be easier than trying to maintain download links here as well and the bukkit dev page should always have the most up-to-date files.
Hopefully you enjoy the plugin. It's definitely sped up my workflow on my server. It used to take ages to edit things externally and reupload. It's especially useful when testing custom potions and things like that, as you can make a lot of small adjustments without having to log out to use an external editor.
The clipboad is erased when you run 'done', not sure if that's what you were doing. 'Copy [tag name]' will grab a single tag and Copy without a name will copy the current directory you're in, ie a compound or list.
I was considering adding a persistent clipboard that would endure after exiting edit mode, perhaps with a modified copy command and an accompanying clear clipboard command. I wanted to avoid memory leaks with this being the default behavior though since most users, myself included, probably wouldn't remember to clear their clipboard before exiting every time.
Thanks for the feedback!
http://www.minecraft...t#Written_Books
The tags are listed above. For instance if you wanted to change the title of a book, and you had it in your first hotbar slot you'd do:
You can also use this to make colored or formatted text in books using the formatting codes. (Substituting & instead of §)
Yeah, the NBT editor would be so much easier to use if it had the same GUI as the Forge mod.
don't click this link...
As you can imagine, I use this plugin a lot myself and I've gotten pretty quick with it. Most times you're gonna need the wiki nbt pages open for reference anyway and should be taking your time to make sure there's no errors in your input. (Mojang capitalized tags in a pretty arbitrary fashion and sometimes there's tags you forget to add) Usually I'm paying more attention to the wiki pages than the minecraft gui. For instance if I'm making an infinite item stack in my inventory, it's as simple as:
I can type faster than it would take to navigate a tree structure and click between text boxes. Keeping your hands on the keyboard saves time in my experience.
I appreciate the feedback though and it's always something I'd consider for the future. I've had comments from a couple people now who were curious about a gui mod. I'm interested in hearing from more people who've been using it for a while, ie power users, to hear how it suits their workflow.
Sure! Say you want a villager who trades 8 cookies for a blaze rod... (all names are case sensitive)
First right click the villager just to get him to populate the default trades.
run /nbt and then right click the villager.
cd Offers Recipes 0 buy (assuming you want to edit the first offer, if not change the 0 to offer number-1)
edit id 369 (this is the item id for blaze rods, substitute the id of whatever you want to pay to the villager)
edit Count 1 (just one blaze rod will do)
up
cd sell
edit id 357 (this is the item id of cookies, substitute the id of whatever you want the villager to give back)
edit Count 8 (8 cookies for a blaze rod)
Now you can't make the trades infinite by setting a negative value like you can with despensers since the minecraft code checks >= not just ==. But you can get 4.2 billion trades which is pretty close to infinite.
up
edit maxUses 2147483647 (or whatever you want your trade limit to be)
edit uses -2147483648 (it's easier to hit the up key here and just edit 'uses' and throw in the negative sign than retype that number. Set this to 0 if you set a different limit in the previous step.)
save
done
That's it. Let me know how it goes!
The villager structure is explained under the mobs section on the chunk format wiki page.
Also note advanced users can copy in items and just remove the slot tag. For instance if you have a custom item already edited and want it to be a reward for a trade. Copy the item from your inventory, cd to 'sell' and paste it in, then cd down into the item directory and remove the Slot tag.