Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some item with extra NBT Tags (CustomDataModel) won't be registered as a valid in when crafting/machine use #3446

Open
4 tasks done
variananora opened this issue Jan 27, 2022 · 3 comments
Labels
🐞 Bug Report A bug that needs to be fixed. 🧨 Confirmed Bug This bug has been confirmed by our team.

Comments

@variananora
Copy link
Member

❗ 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

  1. Open item-models.yml
  2. Add a value under REINFORCED_SPAWNER. (I'll use 1)
  3. Start the server
  4. Obtain yourself a spawner (In the video I'll be using vanilla generated spawner, spawned spawner, and soul jars)
  5. Repair the spawner
  6. Try to craft it to their ElectricSpawner type
  7. 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

ElectricSpawner

@variananora variananora added 🐞 Bug Report A bug that needs to be fixed. 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. labels Jan 27, 2022
@JustAHuman-xD
Copy link
Contributor

Did this affect all items or just specific types? e.g. player heads

@variananora
Copy link
Member Author

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.

@variananora variananora changed the title Some item with extra NBT Tags (CustomDataModel) won't be registered as a valid in when crafting Some item with extra NBT Tags (CustomDataModel) won't be registered as a valid in when crafting/machine use Mar 2, 2023
@variananora variananora added 🧨 Confirmed Bug This bug has been confirmed by our team. and removed 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. labels Jul 4, 2023
@iTwins
Copy link
Contributor

iTwins commented Jul 26, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Report A bug that needs to be fixed. 🧨 Confirmed Bug This bug has been confirmed by our team.
Projects
None yet
Development

No branches or pull requests

3 participants