[PowerNBT]Powerful NBT editor for Bukkit and MCPC-Plus Version: 0.6.1b Features: Browsing and editing NBT tags Supporst tab-completion Edit item AttributeModifiers Customize item names and lore Full support for colors and Unicode Change enchantments and potion effects Save inventory into file and restore Change mob equipment Customize mobspawners, fireworks, mob features Edit .schematic files (WorldEdit) and more! Usage: see Commands Examples: change armor color: /nbt item display.color = #FFFF00 change player's health: /nbt *Notch HealF = 120 change item name: /nbt item display.Name = "&4BOMB!" youtube: edit villager (Move your mouse to reveal the content) youtube: edit villager (open) youtube: edit villager (close) API: How to use: http://dev.bukkit.org/server-mods/powernbt/pages/api/ GitHub: http://github.com/DPOH-VAR/PowerNBT Download: [dev.bukkit.org]
You should make this into an API type thing with complete Javadocs, along side the commands. It would be great as an abstraction library.
CraftBukkit already has an API: https://github.com/Bukkit/CraftBukk...java/net/minecraft/server/NBTTagCompound.java NBT format and available tags: http://www.minecraftwiki.net/wiki/Chunk_format How to get NBT tag (Move your mouse to reveal the content) How to get NBT tag (open) How to get NBT tag (close) Items: ((CraftItemStack)object).getHandle().getTag(); Living entities: NBTTagCompound tag = new NBTTagCompound(); ((CraftLivingEntity)object).getHandle().b(tag); -- your code -- ((CraftLivingEntity) object).getHandle().a(tag); //update Entities: NBTTagCompound = new NBTTagCompound(); ((CraftEntity)object).getHandle().c(tag); -- code -- ((CraftEntity) object).getHandle().e(tag); // update Blocks: Code: tag = new NBTTagCompound(); TileEntity tile = ((CraftWorld) block.getWorld()).getTileEntityAt(block.getX(), block.getY(), block.getZ()); if(tile!=null) tile.b((NBTTagCompound) tag); // -- code -- if(tile!=null) { tile.a((NBTTagCompound) tag); int maxDist = Bukkit.getServer().getViewDistance() * 32; for (Player p : block.getWorld().getPlayers()) { if (p.getLocation().distance(block.getLocation()) < maxDist){ Packet packet = tile.getUpdatePacket(); ((CraftPlayer) p).getHandle().netServerHandler.sendPacket(packet); } } }
Sources is not available (I do not know how to use the github ) Wait for version 0.3 I completely rewrite it and publish the source code.
Okay. I was just looking for some NBT examples with blocks. I'm trying to get the command line from a command block. But I can't find any good info out there.
Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Code: NBTTagCompound tag = new NBTTagCompound(); TileEntity tile = ((CraftWorld) block.getWorld()).getTileEntityAt(block.getX(), block.getY(),block.getZ()); tile.b(tag); // editing tag.getString("Command"); tag.setString("Command","your new command"); // after editing tile.a(tag);
I Think He Means not just yourself can see them? Btw Can You give say a skeleton an enchanted item? if so how
I believe that if you drop a bow and they walk over it that they will pick it up if that is what you mean
1) Yes. 2) Code: {edit item in hand in slot 0} /nbt item ench[0].id = short <enchantment id> /nbt item ench[0].lvl = short <enchantment level> {...} /nbt %skel select {select skeleton} /nbt %skel Equipment[0] = me Inventory[0] or Code: {edit directly:} /nbt %skel Equipment[0].id = short <id> /nbt %skel Equipment[0].Damage = short <data> /nbt %skel Equipment[0].tag.ench[0].id = short <enchantment id> /nbt %skel Equipment[0].tag.ench[0].lvl = short <enchantment level> /nbt %skel Equipment[0].tag.ench[1].id = short <enchantment id> /nbt %skel Equipment[0].tag.ench[1].lvl = short <enchantment level> /nbt %skel Equipment[0].tag.display.Name = string "item name" {etc} or Code: {edit item in hand} /nbt item ench[0].id = short <enchantment id> /nbt item ench[0].lvl = short <enchantment level> {...} /nbt %skel select {select skeleton} /nbt %skel CanPickUpLoot = byte 1 {drop item to skeleton} /nbt %skel CanPickUpLoot = byte 0
Is there any way I can edit the enchantments name? say I it had Feather falling but I wanted to change the name to bob, how would I do this?
No. But you can set invisible enchantment (id>200). Its name will not be displayed, but item will shine. Then edit tag dislpay.Lore to add a text below the name Code: /nbt item display.Lore[0] = string "\c7Simple magic VI"
Uptated to 0.3.3 New commands: cut, swap, view (in range), >> << (move) Supports unicode in tag names (just in case) HTML colors ( for armor and fireworks, example: /nbt item display.color = #FFFF00 ) new interface
update: PowerNBT v0.6.1 beta for bukkit 1.7 (not compatible with 1.6.x) - you can't see name of tag (this feature is disabled in minecraft 1.7) - if you do not specify a type of numeric value, it will be int or double now these commands is correct: /nbt compound copy /nbt buffer myInt = 15 /nbt buffer myDouble = 3.14 - no crashes on mismatch types of numeric values: /nbt me HealF = 10 int - correct - selection of mobs with "*" and "select" does not work: /nbt * HealF = 10 - error /nbt %e select - error use id[tab] instead of selection.