misode.github.io icon indicating copy to clipboard operation
misode.github.io copied to clipboard

[Bug - Enchantments] "crossbow_charge_time" doesn't show the correct fields

Open MinecraftNight4 opened this issue 1 year ago • 0 comments

The “minecraft:crossbow_charge_time” effect accepts more than one value in the editor and stores it in the key "effect", resulting in a wrong format if the world is reloaded: image

{
  "effects": {
    "minecraft:crossbow_charge_time": [
      {
        "effect": {}
      }
    ],
    "minecraft:crossbow_charging_sounds": [
      {
        "start": "minecraft:item.crossbow.quick_charge_1",
        "end": "minecraft:item.crossbow.loading_end"
      }
    ]
  }
}

By default, the enchantment quick charge stores the values directly in the key “minecraft:crossbow_charge_time” and doesn't use an array. In this screenshot, it's possible to see that the template of quick charge writes the correct format, but the editor can't handle the values: image

{
  "description": {
    "translate": "enchantment.minecraft.quick_charge"
  },
  "supported_items": "#minecraft:enchantable/crossbow",
  "weight": 5,
  "max_level": 3,
  "min_cost": {
    "base": 12,
    "per_level_above_first": 20
  },
  "max_cost": {
    "base": 50,
    "per_level_above_first": 0
  },
  "anvil_cost": 2,
  "slots": [
    "mainhand",
    "offhand"
  ],
  "effects": {
    "minecraft:crossbow_charge_time": {
      "type": "minecraft:add",
      "value": {
        "type": "minecraft:linear",
        "base": -0.25,
        "per_level_above_first": -0.25
      }
    },
    "minecraft:crossbow_charging_sounds": [
      {
        "start": "minecraft:item.crossbow.quick_charge_1",
        "end": "minecraft:item.crossbow.loading_end"
      },
      {
        "start": "minecraft:item.crossbow.quick_charge_2",
        "end": "minecraft:item.crossbow.loading_end"
      },
      {
        "start": "minecraft:item.crossbow.quick_charge_3",
        "end": "minecraft:item.crossbow.loading_end"
      }
    ]
  }
}

MinecraftNight4 avatar Oct 17 '24 18:10 MinecraftNight4