157
157
"properties" : {
158
158
"trigger" : {
159
159
"type" : " string"
160
+ },
161
+ "conditions" : {
162
+ "player" : {
163
+ "$ref" : " #/definitions/entity_conditions"
164
+ }
160
165
}
161
166
},
162
167
"required" : [
163
168
" trigger"
164
169
],
165
170
"type" : " object" ,
166
171
"oneOf" : [
172
+ {
173
+ "additionalProperties" : false ,
174
+ "properties" : {
175
+ "trigger" : {
176
+ "type" : " string" ,
177
+ "enum" : [
178
+ " minecraft:bee_nest_destroyed"
179
+ ],
180
+ "title" : " Destroyed bee nest" ,
181
+ "description" : " This criteria will be checked whenever the player changes dimension (such as by going through a portal)"
182
+ },
183
+ "conditions" : {
184
+ "type" : " object" ,
185
+ "additionalProperties" : false ,
186
+ "title" : " Required conditions" ,
187
+ "description" : " All of these conditions must pass for the criteria to be activated" ,
188
+ "properties" : {
189
+ "player" : {
190
+ "$ref" : " #/definitions/entity_conditions"
191
+ },
192
+ "block" : {
193
+ "type" : " string"
194
+ },
195
+ "item" : {
196
+ "$ref" : " ./shared/predicate.json#/definitions/item"
197
+ },
198
+ "num_bees_inside" : {
199
+ "type" : " number"
200
+ }
201
+ }
202
+ }
203
+ }
204
+ },
167
205
{
168
206
"additionalProperties" : false ,
169
207
"properties" : {
181
219
"title" : " Required conditions" ,
182
220
"description" : " All of these conditions must pass for the criteria to be activated" ,
183
221
"properties" : {
222
+ "player" : {
223
+ "$ref" : " #/definitions/entity_conditions"
224
+ },
184
225
"parent" : {
185
- "$ref" : " ./shared/predicate.json#/definitions/entity" ,
186
226
"title" : " Conditions to test against either of the parents" ,
187
- "description" : " Using both parent and partner is only useful when using horses/donkeys"
227
+ "description" : " Using both parent and partner is only useful when using horses/donkeys" ,
228
+ "oneOf" : [
229
+ {
230
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
231
+ },
232
+ {
233
+ "$ref" : " #/definitions/entity_conditions"
234
+ }
235
+ ]
188
236
},
189
237
"partner" : {
190
- "$ref" : " ./shared/predicate.json#/definitions/entity" ,
191
- "title" : " Conditions to test against either of the parents"
238
+ "title" : " Conditions to test against either of the parents" ,
239
+ "oneOf" : [
240
+ {
241
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
242
+ },
243
+ {
244
+ "$ref" : " #/definitions/entity_conditions"
245
+ }
246
+ ]
192
247
},
193
248
"child" : {
194
- "$ref" : " ./shared/predicate.json#/definitions/entity" ,
195
- "title" : " Conditions to test against the child entity"
249
+ "title" : " Conditions to test against the child entity" ,
250
+ "oneOf" : [
251
+ {
252
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
253
+ },
254
+ {
255
+ "$ref" : " #/definitions/entity_conditions"
256
+ }
257
+ ]
196
258
}
197
259
}
198
260
}
215
277
"description" : " All of these conditions must pass for the criteria to be activated" ,
216
278
"type" : " object" ,
217
279
"properties" : {
280
+ "player" : {
281
+ "$ref" : " #/definitions/entity_conditions"
282
+ },
218
283
"potion" : {
219
284
"type" : " string" ,
220
285
"parser" : " Identity" ,
244
309
"title" : " Required conditions" ,
245
310
"description" : " All of these conditions must pass for the criteria to be activated" ,
246
311
"properties" : {
312
+ "player" : {
313
+ "$ref" : " #/definitions/entity_conditions"
314
+ },
247
315
"to" : {
248
316
"type" : " string" ,
249
317
"parser" : " Identity" ,
264
332
}
265
333
}
266
334
},
335
+ {
336
+ "additionalProperties" : false ,
337
+ "properties" : {
338
+ "trigger" : {
339
+ "type" : " string" ,
340
+ "enum" : [
341
+ " minecraft:channeled_lightning"
342
+ ]
343
+ },
344
+ "conditions" : {
345
+ "type" : " object" ,
346
+ "additionalProperties" : false ,
347
+ "title" : " Required conditions" ,
348
+ "description" : " All of these conditions must pass for the criteria to be activated" ,
349
+ "properties" : {
350
+ "player" : {
351
+ "$ref" : " #/definitions/entity_conditions"
352
+ },
353
+ "victims" : {
354
+ "type" : " array" ,
355
+ "items" : {
356
+ "oneOf" : [
357
+ {
358
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
359
+ },
360
+ {
361
+ "$ref" : " #/definitions/entity_conditions"
362
+ }
363
+ ]
364
+ }
365
+ }
366
+ }
367
+ }
368
+ }
369
+ },
267
370
{
268
371
"additionalProperties" : false ,
269
372
"properties" : {
281
384
"title" : " Required conditions" ,
282
385
"description" : " All of these conditions must pass for the criteria to be activated" ,
283
386
"properties" : {
387
+ "player" : {
388
+ "$ref" : " #/definitions/entity_conditions"
389
+ },
284
390
"level" : {
285
391
"$ref" : " ./shared/range.json" ,
286
392
"title" : " The beacon level"
307
413
"description" : " All of these conditions must pass for the criteria to be activated" ,
308
414
"type" : " object" ,
309
415
"properties" : {
416
+ "player" : {
417
+ "$ref" : " #/definitions/entity_conditions"
418
+ },
310
419
"item" : {
311
420
"$ref" : " ./shared/predicate.json#/definitions/item" ,
312
421
"title" : " Item" ,
333
442
"description" : " All of these conditions must pass for the criteria to be activated" ,
334
443
"type" : " object" ,
335
444
"properties" : {
445
+ "player" : {
446
+ "$ref" : " #/definitions/entity_conditions"
447
+ },
336
448
"zombie" : {
337
- "$ref" : " ./shared/predicate.json#/definitions/entity" ,
338
- "title" : " Information about the zombie villager"
449
+ "title" : " Information about the zombie villager" ,
450
+ "oneOf" : [
451
+ {
452
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
453
+ },
454
+ {
455
+ "$ref" : " #/definitions/entity_conditions"
456
+ }
457
+ ]
339
458
},
340
459
"villager" : {
341
- "$ref" : " ./shared/predicate.json#/definitions/entity" ,
342
- "title" : " Information about villager cured into"
460
+ "title" : " Information about villager cured into" ,
461
+ "oneOf" : [
462
+ {
463
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
464
+ },
465
+ {
466
+ "$ref" : " #/definitions/entity_conditions"
467
+ }
468
+ ]
343
469
}
344
470
}
345
471
}
362
488
"description" : " All of these conditions must pass for the criteria to be activated" ,
363
489
"type" : " object" ,
364
490
"properties" : {
491
+ "player" : {
492
+ "$ref" : " #/definitions/entity_conditions"
493
+ },
365
494
"effects" : {
366
495
"$ref" : " ./shared/predicate.json#/definitions/effect" ,
367
496
"title" : " The potion effects of the player"
387
516
"description" : " All of these conditions must pass for the criteria to be activated" ,
388
517
"type" : " object" ,
389
518
"properties" : {
519
+ "player" : {
520
+ "$ref" : " #/definitions/entity_conditions"
521
+ },
390
522
"item" : {
391
523
"$ref" : " ./shared/predicate.json#/definitions/item" ,
392
524
"title" : " The item enchanted"
411
543
"description" : " This criteria will be checked whenever the player moves"
412
544
},
413
545
"conditions" : {
414
- "additionalProperties" : false ,
415
546
"title" : " The block to check" ,
416
547
"description" : " The block which was entered to check the trigger" ,
417
- "$ref" : " ./shared/predicate.json#/definitions/block"
548
+ "allOf" : [
549
+ {
550
+ "$ref" : " ./shared/predicate.json#/definitions/block"
551
+ }
552
+ ],
553
+ "properties" : {
554
+ "player" : {
555
+ "$ref" : " #/definitions/entity_conditions"
556
+ }
557
+ }
418
558
}
419
559
}
420
560
},
435
575
"description" : " All of these conditions must pass for the criteria to be activated" ,
436
576
"type" : " object" ,
437
577
"properties" : {
578
+ "player" : {
579
+ "$ref" : " #/definitions/entity_conditions"
580
+ },
438
581
"damage" : {
439
582
"$ref" : " ./shared/predicate.json#/definitions/damage" ,
440
583
"title" : " The damage taken"
460
603
"description" : " All of these conditions must pass for the criteria to be activated" ,
461
604
"type" : " object" ,
462
605
"properties" : {
606
+ "player" : {
607
+ "$ref" : " #/definitions/entity_conditions"
608
+ },
463
609
"damage" : {
464
610
"$ref" : " ./shared/predicate.json#/definitions/damage" ,
465
611
"title" : " The damage taken"
466
612
},
467
613
"entity" : {
468
- "$ref" : " ./shared/predicate.json#/definitions/entity"
614
+ "oneOf" : [
615
+ {
616
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
617
+ },
618
+ {
619
+ "$ref" : " #/definitions/entity_conditions"
620
+ }
621
+ ]
469
622
}
470
623
}
471
624
}
484
637
"description" : " This criteria will be checked whenever the player kills or is killed by an entity"
485
638
},
486
639
"conditions" : {
487
- "additionalProperties" : false ,
488
640
"title" : " The death object" ,
489
641
"description" : " The conditions object is a direct reference to a death object" ,
490
- "$ref" : " ./shared/predicate.json#/definitions/death"
642
+ "allOf" : [
643
+ {
644
+ "$ref" : " ./shared/predicate.json#/definitions/death"
645
+ }
646
+ ],
647
+ "properties" : {
648
+ "player" : {
649
+ "$ref" : " #/definitions/entity_conditions"
650
+ }
651
+ }
491
652
}
492
653
}
493
654
},
497
658
"trigger" : {
498
659
"type" : " string" ,
499
660
"enum" : [
500
- " minecraft:impossible" ,
501
- " minecraft:tick"
661
+ " minecraft:filled_bucket"
662
+ ]
663
+ },
664
+ "conditions" : {
665
+ "type" : " object" ,
666
+ "additionalProperties" : false ,
667
+ "title" : " Required conditions" ,
668
+ "description" : " All of these conditions must pass for the criteria to be activated" ,
669
+ "properties" : {
670
+ "player" : {
671
+ "$ref" : " #/definitions/entity_conditions"
672
+ },
673
+ "item" : {
674
+ "$ref" : " ./shared/predicate.json#/definitions/item"
675
+ }
676
+ }
677
+ }
678
+ }
679
+ },
680
+ {
681
+ "additionalProperties" : false ,
682
+ "properties" : {
683
+ "trigger" : {
684
+ "type" : " string" ,
685
+ "enum" : [
686
+ " minecraft:fishing_rod_hooked"
687
+ ]
688
+ },
689
+ "conditions" : {
690
+ "type" : " object" ,
691
+ "additionalProperties" : false ,
692
+ "title" : " Required conditions" ,
693
+ "description" : " All of these conditions must pass for the criteria to be activated" ,
694
+ "properties" : {
695
+ "player" : {
696
+ "$ref" : " #/definitions/entity_conditions"
697
+ },
698
+ "entity" : {
699
+ "oneOf" : [
700
+ {
701
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
702
+ },
703
+ {
704
+ "$ref" : " #/definitions/entity_conditions"
705
+ }
706
+ ]
707
+ },
708
+ "item" : {
709
+ "$ref" : " ./shared/predicate.json#/definitions/item"
710
+ },
711
+ "rod" : {
712
+ "$ref" : " ./shared/predicate.json#/definitions/item"
713
+ }
714
+ }
715
+ }
716
+ }
717
+ },
718
+ {
719
+ "additionalProperties" : false ,
720
+ "properties" : {
721
+ "trigger" : {
722
+ "type" : " string" ,
723
+ "enum" : [
724
+ " minecraft:hero_of_the_village"
725
+ ]
726
+ },
727
+ "conditions" : {
728
+ "type" : " object" ,
729
+ "title" : " Required conditions" ,
730
+ "description" : " All of these conditions must pass for the criteria to be activated" ,
731
+ "allOf" : [
732
+ {
733
+ "$ref" : " ./shared/predicate.json#/definitions/location"
734
+ }
502
735
],
503
- "title" : " Conditionless criteria" ,
504
- "description" : " The impossible trigger can be only granted with a command, the tick trigger is given once each tick"
736
+ "properties" : {
737
+ "player" : {
738
+ "$ref" : " #/definitions/entity_conditions"
739
+ }
740
+ }
741
+ }
742
+ }
743
+ },
744
+ {
745
+ "additionalProperties" : false ,
746
+ "properties" : {
747
+ "trigger" : {
748
+ "type" : " string" ,
749
+ "enum" : [
750
+ " minecraft:impossible"
751
+ ],
752
+ "title" : " Impossible trigger" ,
753
+ "description" : " The impossible trigger can be only granted with a command"
505
754
}
506
755
}
507
756
},
522
771
"description" : " All of these conditions must pass for the criteria to be activated" ,
523
772
"type" : " object" ,
524
773
"properties" : {
774
+ "player" : {
775
+ "$ref" : " #/definitions/entity_conditions"
776
+ },
525
777
"slots" : {
526
778
"additionalProperties" : false ,
527
779
"properties" : {
569
821
"description" : " All of these conditions must pass for the criteria to be activated" ,
570
822
"type" : " object" ,
571
823
"properties" : {
824
+ "player" : {
825
+ "$ref" : " #/definitions/entity_conditions"
826
+ },
572
827
"item" : {
573
828
"$ref" : " ./shared/predicate.json#/definitions/item" ,
574
829
"title" : " The item" ,
604
859
"description" : " All of these conditions must pass for the criteria to be activated" ,
605
860
"type" : " object" ,
606
861
"properties" : {
862
+ "player" : {
863
+ "$ref" : " #/definitions/entity_conditions"
864
+ },
607
865
"duration" : {
608
866
"$ref" : " ./shared/range.json" ,
609
867
"title" : " Time applied" ,
630
888
"description" : " This criteria will be checked whenever the player sleeps (for \" slept_in_bed\" ), or once every 20 ticks (\" location\" )"
631
889
},
632
890
"conditions" : {
633
- "additionalProperties" : false ,
634
891
"title" : " Location of the player" ,
635
892
"description" : " The location of the player at the time of checking (for \" slept_in_bed\" this is just after they went to sleep)" ,
636
- "$ref" : " ./shared/predicate.json#/definitions/location"
893
+ "allOf" : [
894
+ {
895
+ "$ref" : " ./shared/predicate.json#/definitions/location"
896
+ }
897
+ ],
898
+ "properties" : {
899
+ "player" : {
900
+ "$ref" : " #/definitions/entity_conditions"
901
+ }
902
+ }
637
903
}
638
904
}
639
905
},
653
919
"description" : " All of these conditions must pass for the criteria to be activated" ,
654
920
"type" : " object" ,
655
921
"properties" : {
922
+ "player" : {
923
+ "$ref" : " #/definitions/entity_conditions"
924
+ },
656
925
"entered" : {
657
926
"$ref" : " ./shared/predicate.json#/definitions/location" ,
658
927
"title" : " Entering the nether" ,
684
953
"description" : " This criteria will be checked whenever the player places a block"
685
954
},
686
955
"conditions" : {
687
- "additionalProperties" : false ,
688
956
"title" : " Required conditions" ,
689
957
"description" : " The placed block" ,
690
958
"allOf" : [
703
971
"title" : " Location of block" ,
704
972
"description" : " The location at which the block is placed"
705
973
},
706
- "block" : {},
707
- "state" : {}
974
+ "player" : {
975
+ "$ref" : " #/definitions/entity_conditions"
976
+ }
708
977
}
709
978
}
710
979
}
726
995
"description" : " All of these conditions must pass for the criteria to be activated" ,
727
996
"type" : " object" ,
728
997
"properties" : {
998
+ "player" : {
999
+ "$ref" : " #/definitions/entity_conditions"
1000
+ },
729
1001
"recipe" : {
730
1002
"type" : " string" ,
731
1003
"title" : " The name of the recipe" ,
753
1025
"description" : " All of these conditions must pass for the criteria to be activated" ,
754
1026
"type" : " object" ,
755
1027
"properties" : {
1028
+ "player" : {
1029
+ "$ref" : " #/definitions/entity_conditions"
1030
+ },
756
1031
"entity" : {
757
- "$ref" : " ./shared/predicate.json#/definitions/entity" ,
758
- "title" : " The entity summmoned"
1032
+ "title" : " The entity summmoned" ,
1033
+ "oneOf" : [
1034
+ {
1035
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
1036
+ },
1037
+ {
1038
+ "$ref" : " #/definitions/entity_conditions"
1039
+ }
1040
+ ]
759
1041
}
760
1042
}
761
1043
}
762
1044
}
763
1045
},
1046
+ {
1047
+ "additionalProperties" : false ,
1048
+ "properties" : {
1049
+ "trigger" : {
1050
+ "type" : " string" ,
1051
+ "enum" : [
1052
+ " minecraft:target_hit"
1053
+ ]
1054
+ },
1055
+ "conditions" : {
1056
+ "type" : " object" ,
1057
+ "additionalProperties" : false ,
1058
+ "title" : " Required conditions" ,
1059
+ "description" : " All of these conditions must pass for the criteria to be activated" ,
1060
+ "properties" : {
1061
+ "player" : {
1062
+ "$ref" : " #/definitions/entity_conditions"
1063
+ },
1064
+ "signal_strength" : {
1065
+ "type" : " integer"
1066
+ },
1067
+ "projectile" : {
1068
+ "oneOf" : [
1069
+ {
1070
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
1071
+ },
1072
+ {
1073
+ "$ref" : " #/definitions/entity_conditions"
1074
+ }
1075
+ ]
1076
+ },
1077
+ "shooter" : {
1078
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
1079
+ }
1080
+ }
1081
+ }
1082
+ }
1083
+ },
1084
+ {
1085
+ "additionalProperties" : false ,
1086
+ "properties" : {
1087
+ "trigger" : {
1088
+ "type" : " string" ,
1089
+ "enum" : [
1090
+ " minecraft:tick"
1091
+ ],
1092
+ "title" : " Conditionless criteria" ,
1093
+ "description" : " The tick trigger is given once each tick"
1094
+ },
1095
+ "conditions" : {
1096
+ "additionalProperties" : false ,
1097
+ "player" : {
1098
+ "$ref" : " #/definitions/entity_conditions"
1099
+ }
1100
+ }
1101
+ }
1102
+ },
764
1103
{
765
1104
"additionalProperties" : false ,
766
1105
"properties" : {
778
1117
"description" : " All of these conditions must pass for the criteria to be activated" ,
779
1118
"type" : " object" ,
780
1119
"properties" : {
1120
+ "player" : {
1121
+ "$ref" : " #/definitions/entity_conditions"
1122
+ },
781
1123
"distance" : {
782
1124
"$ref" : " ./shared/range.json" ,
783
1125
"title" : " Distance from player to stronghold" ,
804
1146
"description" : " All of these conditions must pass for the criteria to be activated" ,
805
1147
"type" : " object" ,
806
1148
"properties" : {
1149
+ "player" : {
1150
+ "$ref" : " #/definitions/entity_conditions"
1151
+ },
807
1152
"villager" : {
808
- "$ref" : " ./shared/predicate.json#/definitions/entity" ,
809
- "title" : " The villager traded with"
1153
+ "title" : " The villager traded with" ,
1154
+ "oneOf" : [
1155
+ {
1156
+ "$ref" : " ./shared/predicate.json#/definitions/entity"
1157
+ },
1158
+ {
1159
+ "$ref" : " #/definitions/entity_conditions"
1160
+ }
1161
+ ]
810
1162
},
811
1163
"item" : {
812
1164
"$ref" : " ./shared/predicate.json#/definitions/item" ,
817
1169
}
818
1170
}
819
1171
]
1172
+ },
1173
+ "entity_conditions" : {
1174
+ "type" : " array" ,
1175
+ "title" : " Conditions" ,
1176
+ "description" : " The conditions that the entity must pass" ,
1177
+ "items" : {
1178
+ "$ref" : " ./predicate.json"
1179
+ }
820
1180
}
821
1181
}
822
- }
1182
+ }
0 commit comments