Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Implementing banner
Post: RE: Implementing banner

If I have some time again I'll have another look and submit a pr.
Seyaku Development 36 30,379 12-08-2016, 05:36 AM
    Thread: Implementing banner
Post: RE: Implementing banner

It was basically working with one weird crafting issue yet to be resolved, but I never got a response as to which approach we should take regarding storing extra metadata.
Seyaku Development 36 30,379 12-02-2016, 09:44 AM
    Thread: Smart chunk management
Post: RE: Smart chunk management

Maybe save the time each chunk was last active. Then the delta (D) between last active time and current time is compared to threshold (T). T should be low (10-30 sec) for chunks not neighboring active...
Seyaku Development 13 12,684 05-26-2016, 12:12 AM
    Thread: Implementing banner
Post: RE: Implementing banner

Ok, did some final testing and tweaking and everything appears to work properly. Once a decision has been made regarding the metadata, I will implement that and make it ready for a pull request.
Seyaku Development 36 30,379 05-25-2016, 07:33 AM
    Thread: Implementing banner
Post: RE: Implementing banner

Before using Json I made this class, to be implemented by each item handler that needs custom metadata. [shcode=cpp] /** Storage class for item meta data */ class cItemMeta { public:   virtual...
Seyaku Development 36 30,379 05-25-2016, 02:09 AM
    Thread: Implementing banner
Post: RE: Implementing banner

I don't think the fact that minecraft uses NBT is relevant in this matter. Fact is we need a generic solution for storing any kind of metadata for items, which can be converted to both NBT and Json. ...
Seyaku Development 36 30,379 05-25-2016, 12:30 AM
    Thread: Implementing banner
Post: RE: Implementing banner

tigerw Wrote: (05-24-2016, 08:00 AM) -- I would advise against storing anything as JSON in memory, considering saves are in NBT format. -- Well I didn't until xoft convinced me it would be better if ...
Seyaku Development 36 30,379 05-24-2016, 09:29 AM
    Thread: Implementing banner
Post: RE: Implementing banner

Would removing the ingredient from a_Recipe->m_Ingredients work? --- Everything works as far as I can tell (apart from retaining one item in one recipe), but there is a weird issue when crafting ban...
Seyaku Development 36 30,379 05-24-2016, 05:52 AM
    Thread: Implementing banner
Post: RE: Implementing banner

I reworked the code to use Json::Value as m_Metadata, everything works as intended. Currently implementing the crafting side and was wondering how I can prevent a certain ingredient to be consumed dur...
Seyaku Development 36 30,379 05-24-2016, 02:23 AM
    Thread: Implementing banner
Post: RE: Implementing banner

:) ok, I'll rework it with Json::Value, shouldn't be too much work. And look at the copy constructor and assignment op -> Code: -- if (a_CopyFrom.GetItemMeta()) { cItemMeta * meta = GetHand...
Seyaku Development 36 30,379 05-23-2016, 05:37 AM
    Thread: Implementing banner
Post: RE: Implementing banner

Duplication should work just fine and ToNBT is called way more often than ToJson, so not much to win there. But yeah, using json::value to store it could work. If we change it to Json::Value, we need...
Seyaku Development 36 30,379 05-23-2016, 02:53 AM
    Thread: Implementing banner
Post: RE: Implementing banner

Check https://github.com/cuberite/cuberite/compare/master...sladage:banner (https://github.com/cuberite/cuberite/compare/master...sladage:banner) Item.h should give you a good idea. I made it as gene...
Seyaku Development 36 30,379 05-23-2016, 01:47 AM
    Thread: Implementing banner
Post: RE: Implementing banner

Yay! Got it working. Added a meta data storage system to cItem which reads/writes to/from NBT and JSON. Placement and data saving works (placed banners to chunks and items to json). All that is lef...
Seyaku Development 36 30,379 05-22-2016, 11:41 PM
    Thread: Implementing banner
Post: RE: Implementing banner

Just an update, banners can now be placed but I only see them when reconnecting. I'm assuming I need to send an update to let the client know about the new banner. Looking at the other item handlers i...
Seyaku Development 36 30,379 05-22-2016, 01:41 AM
    Thread: Implementing banner
Post: RE: Implementing banner

Hmm I think we need a more generic solution than to add extra fields to cItem for each item that has extra meta data. I'll experiment a bit with this myself. Also, I just came across this code: un...
Seyaku Development 36 30,379 05-22-2016, 01:04 AM
    Thread: Implementing banner
Post: Implementing banner

I'm working on adding support for the banners. From what I understand, banner items have extra nbt data associated with them, containing information about the patterns and color. Currently I don't see...
Seyaku Development 36 30,379 05-21-2016, 06:53 AM