DutchJelly / CraftEnhance

A Minecraft Plugin that allows server owners to create custom recipes in-game
Apache License 2.0
13 stars 10 forks source link

Issue with some items as ingredients (itemsadder) #17

Closed ReasonGuy closed 2 years ago

ReasonGuy commented 3 years ago

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

ReasonGuy commented 3 years ago

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

DutchJelly commented 3 years ago

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

I want this to be fixed in the next update.

DutchJelly commented 3 years ago

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

DutchJelly commented 2 years ago

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.