Change item description frame color

  1. Is it possible to change the color of the item description frame?

I have not seen this in plugins and in vanilla, only in mods, but is there still the opportunity to change the color of the frame? An example in the screenshot below.

image

  1. This question is also related to the mod.
    Is it possible to remove the description - “Minecraft”?

image

Yes. So the information given when hovering over items is called “Item Lore” and it accepts coloured text.

To change the item lore in sponge you can use the following code.

List<Text> lore;
ItemStack stack;
stack.offer(Keys.ITEM_LORE, lore);

Lore is a list due to minecraft not supporting the traditional line break (\n) therefore each entry in the list starts on a new line.

By changing the items lore it should replace all text below the name including “Minecraft” however the frame that holds the text I believe by default is connected to the resource pack and therefore requires mod support to change it from the server side

The code:

inventory.query(QueryOperationTypes.INVENTORY_PROPERTY.of(SlotPos.of(2, 5)))
                .set(ItemStack.builder()
                        .itemType(ItemTypes.STAINED_GLASS_PANE)
                        .add(Keys.DYE_COLOR, DyeColors.LIME)
                        .add(Keys.DISPLAY_NAME, textCreator.fromLegacy("&6Купить"))
                        .add(Keys.ITEM_LORE, Arrays.asList(
                                textCreator.fromLegacy("&3Цена&8: &2" + config.CASES_LIST.get(index).getPrice()),
                                textCreator.fromLegacy("&3Баланс&8: &2" + voteController.getPlayerVotePoints(player))))
                        .quantity(1)
                        .build());

The result:

image

something tells me that here the inscription is also on the side of the modification :upside_down_face:

1 Like

The “Minecraft” part is added by a mod - probably some derivative of “Not Enough Items” (like Just Enough Items, Almost Enough Items, Roughly Enough Items, or something along those lines). I think the only way to get rid of it is by removing that mod, or changing its configuration if the mod supports that.