经过测试
非非表示且可能不行
代码及运行结果如下
- {
- "condition":"minecraft:inverted",
- "term":
- {
- "condition": "minecraft:alternative",
- "terms": [
- {
- "condition": "minecraft:location_check",
- "predicate": {
- "block": {
- "block": "minecraft:dirt"
- }
- },
- "offsetY": -1
- },
- {
- "condition": "minecraft:location_check",
- "predicate": {
- "block": {
- "block": "minecraft:sugar_cane"
- }
- },
- "offsetY": 0
- }
-
- ]
- }
- }
复制代码
测试1.execute as @e[predicate!=xxx:xxx] at @s run say 1
结果:在泥土上和在甘蔗上都可以say 1
测试2.execute as @e at @s unless predicate xxx:xxx run say 1
结果:相同 |