[BUG] Create new item with item_crafted_id instead of item id on SetMetadata
ZambrOvosky opened this issue · 16 comments
When you have more than 1 item stacked, let's say 2 pickaxes, and wants to set the metadata for 1 of them, the item_id
on items_crafted
table is inserted as the id
on items_crafted
of the original pickaxe instead of the id
of the item in items
table.
if you have an item with a stack that means the item is same , so adding metadata to a specific item wouldnt make sense as they are the same only unique items wont stack.
if you have an item with a stack that means the item is same , so adding metadata to a specific item wouldnt make sense as they are the same only unique items wont stack.
That's not true, in my usecase I have "pickaxe" that you can stack up to 5. When I use it, I'm not using the 5 of them, just 1. The metadata holds what's the durability for this specific used item is at.
Like, if it's not supposed to set metadata for N amount of a stack, why does VORP have a export for it them?
if you have 5 items stacked they arent unique , meaning they dont have metadata or they all have the same metadata. hence you dont need to get a specifc item to apply, they are the same it doesnt matter which item you apply
they matter when items are unique in which you have exports to get specific items with their unique ids
The problem it self is here
Where item:getId() returns the item crafted id instead of the item id it self.
If it's not supposed to set a metadata to N amount of a stack, the amount param shouldn't exist and this if below shouldn't too
i still dont understand whats the issue you facing ? the metdata isnt being applied if the item is in a stack?
When you have more than 1 item stacked, let's say 2 pickaxes, and wants to set the metadata for 1 of them, the
item_id
onitems_crafted
table is inserted as theid
onitems_crafted
of the original pickaxe instead of theid
of the item initems
table.
I explained it on the main thread.
let me try
this is why i asked for steps of reproduction, i dont need an explanation, i need steps on how to achieve the issue knowhere you mentioned you loose the item on relog.
step 1 apply meta to a stack of items
step to 2 relog item is gone.
thats what i wanted.
and I just tried and indeed happens
this is why i asked for steps of reproduction, i dont need an explanation, i need steps on how to achieve the issue knowhere you mentioned you loose the item on relog.
step 1 apply meta to a stack of items step to 2 relog item is gone.
thats what i wanted. and I just tried and indeed happens
You got a point, I promise to get better on that.
thanks.