-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain-code-python
More file actions
2168 lines (1832 loc) · 67.6 KB
/
main-code-python
File metadata and controls
2168 lines (1832 loc) · 67.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
def on_on_chat():
global block
block = "bbb:cobblestone_bricks"
player.on_chat("\\\\select.cobblestone_bricks", on_on_chat)
def on_on_chat2():
player.execute("/fill ~ ~100 ~ ~~~ wool 14 replace air")
player.on_chat("\\\\waypoint_red", on_on_chat2)
def on_on_chat3():
global block
block = "bbb:limestone_bricks"
fill_world_edit()
player.on_chat("\\\\limestone_bricks", on_on_chat3)
def on_on_chat4():
fill_replace("air")
player.on_chat("\\\\fill.replace_air", on_on_chat4)
def on_on_chat5():
global block
block = "iron_block"
fill_world_edit()
player.on_chat("\\\\iron_block", on_on_chat5)
def on_on_chat6():
global block
block = "copper_ore"
player.on_chat("\\\\select.copper_ore", on_on_chat6)
def on_on_chat7():
player.execute("setblock ~~~ fire")
player.on_chat("\\\\light", on_on_chat7)
def on_on_chat8():
player.execute("gamemode c")
player.on_chat("\\\\gmc", on_on_chat8)
def on_on_chat9():
global block
block = "hardened_clay"
fill_world_edit()
player.on_chat("\\\\hardened_clay", on_on_chat9)
def on_on_chat10():
player.execute("teleport @e[type=agent,name=" + ("" + player.name() + ".Agent") + "] ~ ~150 ~")
player.execute("/tellraw @s {\"rawtext\":[{\"text\":\"Teleported Agent Up, use c.agentcall to teleport your agent back to you\"}]}")
player.on_chat("\\\\agentup", on_on_chat10)
def on_on_chat11():
global block
block = "stone 4"
player.on_chat("\\\\select.polished_diorite", on_on_chat11)
def on_on_chat12(summon_amount):
for index in range(summon_amount):
player.execute("summon tnt")
player.on_chat("\\\\summon.tnt", on_on_chat12)
def on_on_chat13():
global block
block = "bbb:mossy_cobblestone_bricks"
fill_world_edit()
player.on_chat("\\\\mossy_cobblestone_bricks", on_on_chat13)
def on_on_chat14():
player.execute("/fill ~ ~100 ~ ~~~ wool 8 replace air")
player.on_chat("\\\\waypoint_light_grey", on_on_chat14)
def on_on_chat15(agent_inv_no, custom_data):
blocks.fill(blocks.block_with_data(blocks.block_by_id(agent.get_item_detail(agent_inv_no)),
custom_data),
world(_1, _2, _3),
world(_4, _5, _6),
FillOperation.REPLACE)
player.on_chat("\\\\fill.custom", on_on_chat15)
def on_on_chat16(blockid):
global block
block = "quartz_block " + str(blockid)
fill_world_edit()
player.on_chat("\\\\quartz", on_on_chat16)
def on_on_chat17(blockid2):
global block
block = "quartz_block " + str(blockid2)
player.on_chat("\\\\select.quartz_block", on_on_chat17)
def on_on_chat18():
player.execute("/fill ~ ~100 ~ ~~~ wool 10 replace air")
player.on_chat("\\\\waypoint_purple", on_on_chat18)
def on_on_chat19():
global block
block = "packed_ice"
fill_world_edit()
player.on_chat("\\\\packed_ice", on_on_chat19)
def on_on_chat20():
global block
block = "lapis_block"
player.on_chat("\\\\select.lapis_block", on_on_chat20)
def on_on_chat21():
global block
block = "sand"
player.on_chat("\\\\select.sand", on_on_chat21)
def on_on_chat22():
player.execute("/fill ~ ~100 ~ ~~~ wool 6 replace air")
player.on_chat("\\\\waypoint_pink", on_on_chat22)
def on_on_chat23():
global block
block = "redstone_ore"
player.on_chat("\\\\select.redstone_ore", on_on_chat23)
def on_on_chat24():
agent.teleport_to_player()
player.on_chat("\\\\agentcall", on_on_chat24)
def on_on_chat25():
global block
block = "fire"
player.on_chat("\\\\select.fire", on_on_chat25)
def on_on_chat26():
global block
block = "obsidian"
fill_world_edit()
player.on_chat("\\\\obsidian", on_on_chat26)
def cut(xyz: Position):
player.execute("clone " + str(_1) + " " + str(_2) + " " + str(_3) + " " + str(_4) + " " + str(_5) + " " + str(_6) + " " + str(xyz) + " masked move")
def on_on_chat27():
global block
block = "lapis_ore"
player.on_chat("\\\\select.lapis_ore", on_on_chat27)
def on_on_chat28():
global block
block = "bbb:mossy_cobblestone_bricks"
player.on_chat("\\\\select.mossy_cobblestone_bricks", on_on_chat28)
def on_on_chat29():
global block
block = "tuff"
player.on_chat("\\\\select.tuff", on_on_chat29)
def on_on_chat30():
player.execute("setblock ~ ~ ~ " + block)
player.on_chat("\\\\place", on_on_chat30)
def clone(xyz2: Position):
player.execute("clone " + str(_1) + " " + str(_2) + " " + str(_3) + " " + str(_4) + " " + str(_5) + " " + str(_6) + " " + str(xyz2))
def on_on_chat31():
global block
block = "hardened_clay"
player.on_chat("\\\\select.hardened_clay", on_on_chat31)
def on_item_interacted_wooden_axe():
fill()
player.on_item_interacted(WOODEN_AXE, on_item_interacted_wooden_axe)
def on_on_chat32():
global block
block = "bbb:jasper_bricks"
player.on_chat("\\\\select.jasper_bricks", on_on_chat32)
def on_on_chat33():
global block
block = "end_stone"
fill_world_edit()
player.on_chat("\\\\end_stone", on_on_chat33)
def on_on_chat34():
player.execute("/fill ~ ~100 ~ ~~~ wool 5 replace air")
player.on_chat("\\\\waypoint_lime", on_on_chat34)
def on_on_chat35():
global block
block = "stone 1"
fill_world_edit()
player.on_chat("\\\\granite", on_on_chat35)
def on_on_chat36(blockid3):
global block
block = "end_portal_frame " + str(blockid3)
fill_world_edit()
player.on_chat("\\\\end_portal_frame", on_on_chat36)
def on_on_chat37():
global block
block = "diamond_ore"
fill_world_edit()
player.on_chat("\\\\diamond_ore", on_on_chat37)
def on_on_chat38():
global block
block = "portal"
fill_world_edit()
player.on_chat("\\\\portal", on_on_chat38)
def on_on_chat39():
global block
block = "packed_ice"
player.on_chat("\\\\select packed_ice", on_on_chat39)
def on_on_chat40():
global block
block = "tuff"
fill_world_edit()
player.on_chat("\\\\tuff", on_on_chat40)
def on_on_chat41():
global block
block = "lapis_block"
fill_world_edit()
player.on_chat("\\\\lapis_block", on_on_chat41)
def on_on_chat42():
global block
block = "bbb:polished_limestone"
fill_world_edit()
player.on_chat("\\\\polished_limestone", on_on_chat42)
def on_on_chat43(blockid4):
global block
block = "leaves " + str(blockid4)
fill_world_edit()
player.on_chat("\\\\leaves", on_on_chat43)
def on_on_chat44():
global block
block = "snow"
player.on_chat("\\\\select.snow", on_on_chat44)
def on_on_chat45():
global block
block = "quartz_block 3"
fill_world_edit()
player.on_chat("\\\\smooth_quartz_block", on_on_chat45)
def on_on_chat46():
player.execute("/fill ~ ~100 ~ ~~~ wool 3 replace air")
player.on_chat("\\\\waypoint_light_blue", on_on_chat46)
def on_on_chat47():
global block
block = "stone 5"
player.on_chat("\\\\select.andesite", on_on_chat47)
def on_on_chat48():
global block
block = "netherrack"
player.on_chat("\\\\select.netherrack", on_on_chat48)
def on_on_chat49():
global block
block = "bbb:dotted_subtle_bricks"
fill_world_edit()
player.on_chat("\\\\dotted_subtle_bricks", on_on_chat49)
def on_on_chat50():
global block
block = "cobblestone"
player.on_chat("\\\\select.cobblestone", on_on_chat50)
def on_on_chat51(blockid5):
global block
block = "stained_hardened_clay " + str(blockid5)
fill_world_edit()
player.on_chat("\\\\stained_terracotta", on_on_chat51)
def on_on_chat52():
player.execute("give @p wooden_axe")
player.execute("give @p redstone_torch")
player.execute("give @p shears")
player.execute("give @p paper")
player.on_chat("WEtools", on_on_chat52)
def on_on_chat53():
global block
block = "lapis_ore"
fill_world_edit()
player.on_chat("\\\\lapis_ore", on_on_chat53)
def on_on_chat54():
global block
block = "bbb:limestone"
fill_world_edit()
player.on_chat("\\\\limestone", on_on_chat54)
def on_on_chat55():
global block
block = "bbb:polished_limestone"
player.on_chat("\\\\select.polished_limestone", on_on_chat55)
def on_on_chat56(blockid6):
global block
block = "quartz_block " + str(blockid6)
player.on_chat("\\\\select.quartz", on_on_chat56)
def on_on_chat57():
player.say("Deleting all items floating around...")
loops.pause(20)
player.execute("kill @e[type=item]")
player.say("Optimization Successful")
player.on_chat("\\\\optimize", on_on_chat57)
def on_on_chat58(blockid7):
global block
block = "log " + str(blockid7)
player.on_chat("\\\\select.log", on_on_chat58)
def on_item_interacted_nether_star():
player.execute("/fill ~3 ~150 ~3 ~-3 ~-10 ~-3 air 0 replace wool")
player.on_item_interacted(NETHER_STAR, on_item_interacted_nether_star)
def on_on_chat59(blockid8):
global block
block = "stained_glass_pane " + str(blockid8)
fill_world_edit()
player.on_chat("\\\\stained_glass_pane", on_on_chat59)
def on_on_chat60():
global block
block = "end_portal"
fill_world_edit()
player.on_chat("\\\\end_portal", on_on_chat60)
def on_on_chat61():
player.execute("/fill ~ ~100 ~ ~~~ wool 0 replace air")
player.on_chat("\\\\waypoint_white", on_on_chat61)
def on_on_chat62():
global block
block = "anvil"
player.on_chat("\\\\select.anvil", on_on_chat62)
def on_on_chat63():
global block
block = "basalt"
player.on_chat("\\\\select.basalt", on_on_chat63)
def on_on_chat64():
global block
block = "hay_block"
player.on_chat("\\\\select.hay_block", on_on_chat64)
def on_on_chat65(tempNumber):
global _2, _5
if tempNumber != 0:
formSmallest()
clone(world(smallestX, smallestY - tempNumber, smallestZ))
_2 += 0 - tempNumber
_5 += 0 - tempNumber
loops.pause(2)
tempNumber = 0
else:
tellplayer("Number Not Valid")
player.on_chat("\\\\copy.down", on_on_chat65)
def on_on_chat66(blockid9):
global block
block = "stone " + str(blockid9)
fill_world_edit()
player.on_chat("\\\\stone", on_on_chat66)
def on_on_chat67():
if _2 > -99:
player.execute("particle minecraft:dragon_breath_trail " + str(world(_1, _2 + 1, _3)))
player.execute("particle minecraft:endrod " + str(world(_1, _2, _3)))
if _5 > -99:
player.execute("particle minecraft:villager_happy " + str(world(_4, _5 + 1, _6)))
player.execute("particle minecraft:endrod " + str(world(_4, _5, _6)))
player.on_chat("\\\\particle", on_on_chat67)
def on_on_chat68():
global block
block = "copper_ore"
fill_world_edit()
player.on_chat("\\\\copper_ore", on_on_chat68)
def on_on_chat69():
global block
block = "bbb:slate_bricks"
fill_world_edit()
player.on_chat("\\\\slate_bricks", on_on_chat69)
def on_on_chat70():
global block
block = "furnace"
player.on_chat("\\\\select.furnace", on_on_chat70)
def on_on_chat71():
player.execute("gamemode s")
player.on_chat("\\\\gms", on_on_chat71)
def on_on_chat72():
global block
block = "bbb:alternate_dotted_subtle_bricks"
fill_world_edit()
player.on_chat("\\\\alternate_dotted_subtle_bricks", on_on_chat72)
def on_on_chat73():
global block
block = "bbb:polished_myalite"
fill_world_edit()
player.on_chat("\\\\polished_myalite", on_on_chat73)
def on_on_chat74():
global camera
if camera == "false":
player.execute("replaceitem entity @s slot.armor.chest 0 elytra")
player.execute("effect @s slow_falling 99999999 10 true")
camera = "true"
tellplayer("Camera Mode on, Activate Elytra and hit 'F1' to get cinematic footage")
else:
player.execute("effect @s slow_falling 0 0 true")
tellplayer("Camer Mode off")
camera = "false"
player.on_chat("\\\\camera", on_on_chat74)
def on_on_chat75():
global block
block = "copper_block"
player.on_chat("\\\\select.copper_block", on_on_chat75)
def on_item_interacted_shears():
cut(pos(0, 0, 0))
player.on_item_interacted(SHEARS, on_item_interacted_shears)
def on_on_chat76():
global block
block = "calcite"
fill_world_edit()
player.on_chat("\\\\calcite", on_on_chat76)
def on_on_chat77():
global block
block = "deepslate"
fill_world_edit()
player.on_chat("\\\\deepslate", on_on_chat77)
def on_on_chat78():
global block
block = "stone 3"
player.on_chat("\\\\select.diorite", on_on_chat78)
# Lists Current Block
def on_on_chat79():
global block_text_mask
# If "block" contains an underscore separate "block" and set that to "block_text_mask"
if block.includes("_"):
block_text_mask = "" + block.split("_")[0] + " " + block.split("_")[1]
# execute command tellraw containing "block_text_mask"
player.execute("/tellraw @s {\"rawtext\":[{\"text\":\"§bWE§r :§b Selected Block is §a" + block_text_mask + "\"}]}")
else:
# execute command tellraw containing "block" if it doesn't contain "_"
player.execute("/tellraw @s {\"rawtext\":[{\"text\":\"§bWE§r :§b Selected Block is §a" + block + "\"}]}")
player.on_chat("\\\\list.block", on_on_chat79)
def on_on_chat80(tempNumber2):
global _1, _4
if tempNumber2 != 0:
formSmallest()
cut(world(smallestX + tempNumber2, smallestY, smallestZ))
_1 += tempNumber2
_4 += tempNumber2
tempNumber2 = 0
else:
tellplayer("Number Not Valid")
player.on_chat("\\\\east", on_on_chat80)
def on_on_chat81():
global block
block = "deepslate"
player.on_chat("\\\\select.deepslate", on_on_chat81)
def on_on_chat82():
global block
block = "gravel"
player.on_chat("\\\\select.gravel", on_on_chat82)
def on_on_chat83():
global block
block = "bbb:andesite_bricks"
fill_world_edit()
player.on_chat("\\\\andesite_bricks", on_on_chat83)
def on_on_chat84(blockid10):
global block
block = "concrete " + str(blockid10)
player.on_chat("\\\\select.concrete", on_on_chat84)
def formLargest():
global largestX, largestY, largestZ
if _1 < _4:
largestX = _4
else:
largestX = _1
if _2 < _5:
largestY = _5
else:
largestY = _2
if _3 < _6:
largestZ = _6
else:
largestZ = _3
def on_on_chat85():
global block
block = "hopper"
fill_world_edit()
player.on_chat("\\\\hopper", on_on_chat85)
def on_item_interacted_oak_door():
agent.teleport_to_player()
player.on_item_interacted(OAK_DOOR, on_item_interacted_oak_door)
def on_on_chat86():
global block
block = "glowstone"
player.on_chat("\\\\select.glowstone", on_on_chat86)
def on_on_chat87(blockid11):
global block
block = "end_portal_frame " + str(blockid11)
player.on_chat("\\\\select.end_portal_frame", on_on_chat87)
def on_on_chat88():
global block
block = "hopper"
player.on_chat("\\\\select.hopper", on_on_chat88)
def on_on_chat89():
global block
block = "bbb:slate"
player.on_chat("\\\\select.slate", on_on_chat89)
def on_on_chat90():
global block
block = "crying_obsidian"
fill_world_edit()
player.on_chat("\\\\crying_obsidian", on_on_chat90)
def on_on_chat91(blockid12):
global block
block = "stone " + str(blockid12)
player.on_chat("\\\\select.stone", on_on_chat91)
def on_on_chat92(blockid13):
global block
block = "stonebrick " + str(blockid13)
fill_world_edit()
player.on_chat("\\\\stonebrick", on_on_chat92)
def on_on_chat93():
global block
block = "brick_block"
fill_world_edit()
player.on_chat("\\\\brick_block", on_on_chat93)
def on_on_chat94():
cut(pos(0, 0, 0))
player.on_chat("\\\\cut", on_on_chat94)
def on_on_chat95():
global block
block = "glass"
player.on_chat("\\\\select.glass", on_on_chat95)
def on_on_chat96():
global block
block = "bbb:dotted_subtle_bricks"
player.on_chat("\\\\select.dotted_subtle_bricks", on_on_chat96)
def on_on_chat97():
global block
block = "copper_block"
fill_world_edit()
player.on_chat("\\\\copper_block", on_on_chat97)
def on_on_chat98():
global block
block = "dirt"
fill_world_edit()
player.on_chat("\\\\dirt", on_on_chat98)
def on_on_chat99():
global block
block = "glowstone"
fill_world_edit()
player.on_chat("\\\\glowstone", on_on_chat99)
def on_on_chat100():
formSmallest()
tellplayer("§6The smallest values of each dimension within the selected area is: " + str(world(smallestX, smallestY, smallestZ)))
player.on_chat("\\\\form_smallest_debug", on_on_chat100)
def on_on_chat101():
player.execute("/fill ~ ~100 ~ ~~~ wool 9 replace air")
player.on_chat("\\\\waypoint_cyan", on_on_chat101)
def fill_world_edit():
global blockid37
# I've updated the code to split fill functions into two different fill commands so the maximum area that can be filled goes from 32k, two 64k
if _5 > _2:
# Tests if difference of the two selected y coordinates is even
if (_5 - _2) / 2 == Math.round(_5 - _2):
# First fill command
# Finds middle ground and sets it to second y coordinate
player.execute("fill " + str(_1) + (" " + str(_2)) + (" " + str(_3)) + (" " + str(_4)) + (" " + str(((_5 - _2) / 2 + _2))) + (" " + str(_6) + (" " + block)))
# Second fill command
# Finds middle ground and sets it to first y coordinate
player.execute("fill " + str(_1) + (" " + str(((_5 - _2) / 2 + _2))) + (" " + str(_3)) + (" " + str(_4)) + (" " + str(_5)) + (" " + str(_6) + (" " + block)))
else:
# Else if(odd), first fill command
# Does the same thing as even, except it adds one so it makes the number even, so it can be divided into two to make a middle ground
player.execute("fill " + str(_1) + (" " + str(_2)) + (" " + str(_3)) + (" " + str(_4)) + (" " + str(((_5 - _2 + 1) / 2 + _2))) + (" " + str(_6) + (" " + block)))
# Else if(odd), second fill command
player.execute("fill " + str(_1) + (" " + str(((_5 - _2 + 1) / 2 + _2))) + (" " + str(_3)) + (" " + str(_4)) + (" " + str(_5)) + (" " + str(_6) + (" " + block)))
else:
# Basically the same as before except if the second selected y coordinate is smaller than the first
if _5 < _2:
if (_2 - _5) / 2 == Math.round(_2 - _5):
player.execute("fill " + str(_1) + (" " + str(_2)) + (" " + str(_3)) + (" " + str(_4)) + (" " + str(((_2 - _5) / 2 + _5))) + (" " + str(_6) + (" " + block)))
player.execute("fill " + str(_1) + (" " + str(((_2 - _5) / 2 + _5))) + (" " + str(_3)) + (" " + str(_4)) + (" " + str(_5)) + (" " + str(_6) + (" " + block)))
else:
player.execute("fill " + str(_1) + (" " + str(_2)) + (" " + str(_3)) + (" " + str(_4)) + (" " + str(((_2 - _5 + 1) / 2 + _5))) + (" " + str(_6) + (" " + block)))
player.execute("fill " + str(_1) + (" " + str(((_2 - _5 + 1) / 2 + _5))) + (" " + str(_3)) + (" " + str(_4)) + (" " + str(_5)) + (" " + str(_6) + (" " + block)))
else:
# The same command as the fill command from before this new system this is if the two y coordinates are the same
if _2 == _5:
player.execute("fill " + str(_1) + (" " + str(_2)) + (" " + str(_3)) + (" " + str(_4)) + (" " + str(_5)) + (" " + str(_6) + (" " + block)))
blockid37 = 0
def on_on_chat102():
global block
block = "gold_ore"
fill_world_edit()
player.on_chat("\\\\gold_ore", on_on_chat102)
def on_on_chat103():
player.execute("/fill ~ ~100 ~ ~~~ wool 1 replace air")
player.on_chat("\\\\waypoint_orange", on_on_chat103)
def on_on_chat104():
global block
block = "basalt"
fill_world_edit()
player.on_chat("\\\\basalt", on_on_chat104)
def on_on_chat105():
global block
block = "glass_pane"
player.on_chat("\\\\select.glass_pane", on_on_chat105)
def on_on_chat106():
global block
block = "bbb:rocky_stone"
player.on_chat("\\\\select.rocky_stone", on_on_chat106)
def on_on_chat107():
global block
block = "ice"
fill_world_edit()
player.on_chat("\\\\ice", on_on_chat107)
def on_on_chat108(tempNumber3):
global _2, _5
if tempNumber3 != 0:
formSmallest()
cut(world(smallestX, smallestY - tempNumber3, smallestZ))
_2 += 0 - tempNumber3
_5 += 0 - tempNumber3
tempNumber3 = 0
else:
tellplayer("Number Not Valid")
player.on_chat("\\\\down", on_on_chat108)
def fill_replace(replaces: str):
global block
if not (block.includes(" ")):
block = "" + block + " 0"
# First fill command
player.execute("fill " + str(_1) + (" " + str(_2)) + (" " + str(_3)) + (" " + str(_4)) + (" " + str(_5)) + (" " + str(_6) + (" " + block + " replace " + replaces)))
def on_on_chat109():
global block
block = "sand"
fill_world_edit()
player.on_chat("\\\\sand", on_on_chat109)
def on_on_chat110():
global block
block = "soul_sand"
player.on_chat("\\\\select.soul_sand", on_on_chat110)
def on_on_chat111():
global block
block = "end_stone"
player.on_chat("\\\\select.end_stone", on_on_chat111)
def on_on_chat112():
global block
block = "bbb:slate_bricks"
player.on_chat("\\\\select.slate_bricks", on_on_chat112)
def on_on_chat113():
player.execute("gamemode a")
player.on_chat("\\\\gma", on_on_chat113)
def on_on_chat114():
player.execute("give @p wooden_axe")
player.execute("give @p redstone_torch")
player.execute("give @p dye 1 19")
player.execute("give @p shears")
player.execute("give @p paper")
mobs.give(mobs.target(NEAREST_PLAYER), LAVA_BUCKET, 1)
mobs.give(mobs.target(NEAREST_PLAYER), WATER_BUCKET, 1)
mobs.give(mobs.target(NEAREST_PLAYER), COMPASS, 1)
player.execute("give @s nether_star")
player.execute("give @s wooden_door 1")
player.on_chat("allwetools", on_on_chat114)
def on_on_chat115():
global block
block = "bedrock"
player.on_chat("\\\\select.bedrock", on_on_chat115)
def on_on_chat116(blockid14):
global block
block = "wood " + str(blockid14)
player.on_chat("\\\\select.wood", on_on_chat116)
def on_on_chat117():
player.execute("time set day")
player.execute("weather clear")
player.execute("gamerule doweathercycle false")
player.execute("gamerule dodaylightcycle false")
player.on_chat("\\\\less", on_on_chat117)
def on_on_chat118():
global block
block = "ice"
player.on_chat("\\\\select.ice", on_on_chat118)
def on_on_chat119():
global block
block = "hardened_clay"
player.on_chat("\\\\select.terracotta", on_on_chat119)
def on_on_chat120(blockid15):
global block
block = "concrete " + str(blockid15)
fill_world_edit()
player.on_chat("\\\\concrete", on_on_chat120)
def on_on_chat121():
global block
block = "diamond_ore"
player.on_chat("\\\\select.diamond_ore", on_on_chat121)
def on_item_interacted():
global block
block = "air"
tellplayer("Set Block To Air")
player.run_chat_command("\\\\fill")
player.on_item_interacted(blocks.block_with_data(INK_SAC, 19), on_item_interacted)
def on_on_chat122():
global block
block = "dirt"
player.on_chat("\\\\select.dirt", on_on_chat122)
def on_on_chat123():
global block
block = "bbb:slate"
fill_world_edit()
player.on_chat("\\\\slate", on_on_chat123)
def on_on_chat124():
formSmallest()
formLargest()
tellplayer("§6The slope of position 1 and position 2 - m(y/x) = " + str((largestY - smallestY) / (largestX - smallestX)))
player.on_chat("\\\\slope_positions_debug", on_on_chat124)
def on_on_chat125():
global block
block = "gold_ore"
player.on_chat("\\\\select.gold_ore", on_on_chat125)
def on_on_chat126():
global block
block = "tnt"
fill_world_edit()
player.on_chat("\\\\tnt", on_on_chat126)
def on_on_chat127(blockid16):
global block
block = "quartz_block " + str(blockid16)
fill_world_edit()
player.on_chat("\\\\quartz_block", on_on_chat127)
def on_on_chat128():
global block
block = "sponge"
player.on_chat("\\\\select.sponge", on_on_chat128)
def on_on_chat129():
tellplayer("§2World Edit Config: Type '(Config Subject) [0(True) or 1(False) or(INT)]")
tellplayer("§2--------------------------")
tellplayer("§2Config (INT): BrushDistance")
tellplayer("§2Config (0/1): GiveBrushOnSetup")
player.on_chat("WEconfig", on_on_chat129)
def on_item_interacted_redstone_torch():
tellplayer("Successfully Filled")
player.run_chat_command("\\\\fill")
player.on_item_interacted(REDSTONE_TORCH, on_item_interacted_redstone_torch)
def on_on_chat130():
global block
block = "hay_block"
fill_world_edit()
player.on_chat("\\\\hay_block", on_on_chat130)
def tellplayer(text: str):
player.execute("/tellraw @s {\"rawtext\":[{\"text\":\"" + text + "\"}]}")
def on_on_chat131():
global block
block = "fire"
fill_world_edit()
player.on_chat("\\\\fire", on_on_chat131)
def on_on_chat132():
fill_replace("water")
player.on_chat("\\\\fill.replace_water", on_on_chat132)
def on_on_chat133():
global block
block = "netherrack"
fill_world_edit()
player.on_chat("\\\\netherrack", on_on_chat133)
def on_on_chat134():
global block
block = "bbb:myalite"
fill_world_edit()
player.on_chat("\\\\myalite", on_on_chat134)
def on_on_chat135(tempNumber4):
global _1, _4
formSmallest()
clone(world(smallestX + tempNumber4, smallestY, smallestZ))
_1 += tempNumber4
_4 += tempNumber4
player.on_chat("\\\\copy.east", on_on_chat135)
def on_on_chat136():
global block
block = "bbb:diorite_bricks"
player.on_chat("\\\\select.diorite_bricks", on_on_chat136)
def on_on_chat137():
player.execute("/fill ~ ~100 ~ ~~~ wool 12 replace air")
player.on_chat("\\\\waypoint_brown", on_on_chat137)
def on_on_chat138():
global block
block = "beacon"
player.on_chat("\\\\select.beacon", on_on_chat138)
def on_on_chat139():
global block
block = "emerald_ore"
fill_world_edit()
player.on_chat("\\\\emerald_ore", on_on_chat139)
def on_item_interacted_compass():
player.execute("teleport @s @r[name=!" + player.name() + "]")
player.on_item_interacted(COMPASS, on_item_interacted_compass)
def on_on_chat140():
global block
block = "glass"
fill_world_edit()
player.on_chat("\\\\glass", on_on_chat140)
def on_on_chat141():
player.execute("teleport @s " + str(world(randint(-5000, 5000), 80, randint(-5000, 5000))))
player.on_chat("\\\\wild", on_on_chat141)
def on_on_chat142():
global block
block = "raw_gold_block"
player.on_chat("\\\\select.raw_gold_block", on_on_chat142)
def on_on_chat143():
tellplayer("§a--------------------------")
tellplayer("§dWorld Edit = Blocks")
tellplayer("§aHere are some reminders of block-related commands")
tellplayer("§aUse '\\\\\\\\fill' to fill your selected area with your selected block")
tellplayer("§aUse '\\\\\\\\copy' to copy your selected area to your feet, specifically the lower bound x,y,z will be position at your feet")
tellplayer("§aUse '\\\\\\\\cut' just like '\\\\\\\\copy' but removeing the original selected area on move")
tellplayer("§aUse '\\\\\\\\fill.replace_ground' just like '\\\\\\\\fill' but it only replaces the ground")
tellplayer("§aUse '\\\\\\\\fill.replace_water' just like '\\\\\\\\fill' but it only replaces the water")
tellplayer("§aUse '\\\\\\\\fill.replace_air' just like '\\\\\\\\fill' but it only replaces the air")
tellplayer("§aUse '\\\\\\\\list.block' to remind yourself of your current block (your block clipboard)")
tellplayer("§a--------------------------")
tellplayer("§aYou can utilize World Edit waypoints to colour code and mark important locations")
tellplayer("§aYou can use waypoints by executing the '\\\\\\\\waypoint_colour' command")
tellplayer("§aE.g. '\\\\\\\\waypoint_orange' will create a waypoint(pillar) at your location spanning 100 blocks in the air")
tellplayer("§aYou can delete the waypoint by right-clicking on a Nether Star near the waypoint desired for removal")
tellplayer("§g!Don't use near other wool structures, otherwise they may be destroyed in the removal process!")
tellplayer("§a--------------------------")
tellplayer("§aBrushes are an advanced tool that allows you to sculpt terrain and other structures")
tellplayer("§aBrushes also have configurations, more information is available through the 'WeConfig' command")
tellplayer("§aBrushes can be created through the '\\\\\\\\brush [brush size]' command and the user specifies the brush radius")
tellplayer("§aBrushes become the current selected block when finished")
tellplayer("§g!The Brush Tool Does Not Support Gravity Blocks!")
tellplayer("§aBrushes can take a while to create, once created a brush(Diamond Shovel) will be given to you")
tellplayer("§aRight-click to use the brush")
tellplayer("§a--------------------------")
tellplayer("§aYour block not supported by the '\\\\\\\\block' and the '\\\\\\\\select.block' commands?")
tellplayer("§aWell not to worry, although more tedious than the traditional commmands you can use agent fill commands")
tellplayer("§aThese allow for any block of your choosing and also allow your to create a pallet of sorts")
tellplayer("§aYou need to first collect your desired pallet-blocks and place them into your inventory")
tellplayer("§aYou next need to drag each of those blocks into a seperate slot within your agents inventory")
tellplayer("§aYour agent not here? Try the '\\\\\\\\agentcall' command to teleport your agent to you")
tellplayer("§aYou can use the '\\\\\\\\fill.custom [agent slot no.] [block data] to fill utilizing your agents pallet of blocks'")
tellplayer("§aYou need to specify the agent slot you wish to be utilizing and (optionally) you can specify the block data")
tellplayer("§aE.g. '\\\\\\\\fill.custom 1' will grab the block in the first inventory slot of your agent, this may hardened clay or purpur columns")
tellplayer("§a--------------------------")
player.on_chat("WeBlocks", on_on_chat143)
def on_on_chat144():
global block
block = "brick_block"
player.on_chat("\\\\select.brick_block", on_on_chat144)
def on_on_chat145():
global block
block = "stone 2"
player.on_chat("\\\\select.polished_granite", on_on_chat145)
def on_on_chat146():
global block
block = "slime"
fill_world_edit()
player.on_chat("\\\\slime", on_on_chat146)
def on_on_chat147():
global block
block = "brick_block"
player.on_chat("\\\\select.bricks", on_on_chat147)
def on_on_chat148():
global block
block = "redstone_ore"
fill_world_edit()
player.on_chat("\\\\redstone_ore", on_on_chat148)
def on_on_chat149(blockid17):
global block
block = "wool " + str(blockid17)
player.on_chat("\\\\select.wool", on_on_chat149)
def on_on_chat150():
global block
block = "brick_block"
fill_world_edit()
player.on_chat("\\\\bricks", on_on_chat150)
def on_on_chat151(tempNumber5):
global _1, _4
if tempNumber5 != 0:
formSmallest()
cut(world(smallestX - tempNumber5, smallestY, smallestZ))
_1 += 0 - tempNumber5
_4 += 0 - tempNumber5
tempNumber5 = 0
else:
tellplayer("Number Not Valid")
player.on_chat("\\\\west", on_on_chat151)
def on_on_chat152():
global block
block = "quartz_block 3"
fill_world_edit()
player.on_chat("\\\\smooth_quartz", on_on_chat152)
def on_on_chat153():
global block