MultiInv icon indicating copy to clipboard operation
MultiInv copied to clipboard

Item "AttributeModifiers" not save bug

Open kgamecarter opened this issue 11 years ago • 4 comments

MultiInv can't record special data like below picture.

http://i.imgur.com/fqHOKQ3.png

http://i.imgur.com/fUpVg1W.png

like -200 Attack Damage.

When MultiInv load this item to inventory.

The special data will disapear.

This is my player.dat you can look NBT node of this item.

http://www.mediafire.com/?dhevn6i2wmgiuvk

kgamecarter avatar Aug 27 '13 21:08 kgamecarter

Some other reference data.

http://imgur.com/a/Mh3fa

kgamecarter avatar Aug 27 '13 21:08 kgamecarter

I hope MultiInv can support ALL ITEMS include custom items which using NBTTag.

Like this plugin http://dev.bukkit.org/bukkit-plugins/toggleinventory/

kgamecarter avatar Aug 28 '13 18:08 kgamecarter

I'll take a look at it and see if there is an API for it in bukkit. If not I'll be waiting on that.

Tux2 avatar Sep 09 '13 09:09 Tux2

But some other plugin use custom NBTTag for saving extra information in items. example:MobCatcher.

I think record NBTTag is the best solution.

It is simple to record NBTTag. Just serialize the root of item's NBTTag.

No more than 10 line code.

Serialize all of inventory Sample Code: https://github.com/yukinoraru/ToggleInventory/blob/master/src/main/java/com/github/yukinoraru/ToggleInventory/ItemSerialization.java

kgamecarter avatar Sep 10 '13 19:09 kgamecarter