Slimefun

Slimefun

3M Downloads

Ancient Pedestal is changing renamed items from an anvil making some of the items usable in Slimefun.

variananora opened this issue · 10 comments

commented

❗ Checklist

  • I am using the official english version of Slimefun and did not modify the jar.
  • I am using an up to date "DEV" (not "RC") version of Slimefun.
  • I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • I searched for similar open issues and could not find an existing bug report on this.

📍 Description

Ancient Pedestal is clearing the 'italic' of renamed items on an anvil and making it usable on Slimefun recipe system. Items that works are that has no color on it.
Example:

  • Salt
  • Wheat Flour
  • Cheese
  • Tin Can
  • Butter
  • Bucket of Fuel
  • Bucket of Oil

📑 Reproduction Steps

  1. Obtain a vanilla version of the item which is sugar, in this steps I'll be using salt as an example.
  2. Obtain an anvil and the exp.
  3. Rename your items to 'Salt' (Case sensitive!).
  4. Put it on Ancient Pedestal and take it back.
  5. Try to use it on the crafting system.

💡 Expected Behavior

Ancient Pedestal should not reset the name.

📷 Screenshots / Videos

https://youtu.be/EZZ_Zc8G9xA

📜 Server Log

No response

📂 /error-reports/ folder

No response

💻 Server Software

Paper

🎮 Minecraft Version

1.17.x

⭐ Slimefun version

image

🧭 Other plugins

No response

commented

The solution would probably be to remove this in AncientPedestal:

if (!customName.startsWith(String.valueOf(ChatColor.COLOR_CHAR))) {
    customName = ChatColor.WHITE + customName;
}

However, this could cause problems for Slimefun items which are not colored. (I don't know if there are any)

commented

We found this issue by litexpansion most items there arent renamed

commented

... litexpansion most items there arent renamed

But they have lore, right? That should prevent this issue.

commented

... litexpansion most items there arent renamed

But they have lore, right? That should prevent this issue.

Nope. Lot of LX things don't have a lore. We don't like lores

commented

I'm on a train and can't easily check the code but is the altar not using the ID system??? The items should have an ID and therefore not have this issue. Backwards compat is disabled so it should use solely the ID.

Obviously for things like Obsidian it's fine to compare only the material but for stuff like Salt? That should be an ID check

commented

Well, it doesn't store the id. The floating entity just stores the name of the item the user clicked the pedestal with. I will investigate a bit more to see if maybe we could store the id there as well.

commented

Well, it doesn't store the id. The floating entity just stores the name of the item the user clicked the pedestal with. I will investigate a bit more to see if maybe we could store the id there as well.

We should store the ID. It's an entity so we easily can with PDC

commented

The id actually is stored because the ItemStack in the spawned item entity doesn't change and it stores the id.
The problem actually might be in the recipe system.

to clarify:
when I put in an item with id, i get back an item with id
when I put in an item without id, i get back an item without id

commented

Wouldn't surprise me