Cube Genetics

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.
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 (set quantity to -1)
- 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)
- Use blocks as helmets
- Edit mob attributes (Health, attack time, potion effects, equipment, prevent despawning etc.)
- 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.
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!
Note: Cube Genetics is compatible with CraftBukkit 1.4.4 and up.
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.
rename [name] [newname] - renames a tag to the name you specify. Note that this will not work in lists since they use numbers instead of names.
remove [name] - removes a tag.
copy {name} - copies a tag or the current directory if no name is specified.
paste - pastes the copied tag into the current directory
merge - pastes the contents of the copied tag into the current directory (useful when you're copying root directories)
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.
macro define [name] {arg1} ... {argN} - creates a new macro with the name you specify and any parameters you pass in. After entering in the commands to be included in the macro, create saves the macro and enables you to use it. For more information, see the macro page.
exit/done- exits edit mode and goes back to regular chat.

-
View User Profile
-
Send Message
Posted Jan 15, 2013@Thrystor
It does work, I just spawned some invisible invulnerable pigs to test it. Make sure you're putting in the correct tag structure into SpawnData. The any tags that apply to Entity can go in there.
@mc_raftee Yes I just tried this myself and it doesn't seem to be working. My guess with the AgeLocked tag is that since it's a new addition Mojang hasn't ironed out all the bugs yet. It could also be an issue with Craftbukkit. Hopefully a future update will solve this.
The invulnerable thing also doesn't work for me. It works for other entities but the tag doesn't even save for a villager. Weird that it would be ignored since villagers are subclasses of entity. Again, hopefully an update will iron this out. In the meantime, you could get around it by setting their health ridiculously high.
@mc_raftee
Are you creating the list in the right directory? It should be in tag>display>. Also note that when you're adding a string to a list, you need to type null as it's name. So within the Lore list, you'd type newstring null (your lore here). Otherwise it would think the first word in your lore description is actually the name of the string tag.
-
View User Profile
-
Send Message
Posted Jan 14, 2013Just wanted to let you know, I've linked your mod in one of my tutorial videos. http://www.youtube.com/watch?v=cV_kiOh1dsg&feature=youtu.be
-
View User Profile
-
Send Message
Posted Jan 13, 2013i cant seem to be able to create a lore.
newlist Lore newstring blahblahblah
when i press enter, it relays a blank message. after i save and exit, it doesnt have the lore
-
View User Profile
-
Send Message
Posted Jan 13, 2013After playing around with it i found a few bugs, i think... i made a new byte for a villager named "Invulnerable" and set it to 1. according to the wiki and youtube videos, this should make my villager take no damage. but it still takes damage. and "AgeLock" doesnt seem to work. i set it to 1 and set his "Age" to -100 but it only stays small for 100 ticks. and yes. i did save!
-
View User Profile
-
Send Message
Posted Jan 13, 2013@Thrystor
thank you. i feel stupid now xD
-
View User Profile
-
Send Message
Posted Jan 13, 2013It also deletes any lists I try to save to a spawner's SpawnData field, so I can't use positions or equipment.
Edit: Nevermind, it's that SpawnPotentials overrides SpawnData.
-
View User Profile
-
Send Message
Posted Jan 13, 2013@mc_raftee
You have to type save in chat for it to save.
-
View User Profile
-
Send Message
Posted Jan 12, 2013for some reason, when making a custom head, i type /nbt then "edit ExtraType Craftee" and then in chat, it shows that Craftee was registered for "ExtraType" but when i right click the head again, the ExtraType is blank please help
edit: nothing seems to be saving...
-
View User Profile
-
Send Message
Posted Jan 12, 2013Never mind that, minecraft crashes every time a mob spawner tries to spawn a mob with effects.
-
View User Profile
-
Send Message
Posted Jan 12, 2013What's the maximum on potion effect times? I wanted to make a mob permanently invisible using a spawner. First I tried making the effect negative, but then they wouldn't spawn at all. Then I set the duration to 4000 and it repeatedly crashed my server until I deleted the zombie using NBTExplorer.
-
View User Profile
-
Send Message
Posted Jan 10, 2013@Najumicom
Hmm I think that's the responsibility of the user to understand what they're changing. You should have the minecraft wiki pages open for reference and not just be doing random things.
That said, there's not a lot you can do that will corrupt your world. I know changing MaxSpawnDelay to 0 on a spawner will crash minecraft, but I don't think you'll have your world corrupted. Adding an unrecognized tag to an entity will just be ignored and erased by minecraft. You can't really edit the world data anyway, apart from the player data which, in multiplayer, is actually contained in a different file.
What actions specifically are you referring to that are so dangerous?
-
View User Profile
-
Send Message
Posted Jan 10, 2013@benzrf
Ok I've fixed this up now. You can use "paste [name]" to paste a tag in with the name you specify. So tags you copy from a list will no longer have blank names, and you'll be able to change the name of a tag if you're pasting it somewhere that requires a different name.
Version 1.11 is pending approval now.
-
View User Profile
-
Send Message
Posted Jan 10, 2013do you think that you would ever add a method of detecting weather you made a mistake that might corrupt the world, and then the plugin blocks that action?
-
View User Profile
-
Send Message
Posted Jan 6, 2013@Kyran_
Actually, it's so that I can move tags from one object to another. For example, copying something from an item frame to a spawner so that I can alter rockets that it spawns. Since the rocket data expects a different name from the frame, I can't do anything with it... :/
Also, trying to copy tags from a list to a compound doesn't work... :<
-
View User Profile
-
Send Message
Posted Jan 5, 2013@benzrf
Renaming tags wouldn't do anything but make the tag not work. You can delete a tag and recreate it with a different name, but the name has to correspond to one of the tags that goes along with the entity or block you're editing or else it will be ignored by minecraft.
Do you maybe mean the ability to rename inventory items? You can do this under the Display section of an item's tag. Refer to the minecraft wiki links above for more info on the structure.
-
View User Profile
-
Send Message
Posted Jan 5, 2013@JeremyZh
To edit a spawner, use /nbt to go into edit mode, then right click the spawner to load its data. If you want to change what it's spawning use "edit entitiyId [Id]", replacing [Id] with the entity Id of the entity you want spawned. (Look on this page) The entity Ids are listed on the right side.
To add any extra tags (for instance for falling blocks) navigate to the SpawnData folder with "cd spawndata" and add them in there. If you mouse over the icons beside all the tags listed on that minecraft wiki page I linked, it will tell you what type they need to be. Refer to the command list above for the exact syntax for adding different tag types.
Once you're done, type save, and then type done or exit.
-
View User Profile
-
Send Message
Posted Jan 5, 2013One major feature I would like is the ability to rename tags. Seriously, that would be great!
-
View User Profile
-
Send Message
Posted Jan 5, 2013Ok, I am a noob with NBT. Can someone show me pictures of how to use this plugin? Like making the thing spawn primed TNT, but not making any destruction. Also, I wanna know how to spawn sand that falls. Thanks!
-
View User Profile
-
Send Message
Posted Jan 4, 2013@DevKnorke
I'm aware it's written in java, I must have come across that fact at some point during the time I spent developing this plugin. Creating a JFrame from within Bukkit is just going to pop up a window on the server's (probably nonexistent) screen. The player won't see it unless they're sharing the same machine. So it'd be pretty useless to include with the plugin. I'm assuming you want to use it with your local server?
Regardless, most of the plugin logic happens in the Bukkit conversations API prompts. Formatting it to work with a GUI would require a fair amount of rewriting. With the recent Bukkit namespace changes, the plugin will now break with every new version update, since it uses net.minecraft.server internals. It wouldn't be worth your time to try and convert my source over to a format that fits your local GUI every time an update is released.
-
View User Profile
-
Send Message
Posted Jan 4, 2013@Kyran_
Bukkit is written in Java, therefore you should be able to start a new thread which creates a JFrame in which I want to put the editor. Of course this could only used when you have access to the servers Desktop.
You didn't answer my original question though. ;) (remember, this is for my own personal use. I won't share your code to anyone)