PowerNBT
[PowerNBT]
PowerNBT moved to spigotmc.org
Powerful NBT editor for CraftBukkit 1.5 and later.
Simple NBT API (for developers).
Works with CraftBukkit, MCPC+, Cauldron, Spigot (fix to forge 1.4.7)
Features
- Browsing and editing NBT tags
- supports items, players, offline-players, entities, blocks, chunks, schematic files and all other nbt files
- save tags to file
- spawn entity with custom nbt tags
- parse mojangson string
- custom colors and unicode symbols
- supports tab-completion
- supports operations copy/paste/cut/swap
- supports variables
All commands
See: commands
Examples
- /
nbt me Inventory remove
- clear inventory
- /
nbt me Inventory = *Bob EnderItems
- get Bob's enderchest to yourself
- /
nbt @Eve remove
- remove file Eve.dat (offline player)
- /
nbt block ExtraType = "Notch"
- set skull owner
- /
nbt * Health = 1000
- set 1000 health to mob, which you select
- /
nbt item ench copy
- copy item enchantments to buffer
- /
nbt item ench paste
- paste enchantments to other item
Permissions
- powernbt.use
Bugs
- 0.8.1-0.8.2:
On command /nbt chunk = ...
invisible players and entities in new chunk.
- If you found a bug, please report me in github:
https://github.com/DPOH-VAR/PowerNBT/issues
Changelog
Version 0.8.2 beta
- added: binary opetarions: ^= , &= , |= , useful to set binary flags
- added: operation: multiplication: *=
- added: operation: spawn entity
- added: value: numbers in binary format
- added: values in mojangson format
- added: object: hand
- added: object: schematic
- added: view mode: binary
- added: silent mode for command
- added: API: read chunk
- added: API: save chunk
- added: API: parse mojangson string
- added: API: spawn entity
- fixed: support cauldron 1.7.10
- bug: invisible players after change chunk data.
- bug: on update blocks after change chunk. cauldron 1.7.10
Version 0.8.1
- added: read/write chunks
Version 0.7.3.1
- fix: work with Cauldron 1.7.2
Tutorials
- How to edit tags
- How to use Tab-Completion
- How to edit mobs into spawners
- How to edit villagers
- How to create custom potions
- How to edit fireworks (RU)
API
See API for documentation and examples
Maven dependency (since 0.7.2)
API for version 0.7.2 and later
Warning
If you add a tag, which is not expected by the client, it may be crashed. Be careful!
Helpful links, about NBT format:
- http://www.minecraftwiki.net/wiki/NBT_format
- http://www.minecraftwiki.net/wiki/Player.dat_Format
- http://www.minecraftwiki.net/wiki/Chunk_format
Github | Maven | Javadoc |
@DPOHVAR
Thanks!
@aetherX
Use \c to put color-char (§)
This works only in quotes: /nbt item display.Name = String "\c7Colored Name"
Special characters must also works: \n \b \t \u and other
@DPOHVAR
Encountered a kinda-annoying problem. I would like to use PowerNBT to rename items; but I can't change their color! Maybe add a & to § support? Thanks; this plugin is really cool and that's something I don't think I can stress enough :)
@aetherX
Use it as you want ;-)
@DPOHVAR
Oh, it wasn't working for me earlier but now it does. Thanks!
This plugin is awesome. Using it to make a map; hope you don't mind?
@aetherX
List type is automatically set.
If the list is empty, you can add any value.
otherwise, only the matching type.
An empty list can be of any type - this is not important.
This is really good, and I've got it MOSTLY figured out, but could you add some more help to the post? This is very confusing. It took me ages to figure out how to do some things.
EDIT: Okay, I'm laying the cards on the table. How on EARTH do you set the type of a list?
@Dysthymical
ActiveEffects[0].Id for mobs
SpawnData.ActiveEffects[0].Id for spawners
See http://www.minecraftwiki.net/wiki/Chunk_format
Its really helpful!
@DPOHVAR
Understand. How do you apply potion effects through the spawner? Should be my last question, sorry. I've been at /nbt %zombie ActiveEffects.Id = byte 14 for the invisibility potion on a zombie. Now how would I get that on a spawner?
@Dysthymical
you want too much of the NBT :D
you can not replace mob sounds without client modification.
But.. it is possible send sounds from the server to the client.
And this is not one of the features of this plugin.
@DPOHVAR
I see. Is it possible to change a selected mobs sound with this plugin? Such as make a ppigmen sound like a zombie. Or is that not what nbt data can alter?
@Dysthymical
1) Buffer is used for temporary storage of tags
You can copy tag to buffer, edit it, and then set back.
/nbt object copy (copy)
/nbt buffer query = value (edit)
/nbt object = buffer (paste)
2) You can not create your own entity types.
And you cannot edit tags, that it is not intended to entities and blocks
this does not apply to items and .dat files
Be careful when editing EntityID or EntityType fields!
it may crash the server
Try to use this for edit spawners:
Create template
/nbt compound copy (clear the buffer)
/nbt buffer Equipment[0].id = short 267
/nbt buffer Equipment[0].tag.ench[0].id = short 20
/nbt buffer Equipment[0].tag.ench[0].lvl = short 10
/nbt buffer Equipment[4].id = short 314
(... editing buffer ... )
/nbt $super-monster = buffer (save template to file)
Apply template to block
/nbt block SpawnData = $super-monster
/nbt block EntityId = String "Zombie"
in the next version you will be able to apply this template to any living entity (excepted players)
/nbt %selectedMob += $super-monster (add tags from file to mob and replace that exists)
Oh, that is for the spawndata in the spawner. My bad, I was just rambling on.
@DPOHVAR
Oh that makes sense. I haven't tried buffer. My apologies. I have tried everything else but buffer, forgot about it haha. So, /nbt buffer EntityId = String Zombie Saves the changed data values to the Entity Zombie? Can we make our own entities with this? Such as /nbt buffer EntityId = String ZombieWarrior For a custom zombie entity? Then change the spawner Entity to ZombieWarrior, would that work? Or is my imagination just going off the roof right now haha
Thanks this is working great, I just need to learn my way around in NBT. :)
@Dysthymical
You need to fill SpawnData.Equipment list in spawner
Example:
/nbt block copy
/nbt buffer SpawnData.Equipment[0].id = short 267
/nbt buffer SpawnData.Equipment[0].tag.ench[0].id = short 20
/nbt buffer SpawnData.Equipment[0].tag.ench[0].lvl = short 10
/nbt buffer SpawnData.Equipment[4].id = short 314
/nbt buffer EntityId = String Zombie
/nbt block = buffer
@willybobsta
it is black skeleton with invisibility and chain armor
@willybobsta
Dragon can not be spawned in a mobspawner
UPD: bats too =(
@willybobsta
Colors:
How to create new empty list:
/nbt object query.yourList = list
How to create list with empty compound:
/nbt object query.yourList[0] = compound
How to create list with values into compound:
/nbt object query.yourList[5].x = int 100500
but elements 0-4 will be empty compounds
How to create new empty compound:
/nbt object query.newCompound = compound
and not empty:
/nbt object query.newCompound.x = int 100500
UPD: oops! bug in 4th line. will be fixed in next update.
I got to the Equipment phase for equipping mobs, now what? I'm lost. How would I apply equipped mobs to the spawner like you did as well? Thanks!
id: MobSpawner
MinSpawnDelay: 1
RequiredPlayerRange: 32
Delay: 1
MaxNearbyEntities: 6
MaxSpawnDelay: 1
SpawnRange: 32
SpawnCount: 4
z:333
EntitId: EnderDragon
y: 63
x: -94
It isn't spawning anything??