NavidK0 / Carbon

Carbon is a Spigot plugin which turns a spigot protocol hacked server (on 1.7.10) into a 1.8 server.
GNU Lesser General Public License v3.0
35 stars 19 forks source link

Banners don't show patterns (data) on them in inventory #94

Closed Puremin0rez closed 10 years ago

Puremin0rez commented 10 years ago

Related to https://github.com/NavidK0/Carbon/issues/75

Banners don't appear to show the pattern data when crafted or spawned in - in the case of crafting, you will see the pattern for a split second before showing the default blue banner.

However placing the banner will still reveal the pattern in world.

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

Shevchik commented 10 years ago

Bukkit/Spigot removes nbt data of unknown items on send. I can override this, but that will be really hard.

Wombosvideo commented 10 years ago

@Shevchik If you'd get this working, do you allow me using it in my own (upcomming RPG) Plugin?

Shevchik commented 10 years ago

Should now work

Puremin0rez commented 10 years ago

They do now work, however, if you have it in your inventory and you open the creative inventory it'll instantly wipe the data from the banner. So basically it works fine in Survival Mode.

Shevchik commented 10 years ago

Bukkit/Spigot has incoming scrambler too, should fix that.

Shevchik commented 10 years ago

Well, looks like it didn't work properly, now you can craft them just fine, but as soon as i put them in inventory something clears nbt :(

Puremin0rez commented 10 years ago

Haha, one step at a time I suppose. Not sure if I'm doing something wrong but it seems as if command block spawned banners are all returning black now? Can't seem to get patterns to work. Can anyone confirm?

Jikoo commented 10 years ago

Command blocks are working fine for me with /give and /setblock, do you have an aggressive NBT cleaning plugin? Mine only cleans items when they're spawned from creative, not picked up or clicked in inventory.

HunTwig commented 10 years ago

So there is no fix? Survival or Not I can't add patterns to banners. :-/

Shevchik commented 10 years ago

I can, but i will have to override all containers for this :(.

HunTwig commented 10 years ago

What do you mean?

unicxa commented 10 years ago

He will have to basically "store" all the patterns in a list/map and "override" all of the inventorys / chest for this to work at least. that's what I assume.

unicxa commented 10 years ago

thats pretty hard knowing my experience storeing data in a map/list

unicxa commented 10 years ago

and getting all inventorys aswell

unicxa commented 10 years ago

in this they are using NTB tags that open a File that stores data on it and is able to be called by name in a method

Shevchik commented 10 years ago

Something like that. I will have to store patterns in attributes tag list, so bukkit won't wipe them. I can account them in recipe, and while sending data to player, so nobody will notice. But that won't transfer to vanilla at all. I opened a feature request at spigot for adding custom craftitemmeta api, but if they won't do anything - i will have to implement this method.

Shevchik commented 10 years ago

Banners now use lore internally(server side). Lore is remapped to nbt when sending to client or placing the banners. NBT is recoded to lore when receiving data form client or breaking banner, so players won't notice this. But due to this item banners no longer support nbt and also item banners will lose patterns when transferred to vanilla.

Puremin0rez commented 10 years ago

For clarifications, only banners that are items will lose patterns when loaded in vanilla - not in world banners, correct?

Shevchik commented 10 years ago

Yes

Puremin0rez commented 10 years ago

Well, just had a test and everything looks good on my end. If you're comfortable with how they work now, you're welcome to close this issue :)