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.
@laacis2
Yeah I'm not sure why the invulnerable tags aren't sticking. The minecraft code must be erasing them. It might also be an issue with craftbukkit instead of the vanilla minecraft code. Hoping they resolve it soon.
adding Invulnerable tag to pig. after typing save, tag is gone
Is it allow me to edit scoreboard?
Last sentence of donation pic made me lol Back to the plugin, I have to say I finally know what is NBT orz
v1.36.2 for craftbukkit version 1.6.2 is pending approval now.
@Kyran_
Sweet, thanks! Also, worldedit works for me with 1.6... not sure about worldguard though
@deleted_10786114
1.36 is awaiting approval as we speak!
Now if only worldguard and worldedit would update. We're doing a full server reset on my home server so once the core plugins are updated we're blowing everything up and starting over. It'll be worth the wait when we've got a brand new world fresh from the 1.6 generator.
Using Cube Genetics on 1.6.1 throws me an error. I can't wait for this to be updated!
@subliminalcanine
Just do /nbt and then right click on him.
Seeming to not understand the code to access mob attributes, I want my cow I named jimmy to have 1000 health, and not despawn but what command allows you to edit animals?
hey Kyran I wonder if I can edit the scoreboard nbt structure I think it's inside a world nbt structure, but I don't know how to open it. is there a way to explore the world's nbt structure? thanks
@Sycholic
The list of entity IDs are on the chunk format wiki page. You need to set it to Skeleton and create the byte SkeletonType inside the Properties compound and set it to 1 for a wither skeleton. Any tags that a particular mob needs go inside the Properties tag which is there to hold all the extra data. So things like potion effects, extra health, armor, etc. all go inside Properties.
You spawner structure should look like this:
@nullschritt
I'm talking about a redstone clock, not the actual clock item. Not sure if you're confused there.
A nice simple design is this one... put down a block, with a redstone torch hanging off one side, and a piece of redstone dust on the other side. Put a block above the redstone dust, and put a repeater on top of the first block you put down, pointing into the second block. Set this repeater's delay to full by right clicking it. Then put your command block behind the repeater you just placed. It should be above the redstone torch which is mounted to the side of the first block. The blocks should be in a V formation and it you should see it pulsing now.
Like this:
Then put a comparator facing outwards from your command block, followed by a repeater. Then just run redstone to where you want the dispenser to be.
Like this:
Set the command in the command block like I mentioned earlier to testfor @p[x,y,z,r] and whenever someone comes within r blocks of those x,y,z coordinates, the commandblock will output a pulse.
@Kyran_
Thanks for the response, I had never used a clock before? I didn't know there was an ingame item that would activate redstone on a timer. (without the use of a loop, or a plugin to make a loop, such as qc) That does seem like a more simple solution. (: Thanks
@nullschritt
Well this plugin operates on the already present NBT structure within the game. It's not actually modifying any game code, just changing values you usually can't get to.
That said, the developer of your NPC mod might have added in some NBT tags to the custom NPCs. Your best bet is to spawn an NPC and look at it's NBT data. Although I'm guessing those other spawner plugins you listed also work on NBT data so I'm not sure you'll have much luck. I think the spawner will check through its list of supported entities and ignore any it doesn't recognize. Even if their code does happen to be present on the server.
If you do want to mess around with spawners, do it on a test world. You don't want to get locked out of your server just because every time you log in your client crashes from a bad spawner. I've had it happen before and had to get someone else on the server to use this plugin to change my location. Then I had to fly towards the area with a big worldedit air brush to erase it before I got too close. It's a hassle, so do your experiments on a backed up test world that you can delete if need be.
Redstone is a viable option. Hook up a clock to a command block with a testfor @p[x,y,z,r] command, where x,y,z are the coordinates and r is the radius of your spawn detection area. Then put down a comparator coming out of that command block into a repeater and then into your infinite dispensers. Great thing about the testfor command is it only outputs a pulse once when someone enters the radius so it doesn't just spam eggs constantly.
Quick question, I have been looking EVERYWHERE, for a solution, and I think your plugin MIGHT just be able to do it, there are NPCs on my server(moded), that do not spawn by default(only from eggs), and cannot be set to spawners(I have even tried crazyspawner, and a superspawner mod), because they are not included in the default entity list.
Would it be possible to modify a spawner block, or some other type of block, to generate these NPCs? They have their own models, A.I., etc, but all I need is a way to automatically spawn them in the game.
Thanks to this, I COULD make an infinite dispenser, hooked up to a in game computer, quantum loop, or some other intelligent/easily configurable type of loop, that would dispense the eggs, but that would create a bit of lag.
So please let me know if making an actual spawning block for custom entities is possible with this plugin, or if you could make it possible? Thanks! Love the sound of this plugin already.
Alright guys a new update is in the pipeline waiting for approval.
Version 1.35.2 sports a tag renaming feature, but more importantly, a macro system! Now you can record several actions into a macro and save them. You can also include parameters with the macros. For instance you could make a macro that changes your flight speed depending on the number you pass in. Once you've got it set up, it's just a matter of typing 'm flyspeed 0.3' and boom, you're wizzing around. "m flyspeed 0.05' and you're back to regular speed again. Note that you can name a macro whatever you want and pass in as many parameters as you'd like.
This is useful for many number of complex operations. For instance you could make a macro that adds a potion effect to a waterbottle, taking in the id, strength, and duration as parameters. Or make a mobspawner spawn a certain mob at the x, y, z coordinates you pass in. Or you could use a macro to fill someone's inventory and enderchest with spider eyes (or diamonds if you're feeling nice).
There's many possibilities I haven't even thought of yet, and hopefully this will really open up what you can do with this plugin.
I've been working all day getting it finished and squashing bugs so if you find any problems, shoot me a message or file a ticket.
Cheers!
PS I've added a new page detailing the macro functionality. You can find it under pages or click the link in the main description near the bottom.
I've also added a poll on the top right regarding supporting older versions of craftbukkit. It's a lot of extra work updating every version whenever I add a new feature. Developers used to be able to just recompile with a newer craftbukkit jar, but now they've separated things into different packages for every new version. Which means I need to keep track of a bunch of extra files to continue to support the older versions. I was thinking maybe supporting the latest recommended build, beta and dev build? Then that's only 3 different versions of files to maintain and the plugin size won't keep growing as new versions are released. Let me know what build you're using in the poll.
@dead_fred
I'm cooking up a new update that will have that functionality. Until then you can do:
Could you please add a command to rename a (compound)tag?