GalSergey

Elytra durability switch

Jun 14th, 2022
1,884
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.75 KB | None | 0 0
  1. [
  2.   {
  3.     "function": "minecraft:copy_nbt",
  4.     "source": "this",
  5.     "ops": [
  6.       {
  7.         "source": "Inventory[{Slot:102b}].tag.Damage",
  8.         "target": "SaveDamage",
  9.         "op": "replace"
  10.       }
  11.     ],
  12.     "conditions": [
  13.       {
  14.         "condition": "minecraft:inverted",
  15.         "term": {
  16.           "condition": "minecraft:entity_properties",
  17.           "entity": "this",
  18.           "predicate": {
  19.             "equipment": {
  20.               "chest": {
  21.                 "items": [
  22.                   "minecraft:elytra"
  23.                 ],
  24.                 "nbt": "{Damage:432}"
  25.               }
  26.             }
  27.           }
  28.         }
  29.       }
  30.     ]
  31.   },
  32.   {
  33.     "function": "minecraft:set_damage",
  34.     "damage": 0,
  35.     "conditions": [
  36.       {
  37.         "condition": "minecraft:inverted",
  38.         "term": {
  39.           "condition": "minecraft:entity_properties",
  40.           "entity": "this",
  41.           "predicate": {
  42.             "equipment": {
  43.               "chest": {
  44.                 "items": [
  45.                   "minecraft:elytra"
  46.                 ],
  47.                 "nbt": "{Damage:432}"
  48.               }
  49.             }
  50.           }
  51.         }
  52.       }
  53.     ]
  54.   },
  55.   {
  56.     "function": "minecraft:copy_nbt",
  57.     "source": "this",
  58.     "ops": [
  59.       {
  60.         "source": "Inventory[{Slot:102b}].tag.SaveDamage",
  61.         "target": "Damage",
  62.         "op": "replace"
  63.       }
  64.     ],
  65.     "conditions": [
  66.       {
  67.         "condition": "minecraft:entity_properties",
  68.         "entity": "this",
  69.         "predicate": {
  70.           "equipment": {
  71.             "chest": {
  72.               "items": [
  73.                 "minecraft:elytra"
  74.               ],
  75.               "nbt": "{Damage:432}"
  76.             }
  77.           }
  78.         }
  79.       }
  80.     ]
  81.   }
  82. ]
  83.  
Advertisement
Add Comment
Please, Sign In to add comment