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 |
@bobberto7
Added to the todo list
and like a permission node to /nbt me Invetory = @name Invetory
@DPOHVAR
like
blocks
powernbt.block.* access to /nbt block commands
powernbt.block.edit.{block_id} commands like /nbt block SpawnRange = 10,/nbt block Command = say hi
powernbt.block.rem = /nbt block rem
Mobs
powernbt.mob.* access to all /nbt * comannds
powernbt.mob.edit.health access to /nbt * Health = 10
players
powernbt.players.* access to edit rem .ect /nbt @name
that's all i can think of right now
@bobberto7
what permissions do you need?
can you add more permissions if you have the time?
@funAlways
1) no.
2) i don't know
Wiki says:
SpawnRange: The radius around which the spawner attempts to place mobs randomly. The spawn area is square, includes the block the spawner is in, and is centered around the spawner's x,z coordinates - not the spawner itself.
But i think that height is fixed and equals 2 or 3 blocks.
I noticed that spawner ignores mobs that are above on 3 blocks.
Hey, thanks for your answer to my last question! Ur Awesome! Some more question though :P
@DPOHVAR
Isn't Varscript for an older version of MineCraft? Thank you so much for your help! I'll PM you later today when I have time to work on the server.
(You should have a link to donate to you!)
@Roflzack
I can help you, if you install Varscript 0.4.1
this is the simplest way to find Wither and try to remove them. Or edit chunk file with him.
PM me to skype:dpohvar
In an old part of our server world there is this wither skeleton that I was trying to make with a plug in called custom spawner or something (The exact plugin doesn't matter it was just an nbt editor) anyways, I messed up and now whenever you go near that area you crash... What can I do to get rid of the skeleton? (I already got rid of the spawner with worldedit)
Mcedit is out of the question as the map file is ENOURMOUS
I've tried running into the area and typing /butcher and /killall before I crashed but this did not work I also tried downloading the Nodus client and turning on "norender" for mobs so that my game wouldn't render the skeleton but it just crashed anyways (Thanks for nothing, Nodus)
@Roflzack
Do not change this value for players! CanPickupLootiss 0 by default, but if you set to 1 client will crash when pickup item
I'm guessing I can't do this but is it possible for me to set a players canPickupLoot to 0 so they cant pick stuff up? That could be useful for games
@DPOHVAR
Thanks for the fast reply! You are a huge help, and I wish all plugin developers were like you!
Oh no! There's no donation link!
@Roflzack
remember coordinates of spawner
/nbt block RequiredPlayerRange = 0
- disable spawner/nbt block SpawnPotentials[0].Type = "Villager"
- set mob type to villager... now spawner can crash your server, but it is disabled
/nbt block SpawnPotentials[0].Weight = 10
-... now spawner is not danderous for server
/nbt block SpawnPotentials[0].Properties.Health = 0 short
- set 0 hp/nbt block MinSpawnDelay = 0
- 0 or 1/nbt block MaxSpawnDelay = 1
- must be ≥1if you need to set custom spawn location:
/nbt list copy
/nbt buffer [0] = X double
/nbt buffer [1] = Y double
/nbt buffer [2] = Z double
/nbt block SpawnPotentials[0].Properties.Pos = buffer
- paste list to propertiesnow make a backup
/nbt block RequiredPlayerRange = 3
- enable spawner with radius 3Villager will have to spawn in next time, after entity in EntityId field.
I am a bit confused about how to set the co ordinates that an entity will spawn at regardless of the spawner's position. Could I have a little personal tutorial?
Sorry to bother you but I'm scared to do anything without being 100% sure it wont blow up the server (hyperbole).
My final objective is a proximity detector using a villager spawner that spawns villagers with 0 health in a trip wire.
I want the player range to be 2 and I want the mods health to be 0 and the delay to be 0 between spawns.
so far I have: /nbt %b select (right click spawner) /nbt %b EntityId = "Villager" /nbt %b MinSpawnDelay = 1 /nbt 5b MaxSpawnDelay = 1 /nbt %b SpawnRange = 2
@funAlways
1)
SpawnPotentials is list that contains information about mobs in spawner. Each element in list has:
*
string Type - entity ID*
compound Properties - additional info about entity*
int Weight - The chance that this spawn will be picked as compared to other spawn weights.Weight must be > 0!! Otherwise there will be a server error
If you have 2 elements:
[ Weight = 10; Type = "Spider" ] and [ Weight = 10; Type = "Skeleton" ]
chances will be 50%50
You can set RequiredPlayerRange = 0 (disable mobspawner) and edit SpawnPotentials directly. It's safe... I think
2. About potions:
By default potions has no nbt tag, and differ only by id:data
You can set CustomPotionEffects to any potion, and it will overwrite its effect.
http://www.minecraftwiki.net/wiki/Player.dat_Format#Potion_Effects
3. Lets try :-)
UPD:
Edit Command tag. Also you can use unicode symbols.
4. use @player.
Awesome plugin, especially since me and my friend in a bukkit server love to mess around with a mob/block and making map some question though
@Nathaniell7
1) Yes
a)
/nbt compound copy
- copy new empty compound to bufferb)
/nbt $temp = compound
- write new empty compound to file temp.nbtc)
/nbt compound as %var
- select new empty compound as variable %varthen you can edit it as you wish:
a -
/nbt buffer query = some
b -
/nbt $temp query = some
b -
/nbt %var query = some
2) about powerEggs
Try to apply this command to egg (id 344)
/nbt item poweregg.explosion = 2 float
and the egg becomes dangerous :D
The plugin is actually useless (only for fun) but it show the use of PowerNBT API ;-)
UPD:
me Inventory[slot]
Don't try to create item withnonexistent id. IDK what will happen in this case
yeah I figured it out, the reason was I put "/nbt buffer Equipment[0] = me Equipment[0]" instead of "/nbt buffer Equipment[0] = me Inventory[0]" I think
I do have a few questions though, like: 1) is it possible to create an entirely new entity from scratch? I got as far as copying a zombie or something to the clipboard, creating a new compound, and pasting all of the zombie's information into the new compound, but I'm not sure where to go from there
2) how exactly does powerEggs work? I can't figure it out from the instructions given on its page
@Nathaniell7
it could be a typo in the name of the mob, the wrong value MaxSpawnDelay or anything else
please append a log file with all your commands