GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.71k stars 674 forks source link

CustomCrafting custom craft with ANVIL and NBT dont work #3455

Closed Euphillya closed 1 year ago

Euphillya commented 1 year ago

Describe the bug

Hello,

We are using the CustomCrafting Plugin for custom crafts but we are currently having a problem with it, we are trying to merge items with the plugin and only for Bedrocks players, it doesn't seem to work.

To Reproduce

  1. Use Velocity Proxy.
  2. Use Floodgate.
  3. Install plugin CustomCrafting and WolfyUtilities on your server.
  4. Upload my files for test craft.
  5. Try with Anvil

Expected behaviour

That the recipe works like in Java.

Screenshots / Videos

No response

Server Version and Plugins

[19:30:53 Server thread/INFO][] - Checking version, please wait...
[19:30:54 Thread-29586/INFO][] - This server is running MultiPaper version MultiPaper-1.19.2-35 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 7d8ed82)
You are 2 version(s) behind
Download the new version at: https://multipaper.io/download.html

Geyser Dump

https://dump.geysermc.org/Mf0A9obP01Voyk9w4ios7AVS45YPFRWy

Geyser Version

This server is running Geyser version 2.1.0-SNAPSHOT (git-master-6876a90) (Java: 1.19.3, Bedrock: 1.19.20 - 1.19.50)

Minecraft: Bedrock Edition Device/Version

1.19.50, Windows.

Additional Context

File tested :

{
  "@type" : "customcrafting:anvil",
  "group" : "",
  "hidden" : false,
  "vanillaBook" : true,
  "priority" : "LOWEST",
  "checkNBT" : true,
  "conditions" : {
    "values" : [ ]
  },
  "checkAllNBT" : true,
  "blockRepair" : false,
  "blockRename" : false,
  "blockEnchant" : false,
  "repairTask" : {
    "key" : "customcrafting:result",
    "result" : {
      "items" : [ {
        "custom_amount" : 1,
        "item" : {
          "==" : "org.bukkit.inventory.ItemStack",
          "v" : 3120,
          "type" : "DIAMOND_AXE",
          "meta" : {
            "==" : "ItemMeta",
            "meta-type" : "UNSPECIFIC",
            "display-name" : "[{\"text\":\"Hache Céleste\",\"italic\":false,\"color\":\"gold\"},{\"text\":\" - \"},{\"text\":\"Tier 2 ★★☆\",\"color\":\"yellow\"}]",
            "enchants" : {
              "DIG_SPEED" : 15,
              "LOOT_BONUS_BLOCKS" : 4
            },
            "Unbreakable" : true
          }
        }
      } ],
      "tags" : [ ],
      "extensions" : [ ]
    }
  },
  "repairCost" : 100,
  "applyRepairCost" : false,
  "repairCostMode" : "NONE",
  "base" : {
    "items" : [ {
      "custom_amount" : 1,
      "item" : {
        "==" : "org.bukkit.inventory.ItemStack",
        "v" : 3120,
        "type" : "DIAMOND_AXE",
        "meta" : {
          "==" : "ItemMeta",
          "meta-type" : "UNSPECIFIC",
          "display-name" : "[{\"text\":\"Hache Céleste\",\"italic\":false,\"color\":\"gold\"},{\"text\":\" - \"},{\"text\":\"Tier 1 ★☆☆\",\"color\":\"yellow\"}]",
          "enchants" : {
            "DIG_SPEED" : 10,
            "LOOT_BONUS_BLOCKS" : 3
          },
          "Unbreakable" : true
        }
      }
    } ],
    "tags" : [ ],
    "replaceWithRemains" : true,
    "allowEmpty" : false
  },
  "addition" : {
    "items" : [ {
      "custom_amount" : 1,
      "item" : {
        "==" : "org.bukkit.inventory.ItemStack",
        "v" : 3120,
        "type" : "DIAMOND_AXE",
        "meta" : {
          "==" : "ItemMeta",
          "meta-type" : "UNSPECIFIC",
          "display-name" : "[{\"text\":\"Hache Céleste\",\"italic\":false,\"color\":\"gold\"},{\"text\":\" - \"},{\"text\":\"Tier 1 ★☆☆\",\"color\":\"yellow\"}]",
          "enchants" : {
            "DIG_SPEED" : 10,
            "LOOT_BONUS_BLOCKS" : 3
          },
          "Unbreakable" : true
        }
      }
    } ],
    "tags" : [ ],
    "replaceWithRemains" : true,
    "allowEmpty" : false
  }
}

For give item for test : /minecraft:give "{player}" diamond_axe{display:{Name:'[{"text":"Hache Céleste","italic":false,"color":"gold"},{"text":" - "},{"text":"Tier 1 ★☆☆","color":"yellow"}]'},Unbreakable:1,Enchantments:[{id:efficiency,lvl:10},{id:fortune,lvl:3}]} 1

Camotoy commented 1 year ago

This is unfortunately a Bedrock limitation. Anvils cannot have custom items shown in an output.

onebeastchris commented 1 year ago

https://github.com/GeyserMC/Geyser/issues/3121 closing in favor of the linked issue - this is a duplicate. Thanks anyways!