Slimefun4 icon indicating copy to clipboard operation
Slimefun4 copied to clipboard

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

Open variananora opened this issue 4 years ago โ€ข 3 comments

โ— Checklist

  • [X] I am using the official english version of Slimefun and did not modify the jar.
  • [X] I am using an up to date "DEV" (not "RC") version of Slimefun.
  • [X] I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • [X] 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 avatar Jan 27 '22 05:01 variananora

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

JustAHuman-xD avatar Mar 02 '23 13:03 JustAHuman-xD

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 avatar Mar 02 '23 13:03 variananora

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.

iTwins avatar Jul 26 '23 17:07 iTwins