#(neocky) Remove lore component from item

37 messages · Page 1 of 1 (latest)

stark skiff
#

Heyo, I have a shop system, where I set the sell values in the lore of the player items. The lore lines get removed after closing the shop menu. The problem that I now have is, that the items which I get back have a lore component and differ from normal minecraft items. Here is a paper dumpitem output of normal cobblestone and cobblestone which got a sell lore applied through the shop:

  • minecraft:cobblestone[!lore]
  • normal cobblestone as comparison minecraft:cobblestone
    How can I remove the lore from the item?
opaque dockBOT
#

(neocky) Remove lore component from item

opaque dockBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

stark skiff
heavy wind
#

hmm

#

instead of adjusting the actual item i would create a copy, adjust it here

#

and once it closes

#

remove the copy

#

and give the original

stark skiff
#

I set an empty list. Denizen returns false if i check the cobblestone with /ex narrate <player.item_in_hand.has_lore>.
This is currently the only way to remove the lore component: /minecraft:item modify entity @s weapon {function:"minecraft:set_lore",entity:"this",lore:[],mode:"replace_all"}

heavy wind
#

that way you wont have to fuck around with editing lore

stark skiff
#

Hmm yes I could copy the inventory and then edit only the copied items

#

I think there should be a way in denizen to remove the [!lore] component on the item

heavy wind
#

i mean kinda reasonable feature request

#

but in this case i would definitely go with copy option

#

as imagine you would have an custom item with some lore or whatever

#

which could fuck up

stark skiff
#

Does anybody else know how can I remove the lore component from the item? Output from /ex narrate <player.item_in_hand.all_raw_nbt>

#

Or is this currently not possible and should this be a featurethread?

calm moon
#

!m lore

sudden summitBOT
# calm moon !m lore
Cannot Specify Searched Mechanism

Multiple possible mechanisms: ItemTag.lore, EntityTag.explored_locations.

#
Possible Confusion

Did you mean to search for command look?

calm moon
#

!m ItemTag.lore

sudden summitBOT
calm moon
#

hmm

#

i still dont understand the question

quick horizon
#

#showcase message

i did something like this here. not sure if it'd help or apply in your scenario specifically, but just in case it does SMILERS

versed plover
#

Yeah removing the lore from the item and give the result is wonky

#

I'd flag the item with the item it should present and then give that back

stark skiff
#

Okay I just re-gave the items without lore and now everything works as expected 👍

#

But now to my other question: When I set a lore on an item with this command:
/ex inventory adjust slot:hand lore:test
How can I remove the lore without re-giving the item?

#

This command results in this item:
/ex inventory adjust slot:hand lore:<list>
minecraft:cobblestone[!lore]

versed plover
#

what's problematic with "regiving" the item?

#

giving the item that displays the item that's being sold is bad data handling imo

stark skiff
#

Yes I agree and I rewrote it to just regiving the item without the lore and my shop system has no issues any more

#

Just for future reference how would I remove lore once applied?