Problems with insertNewClothingItem() :(

  • Hi @red51 I'm trying to insert clothing and object kits to an inventory via plugin,


    I'm using https://javadoc.rising-world.n…em-short-int-int-int-int- as a reference as how this is achieved.


    This is how I'm doing it (the clothes bit - objects obviously different)


    Problem is, when I first call this, i.e. add an item of clothing to the player inventory I get a "broken" item. Which strangely gets fixed when I call the code a second time, OR equip another working item of clothes.


    For visualisation:


    Here I have moved a medieval armour over to my inventory, cancelling the event, then called the above code. As you can see in the inventory slot 1 there is a "broken" item.




    I did the same thing again (no changes to code) inserting the rag clothes into slot 2. At this point slot 1 magically became the working item it was supposed to be and slot 2 was broken.



    This behaviour continues with each added item.



    It also appears that equipping an item fixes the broken inventory items. For example, in the above screenshot, as soon as I equip the armour the rag clothing in slot 2 appears normal.




    Any idea what's going on here? ?(

  • This is unfortunately a bug: if an item which uses a certain attribute was added to the inventory, the attribute was only stored serverside and not properly synced with the client. As a result, the client received a "broken" item, but as soon as the inventory was re-synced with the server (which happens in certain situations, e.g. if the client or server detect the desync, or if the player reconnects to the server), the item was fixed.


    This annoying bug will be fixed with the next update :)

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!