[1.9-1.16] Custom Recipes and Crafting (CraftEnhance)

[1.9-1.16] Custom Recipes and Crafting (CraftEnhance)

44.3k Downloads

Issue with some items as ingredients (itemsadder)

ReasonGuy opened this issue · 4 comments

commented

so when using this plugin with itemsadder items it does a great job when they are the result.
However if i add one as an ingredient then it becomes uncraftable.

Here is some info that i hope might help

nbt rip from an itemsadder item

{
CustomModelData:11,
display:{Lore:['{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"gray","text":"Durability: 1561 / 1561"}],"text":""}'],
Name:'{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"white","text":"Fire Sword"}],"text":""}'},
Enchantments:[{lvl:10s,id:"minecraft:fire_aspect"}],
itemsadder:{max_custom_durability:1561,namespace:"itemsadder",id:"firesword_sword",custom_durability:1561,fake_durability:1561.0d},
Damage:0,
AttributeModifiers:[{Amount:9.0d,Slot:"mainhand",AttributeName:"minecraft:generic.attack_damage",Operation:0,UUID:[I;-915371161,-850247575,-1534396768,1309753094],Name:"itemsadder"},{Amount:-2.4d,Slot:"mainhand",AttributeName:"minecraft:generic.attack_speed",Operation:0,UUID:[I;96823982,-1151906543,-1591265845,-1438235679],Name:"itemsadder"}]
}

also i've grabbed an example from the ceh plugin

§fFire Sword:
  ==: org.bukkit.inventory.ItemStack
  v: 2567
  type: DIAMOND_SWORD
  meta:
    ==: ItemMeta
    meta-type: UNSPECIFIC
    display-name: §fFire Sword
    lore:
    - '§7Durability: 1561 / 1561'
    custom-model-data: 11
    enchants:
      FIRE_ASPECT: 10
    attribute-modifiers:
      GENERIC_ATTACK_DAMAGE:
      - ==: org.bukkit.attribute.AttributeModifier
        amount: 9.0
        name: itemsadder
        slot: HAND
        uuid: c9708b67-cd52-4069-a48a-f6a04e113f06
        operation: 0
      GENERIC_ATTACK_SPEED:
      - ==: org.bukkit.attribute.AttributeModifier
        amount: -2.4
        name: itemsadder
        slot: HAND
        uuid: 05c56aae-bb57-4d11-a127-35cbaa4643e1
        operation: 0
    internal: H4sIAAAAAAAAAONiYOBi4MosSc0tTkxJSS1iZhDNTayITy4tLsnPjU8pLUpMyszJLKlkYGCT5GDgzEvMTS0uSExORdbDwcCUmcLAn5ZZlFpcnl+UEg8mmRkEsZrCBlSZmJ2KJOowI4UBAgBhExPKjgAAAA==

I hope something in here can help
I'll try to check in if you have any questions

commented

I've fixed this using a hacky workaround (set make-itemsadder-compatible: true in the config). Hopefully this'll be fixed in the itemsadder plugin.

commented

Oh and if you need itemsadder for testing i think i can get you a copy

commented

It appears that this issue is caused by items being stored differently.

  • A way to resolve this is to make a custom compare method that actually compares everything in a hard-coded way.
  • Another way is to use reflection to access minecraft's methods of storing items (they are similar in-game, so they should be similar in-memory too).

I want this to be fixed in the next update.

commented

The api-version recently has changed, which could have resolved this issue. This'll have to be tested.