Some item with extra NBT Tags (CustomDataModel) won't be registered as a valid in when crafting/machine use
variananora opened this issue · 3 comments
❗ 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
Some days ago someone reported that they can't craft an ElectricSpawner.
Boomer and I checked on this and found out that having extra NBT Tags in this case we will focused on CustomModelData
, made the item not accepted by the recipe.
I believe this is a Core Slimefun issue that is why I'm posting it here rather on ElectricSpawners Issue
The item that affects with issue that we tested:
- Reinforced Spawners
- All vanilla item (I think this deserve they own issue, let me know if you guys need me to open one, but I will just explain it briefly below)
Details
All vanilla items with extra NBT Tags will not be recognized by Slimefun as a valid item and can't craft the item.
Video: https://youtu.be/V2JIAVB3-JA
📑 Reproduction Steps
- Open
item-models.yml
- Add a value under
REINFORCED_SPAWNER
. (I'll use 1) - Start the server
- Obtain yourself a spawner (In the video I'll be using vanilla generated spawner, spawned spawner, and soul jars)
- Repair the spawner
- Try to craft it to their ElectricSpawner type
- You can't
💡 Expected Behavior
You should be able to craft it
📷 Screenshots / Videos
The video is a little bit long, but there is timestamps to guide you
https://youtu.be/f9v7rM4_GyI
Boomers vid:
Without item-models.yml
: https://youtu.be/gHjZm94PbsI
With item-models.yml
: https://youtu.be/aBkSnQqSuyA
📜 Server Log
No response
📂 /error-reports/
folder
No response
💻 Server Software
Paper
🎮 Minecraft Version
1.18.x
⭐ Slimefun version
This Server uses the following setup of Slimefun:
Paper git-Paper-167 (MC: 1.18.1)
Slimefun DEV - 999 (git e02eedd9)
Metrics-Module #28
Java 17
Installed Addons: (4)
CMILib v1.1.0.8
ElectricSpawners vDEV - 23 (git 6ec96773)
SoulJars vDEV - 23 (git b8358a1f)
CMI v9.1.0.6
🧭 Other plugins
Did this affect all items or just specific types? e.g. player heads
im not too sure on that one because i havent tried it.
This is probably because the isItemSimilar
check fails while checking recipes when there are additional nbt tags on an item.
An example of this (for the enhanced crafting table) is isCraftable
on line 91 of EnhancedCraftingTable.java
.
Other machines have similar methods for checking if a valid recipe is present and also experience this issue.
If an item has a nbt tag that it usually doesn't, machines (and multiblocks) will not recognize the item as valid.