-
-
Notifications
You must be signed in to change notification settings - Fork 216
Expand file tree
/
Copy pathConstants.java
More file actions
1577 lines (1299 loc) · 70.6 KB
/
Constants.java
File metadata and controls
1577 lines (1299 loc) · 70.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
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.common.util;
import static org.spongepowered.api.data.persistence.DataQuery.of;
import com.google.common.collect.BiMap;
import com.google.common.collect.ComparisonChain;
import com.google.common.collect.HashBiMap;
import com.mojang.brigadier.arguments.ArgumentType;
import com.mojang.brigadier.arguments.StringArgumentType;
import net.minecraft.commands.arguments.CompoundTagArgument;
import net.minecraft.commands.arguments.ResourceLocationArgument;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.DoubleTag;
import net.minecraft.nbt.FloatTag;
import net.minecraft.nbt.ListTag;
import net.minecraft.server.level.ChunkLevel;
import net.minecraft.server.level.FullChunkStatus;
import net.minecraft.world.inventory.ClickType;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.storage.LevelResource;
import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.data.persistence.DataContentUpdater;
import org.spongepowered.api.data.persistence.DataQuery;
import org.spongepowered.api.data.type.ArtType;
import org.spongepowered.api.data.type.ArtTypes;
import org.spongepowered.api.data.type.CatType;
import org.spongepowered.api.data.type.CatTypes;
import org.spongepowered.api.data.type.ComparatorMode;
import org.spongepowered.api.data.type.ComparatorModes;
import org.spongepowered.api.data.type.DyeColor;
import org.spongepowered.api.data.type.DyeColors;
import org.spongepowered.api.data.type.HandPreference;
import org.spongepowered.api.data.type.HandPreferences;
import org.spongepowered.api.data.type.HorseColor;
import org.spongepowered.api.data.type.HorseColors;
import org.spongepowered.api.data.type.HorseStyle;
import org.spongepowered.api.data.type.HorseStyles;
import org.spongepowered.api.data.type.LlamaType;
import org.spongepowered.api.data.type.LlamaTypes;
import org.spongepowered.api.data.type.ParrotType;
import org.spongepowered.api.data.type.ParrotTypes;
import org.spongepowered.api.data.type.RabbitType;
import org.spongepowered.api.data.type.RabbitTypes;
import org.spongepowered.api.data.type.StructureMode;
import org.spongepowered.api.data.type.StructureModes;
import org.spongepowered.api.entity.living.player.gamemode.GameMode;
import org.spongepowered.api.entity.living.player.gamemode.GameModes;
import org.spongepowered.api.util.Axis;
import org.spongepowered.api.util.Direction;
import org.spongepowered.math.vector.Vector3i;
import java.net.InetSocketAddress;
import java.time.Duration;
import java.util.Comparator;
import java.util.EnumSet;
import java.util.Objects;
import java.util.function.Supplier;
/**
* A standard class where all various "constants" for various data are stored.
* This is for a singular unique point of reference that can be changed
* for implementation requirements.
*
* <p><em>WARNING</em>: USAGE OF THESE CONSTANTS, DUE TO STATIC INITIALIZATION,
* IS ABSOLUTELY FORBIDDEN UNTIL THE GAME IS DURING THE POST-INIT PHASE DUE
* TO REGISTRATION OF CATALOG TYPES. UNTIL THE REGISTRATION IS HANDLED WHERE
* THE PROVIDED CATALOG TYPES ARE PROPERLY REGISTERED AND NOT <code>null</code>,
* ANY USE OF THIS CLASS WILL RESULT IN A GLORIOUS FAIL INDESCRIBABLE MAGNITUDES.
* </p>
*/
public final class Constants {
public static final String UUID = "UUID";
public static final String UUID_MOST = "UUIDMost";
public static final DataQuery UUID_MOST_QUERY = DataQuery.of(Constants.UUID_MOST);
public static final String UUID_LEAST = "UUIDLeast";
public static final DataQuery UUID_LEAST_QUERY = DataQuery.of(Constants.UUID_LEAST);
public static final String MINECRAFT = "minecraft";
public static final String MINECRAFT_CLIENT = "net.minecraft.client.Minecraft";
public static final String DEDICATED_SERVER = "net.minecraft.server.dedicated.DedicatedServer";
public static final String MINECRAFT_SERVER = "net.minecraft.server.MinecraftServer";
public static final String INTEGRATED_SERVER = "net.minecraft.client.server.IntegratedServer";
private Constants() {
}
public static final class Sponge {
public static final class Data {
/**
* Class based custom data.
*/
@Deprecated
public static final class V1 {
public static final String CUSTOM_DATA_CLASS = "DataClass";
public static final DataQuery DATA_CLASS = DataQuery.of(CUSTOM_DATA_CLASS);
public static final String DATA_VERSION = "DataVersion";
}
/**
* Data Manipulator with DataId based custom data
*/
@Deprecated
public static final class V2 {
public static final DataQuery MANIPULATOR_DATA = DataQuery.of("ManipulatorData");
public static final DataQuery MANIPULATOR_ID = DataQuery.of("ManipulatorId");
public static final String FAILED_CUSTOM_DATA = "FailedData";
public static final String CUSTOM_MANIPULATOR_TAG_LIST = "CustomManipulators";
public static final DataQuery CUSTOM_MANIPULATOR_LIST = of(V2.CUSTOM_MANIPULATOR_TAG_LIST);
public static final String SPONGE_DATA = "SpongeData";
public static final DataQuery SPONGE_DATA_ROOT = of(V2.SPONGE_DATA);
}
/**
* {@link org.spongepowered.api.data.persistence.DataStore} based data
*/
public static final class V3 {
public static final DataQuery SPONGE_DATA_ROOT = DataQuery.of("sponge-data");
public static final DataQuery CONTENT_VERSION = DataQuery.of("version");
public static final DataQuery CONTENT = DataQuery.of("content");
}
}
public static final int MAX_DEATH_EVENTS_BEFORE_GIVING_UP = 3;
public static final String SPONGE_ENTITY_CREATOR = "Creator";
public static final String SPONGE_ENTITY_NOTIFIER = "Notifier";
public static final String SPONGE_BLOCK_POS_TABLE = "BlockPosTable";
@Deprecated
public static final String LEGACY_SPONGE_PLAYER_UUID_TABLE = "PlayerIdTable";
public static final String SPONGE_PLAYER_UUID_TABLE = "player-uuid-table";
// General DataQueries
public static final DataQuery UNSAFE_NBT = of("UnsafeData");
public static final DataQuery DATA_MANIPULATORS = of("Data");
// Snapshots
public static final DataQuery SNAPSHOT_WORLD_POSITION = of("Position");
/**
* Modifies bits in an integer.
*
* @param num Integer to modify
* @param data Bits of data to add
* @param which Index of nibble to start at
* @param bitsToReplace The number of bits to replace starting from nibble index
* @return The modified integer
*/
public static int setNibble(final int num, final int data, final int which, final int bitsToReplace) {
return (num & ~(bitsToReplace << (which * 4)) | (data << (which * 4)));
}
/**
* Serialize this BlockPos into a short value
*/
public static short blockPosToShort(final BlockPos pos) {
short serialized = (short) Sponge.setNibble(0, pos.getX() & Constants.Chunk.XZ_MASK, 0, Constants.Chunk.NUM_XZ_BITS);
serialized = (short) Sponge.setNibble(serialized, pos.getY() & Constants.Chunk.Y_SHORT_MASK, 1, Constants.Chunk.NUM_SHORT_Y_BITS);
serialized = (short) Sponge.setNibble(serialized, pos.getZ() & Constants.Chunk.XZ_MASK, 3, Constants.Chunk.NUM_XZ_BITS);
return serialized;
}
/**
* Serialize this BlockPos into an int value
*/
public static int blockPosToInt(final BlockPos pos) {
int serialized = Sponge.setNibble(0, pos.getX() & Constants.Chunk.XZ_MASK, 0, Constants.Chunk.NUM_XZ_BITS);
serialized = Sponge.setNibble(serialized, pos.getY() & Constants.Chunk.Y_INT_MASK, 1, Constants.Chunk.NUM_INT_Y_BITS);
serialized = Sponge.setNibble(serialized, pos.getZ() & Constants.Chunk.XZ_MASK, 7, Constants.Chunk.NUM_XZ_BITS);
return serialized;
}
public static final class PlayerData {
public static final DataQuery PLAYER_DATA_JOIN = of("FirstJoin");
public static final DataQuery PLAYER_DATA_LAST = of("LastPlayed");
}
public static final class EntityArchetype {
public static final int BASE_VERSION = 1;
public static final String ENTITY_ID = "Id";
public static final DataQuery ENTITY_TYPE = of("EntityType");
public static final DataQuery ENTITY_DATA = of("EntityData");
}
public static final class Entity {
public static final String IS_VANISHED = "IsVanished";
public static final String IS_INVISIBLE = "IsInvisible";
public static final String VANISH_UNCOLLIDEABLE = "VanishUnCollideable";
public static final String VANISH_UNTARGETABLE = "VanishUnTargetable";
public static final String CAN_GRIEF = "CanGrief";
public static final class Item {
// These are used by pickup/despawn delay for ItemEntity
public static final String INFINITE_PICKUP_DELAY = "InfinitePickupDelay";
public static final String INFINITE_DESPAWN_DELAY = "InfiniteDespawnDelay";
public static final String PREVIOUS_PICKUP_DELAY = "PreviousPickupDelay";
public static final String PREVIOUS_DESPAWN_DELAY = "PreviousDespawnDelay";
}
public static final class Projectile {
public static final String PROJECTILE_DAMAGE_AMOUNT = "damageAmount";
}
public static final class EyeOfEnder {
public static final int DESPAWN_TIMER_MAX = 80;
}
public static final class Player {
public static final String HEALTH_SCALE = "HealthScale";
public static final int ITEM_COOLDOWN_CANCELLED = -2;
}
public static final class Human {
public static final byte PLAYER_MODEL_FLAG_ALL = (byte) 0b01111111;
}
public static final class DataRegistration {
public static final String INVENTORY = "inventory";
public static final String BLOCKENTITY = "blockentity";
public static final String LOCATION = "location";
public static final String BLOCKSTATE = "blockstate";
public static final String ENTITY = "entity";
public static final String GENERIC = "generic";
public static final String ITEMSTACK = "itemstack";
public static final String ITEM = "item";
public static final String NBT = "nbt";
}
public static final class RangedAttackGoal {
public static final int INFINITE_ATTACK_TIME = -2;
}
}
public static final class User {
public static final String USER_SPAWN_X = "SpawnX";
public static final String USER_SPAWN_Y = "SpawnY";
public static final String USER_SPAWN_Z = "SpawnZ";
public static final String USER_SPAWN_FORCED = "SpawnForced";
public static final String USER_SPAWN_LIST = "Spawns";
}
public static final class World {
public static final String DIMENSION_TYPE = "dimensionType";
public static final String HAS_CUSTOM_DIFFICULTY = "HasCustomDifficulty";
public static final String LEVEL_SPONGE_DAT = "level_sponge.dat";
public static final String LEVEL_SPONGE_DAT_OLD = org.spongepowered.common.util.Constants.Sponge.World.LEVEL_SPONGE_DAT + "_old";
public static final String LEVEL_SPONGE_DAT_NEW = org.spongepowered.common.util.Constants.Sponge.World.LEVEL_SPONGE_DAT + "_new";
public static final String UNIQUE_ID = "UUID";
public static final String DIMENSIONS_DIRECTORY = "dimensions";
public static final String DIMENSION = "Dimension";
}
public static final class Schematic {
public static final DataQuery NAME = of("Name");
public static final int CURRENT_VERSION = 3;
public static final int MAX_SIZE = Integer.MAX_VALUE & 0xFFFF;
public static final DataQuery VERSION = of("Version");
public static final DataQuery DATA_VERSION = of("DataVersion");
public static final DataQuery METADATA = of("Metadata");
public static final DataQuery REQUIRED_MODS = of(org.spongepowered.api.world.schematic.Schematic.METADATA_REQUIRED_MODS);
public static final DataQuery WIDTH = of("Width");
public static final DataQuery HEIGHT = of("Height");
public static final DataQuery LENGTH = of("Length");
public static final DataQuery OFFSET = of("Offset");
public static final DataQuery BLOCK_PALETTE = of("Palette");
public static final DataQuery BLOCK_CONTAINER = of("Blocks");
public static final DataQuery BIOME_CONTAINER = of("Biomes");
public static final DataQuery PALETTE = of("Palette");
public static final DataQuery BLOCK_DATA = of("Data");
public static final DataQuery BIOME_DATA = of("Data");
public static final DataQuery BLOCKENTITY_CONTAINER = of("BlockEntities");
public static final DataQuery BLOCKENTITY_DATA = of("Data");
public static final DataQuery BLOCKENTITY_ID = of("Id");
public static final DataQuery BLOCKENTITY_POS = of("Pos");
public static final DataQuery ENTITIES = of("Entities");
public static final DataQuery ENTITIES_ID = of("Id");
public static final DataQuery ENTITIES_POS = of("Pos");
public static final DataQuery BIOME_PALETTE = of("Palette");
public static final DataQuery SCHEMATIC = of("Schematic");
public static final class Versions {
public static final DataQuery V1_TILE_ENTITY_DATA = of("TileEntities");
public static final DataQuery V1_TILE_ENTITY_ID = of("id");
public static final DataQuery V1_BLOCK_PALETTE = of("Palette");
public static final DataQuery V1_BLOCK_PALETTE_MAX = of("Palette");
public static final DataQuery V2_BLOCK_PALETTE = of("Palette");
public static final DataQuery V2_BIOME_PALETTE = of("BiomePalette");
public static final DataQuery V2_BLOCK_DATA = of("BlockData");
public static final DataQuery V2_BIOME_DATA = of("BiomeData");
public static final DataQuery V2_BLOCK_ENTITIES = of("BlockEntities");
}
/**
* The NBT structure of the legacy Schematic format used by MCEdit and WorldEdit etc.
*/
public static final class Legacy {
public static final DataQuery X_POS = of("x");
public static final DataQuery Y_POS = of("y");
public static final DataQuery Z_POS = of("z");
public static final DataQuery MATERIALS = of("Materials");
public static final DataQuery WE_OFFSET_X = of("WEOffsetX");
public static final DataQuery WE_OFFSET_Y = of("WEOffsetY");
public static final DataQuery WE_OFFSET_Z = of("WEOffsetZ");
public static final DataQuery BLOCKS = of("Blocks");
public static final DataQuery BLOCK_DATA = of("Data");
public static final DataQuery ADD_BLOCKS = of("AddBlocks");
public static final DataQuery TILE_ENTITIES = of("TileEntities");
public static final DataQuery ENTITIES = of("Entities");
public static final DataQuery ENTITY_ID = of("id");
}
}
public static final class BlockEntityArchetype {
public static final int BASE_VERSION = 1;
public static final String TILE_ENTITY_ID = "Id";
public static final String TILE_ENTITY_POS = "Pos";
public static final DataQuery BLOCK_ENTITY_TYPE = of("TileEntityType");
public static final DataQuery BLOCK_STATE = of("BlockState");
public static final DataQuery BLOCK_ENTITY_DATA = of("TileEntityData");
}
public static final class BlockSnapshot {
public static final String TILE_ENTITY_POSITION_X = "x";
public static final String TILE_ENTITY_POSITION_Y = "y";
public static final String TILE_ENTITY_POSITION_Z = "z";
public static final DataQuery WORLD_UUID = DataQuery.of("WorldUuid"); // legacy data
}
public static final class Potion {
public static final int POTION_V2 = 2;
public static final int CURRENT_VERSION = Potion.POTION_V2;
}
public static final class BlockState {
public static final int BLOCK_TYPE_WITH_DAMAGE_VALUE = 1;
public static final int STATE_AS_CATALOG_ID = 2;
}
}
public static final class Permissions {
public static final String SELECTOR_PERMISSION = "minecraft.selector";
public static final String COMMAND_BLOCK_PERMISSION = "minecraft.commandblock";
public static final int COMMAND_BLOCK_LEVEL = 2;
public static final int SELECTOR_LEVEL = 2;
public static final String SPONGE_HELP_PERMISSION = "sponge.command.help";
public static final String DEBUG_HOVER_STACKTRACE = "sponge.debug.hover-stacktrace";
public static final int SPONGE_HELP_LEVEL = 0;
}
/**
* https://wiki.vg/Protocol#Effect
*/
public static final class WorldEvents {
public static final int PLAY_RECORD_EVENT = 1010;
public static final int PLAY_WITHER_SPAWN_EVENT = 1023;
public static final int PLAY_ENDERDRAGON_DEATH_EVENT = 1028;
public static final int PLAY_BLOCK_END_PORTAL_SPAWN_EVENT = 1038;
}
public static final class World {
public static final Vector3i BLOCK_MIN = new Vector3i(-30000000, 0, -30000000);
public static final Vector3i BLOCK_MAX = new Vector3i(30000000, 256, 30000000).sub(Vector3i.ONE);
public static final Vector3i BLOCK_SIZE = Constants.World.BLOCK_MAX.sub(Constants.World.BLOCK_MIN).add(Vector3i.ONE);
public static final EnumSet<net.minecraft.core.Direction> NOTIFY_DIRECTION_SET = EnumSet
.of(net.minecraft.core.Direction.WEST, net.minecraft.core.Direction.EAST, net.minecraft.core.Direction.DOWN,
net.minecraft.core.Direction.UP, net.minecraft.core.Direction.NORTH, net.minecraft.core.Direction.SOUTH);
public static final ResourceKey INVALID_WORLD_KEY = ResourceKey.sponge("invalid_world");
public static final String LEVEL_DAT_OLD = LevelResource.LEVEL_DATA_FILE.getId() + "_old";
public static final int DEFAULT_BLOCK_CHANGE_LIMIT = 512;
}
public static final class Chunk {
public static final Direction[] CARDINAL_DIRECTIONS = {Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST};
// Neighbor Constants
public static final int NUM_XZ_BITS = 4;
public static final int NUM_SHORT_Y_BITS = 8;
public static final int NUM_INT_Y_BITS = 24;
public static final short XZ_MASK = 0xF;
public static final short Y_SHORT_MASK = 0xFF;
public static final int Y_INT_MASK = 0xFFFFFF;
public static final String CHUNK_DATA_SECTIONS = "Sections";
}
public static final class ChunkTicket {
public static final int MAX_FULL_CHUNK_TICKET_LEVEL = ChunkLevel.byStatus(FullChunkStatus.ENTITY_TICKING);
// Highest ticket level that will cause loading a full chunk, plus one.
public static final int MAX_FULL_CHUNK_DISTANCE = ChunkTicket.MAX_FULL_CHUNK_TICKET_LEVEL + 1;
public static final int INFINITE_TIMEOUT = 0;
}
public static final class Networking {
public static final int MAX_STRING_LENGTH_BYTES = Short.MAX_VALUE;
public static final int MAX_STRING_LENGTH = Constants.Networking.MAX_STRING_LENGTH_BYTES >> 2;
// Inventory static fields
public static final int MAGIC_CLICK_OUTSIDE_SURVIVAL = -999;
public static final int MAGIC_CLICK_OUTSIDE_CREATIVE = -1;
// Flag masks
public static final int MASK_NONE = 0x00000;
public static final int MASK_OUTSIDE = 0x30000;
public static final int MASK_MODE = 0x0FE00;
public static final int MASK_DRAGDATA = 0x001F8;
public static final int MASK_BUTTON = 0x00007;
// Mask presets
public static final int MASK_ALL = Networking.MASK_OUTSIDE | Networking.MASK_MODE | Networking.MASK_BUTTON | Networking.MASK_DRAGDATA;
public static final int MASK_NORMAL = Networking.MASK_MODE | Networking.MASK_BUTTON | Networking.MASK_DRAGDATA;
public static final int MASK_DRAG = Networking.MASK_OUTSIDE | Networking.MASK_NORMAL;
// Click location semaphore flags
public static final int CLICK_INSIDE_WINDOW = 0x01 << 16; // << 0
public static final int CLICK_OUTSIDE_WINDOW = 0x01 << 16 << 1;
public static final int CLICK_ANYWHERE = Networking.CLICK_INSIDE_WINDOW | Networking.CLICK_OUTSIDE_WINDOW;
// Modes flags
public static final int MODE_CLICK = 0x01 << 9 << ClickType.PICKUP.ordinal();
public static final int MODE_SHIFT_CLICK = 0x01 << 9 << ClickType.QUICK_MOVE.ordinal();
public static final int MODE_HOTBAR = 0x01 << 9 << ClickType.SWAP.ordinal();
public static final int MODE_PICKBLOCK = 0x01 << 9 << ClickType.CLONE.ordinal();
public static final int MODE_DROP = 0x01 << 9 << ClickType.THROW.ordinal();
public static final int MODE_DRAG = 0x01 << 9 << ClickType.QUICK_CRAFT.ordinal();
public static final int MODE_DOUBLE_CLICK = 0x01 << 9 << ClickType.PICKUP_ALL.ordinal();
// Drag mode flags, bitmasked from button and only set if MODE_DRAG
public static final int DRAG_MODE_PRIMARY_BUTTON = 0x01 << 6; // << 0
public static final int DRAG_MODE_SECONDARY_BUTTON = 0x01 << 6 << 1;
public static final int DRAG_MODE_MIDDLE_BUTTON = 0x01 << 6 << 2;
public static final int DRAG_MODE_ANY = Networking.DRAG_MODE_PRIMARY_BUTTON | Networking.DRAG_MODE_SECONDARY_BUTTON | Networking.DRAG_MODE_MIDDLE_BUTTON;
// Drag status flags, bitmasked from button and only set if MODE_DRAG
public static final int DRAG_STATUS_STARTED = 0x01 << 3; // << 0;
public static final int DRAG_STATUS_ADD_SLOT = 0x01 << 3 << 1;
public static final int DRAG_STATUS_STOPPED = 0x01 << 3 << 2;
// Buttons flags, only set if *not* MODE_DRAG
public static final int BUTTON_PRIMARY = 0x01 /* << 0 */; // << 0
public static final int BUTTON_SECONDARY = 0x01 /* << 0 */ << 1;
public static final int BUTTON_MIDDLE = 0x01 /* << 0 */ << 2;
// Only use these with data from the actual packet. DO NOT
// use them as enum constant values (the 'stateId')
public static final int PACKET_BUTTON_PRIMARY_ID = 0;
public static final int PACKET_BUTTON_SECONDARY_ID = 0;
public static final int PACKET_BUTTON_MIDDLE_ID = 0;
public static final InetSocketAddress LOCALHOST = InetSocketAddress.createUnresolved("127.0.0.1", 0);
}
public static final class Item {
// These are the various tag compound id's for getting to various places
public static final String BLOCK_ENTITY_TAG = "BlockEntityTag";
public static final String BLOCK_ENTITY_ID = "id";
public static final String ENTITY_TAG = "EntityTag";
public static final String ITEM_ENCHANTMENT_LIST = "Enchantments";
public static final String ITEM_STORED_ENCHANTMENTS_LIST = "StoredEnchantments";
public static final String ITEM_DISPLAY = "display";
public static final String ITEM_LORE = "Lore";
public static final String ITEM_NAME = "Name";
public static final String ITEM_ORIGINAL_LORE = "SpongeOriginalLore";
public static final String ITEM_ORIGINAL_NAME = "SpongeOriginalName";
public static final String ITEM_ENCHANTMENT_ID = "id";
public static final String ITEM_ENCHANTMENT_LEVEL = "lvl";
public static final String ITEM_HIDE_FLAGS = "HideFlags";
public static final String ITEM_UNBREAKABLE = "Unbreakable";
public static final String CUSTOM_POTION_EFFECTS = "custom_potion_effects";
public static final String LOCK = "Lock";
public static final class Book {
public static final String ITEM_BOOK_PAGES = "pages";
public static final String ITEM_BOOK_TITLE = "title";
public static final String ITEM_BOOK_AUTHOR = "author";
public static final String ITEM_BOOK_RESOLVED = "resolved";
public static final String ITEM_BOOK_GENERATION = "generation";
public static final String INVALID_TITLE = "invalid";
}
public static final class Skull {
public static final String ITEM_SKULL_OWNER = "SkullOwner";
}
public static final class Potions {
// Potions
public static final DataQuery POTION_TYPE = of("PotionType");
public static final DataQuery POTION_AMPLIFIER = of("Amplifier");
public static final DataQuery POTION_SHOWS_PARTICLES = of("ShowsParticles");
public static final DataQuery POTION_SHOWS_ICON = of("ShowsIcon");
public static final DataQuery POTION_AMBIANCE = of("Ambiance");
public static final DataQuery POTION_DURATION = of("Duration");
}
public static final class TradeOffer {
// TradeOffers
public static final DataQuery FIRST_QUERY = of("FirstItem");
public static final DataQuery SECOND_QUERY = of("SecondItem");
public static final DataQuery BUYING_QUERY = of("BuyingItem");
public static final DataQuery EXPERIENCE_QUERY = of("GrantsExperience");
public static final DataQuery MAX_QUERY = of("MaxUses");
public static final DataQuery USES_QUERY = of("Uses");
public static final DataQuery EXPERIENCE_GRANTED_TO_MERCHANT_QUERY = of("ExperienceGrantedToMerchant");
public static final DataQuery PRICE_GROWTH_MULTIPLIER_QUERY = of("PriceGrowthMultiplier");
public static final DataQuery DEMAND_BONUS_QUERY = of("DemandBonus");
public static final int DEFAULT_USE_COUNT = 0;
public static final int DEFAULT_MAX_USES = 7;
}
public static final class Fireworks {
// Firework Effects
public static final DataQuery FIREWORK_SHAPE = of("Type");
public static final DataQuery FIREWORK_COLORS = of("Colors");
public static final DataQuery FIREWORK_FADE_COLORS = of("Fades");
public static final DataQuery FIREWORK_TRAILS = of("Trails");
public static final DataQuery FIREWORK_FLICKERS = of("Flickers");
public static final String FIREWORKS = "Fireworks";
public static final String EXPLOSIONS = "Explosions";
public static final String FADE_COLORS = "FadeColors";
public static final String COLORS = "Colors";
public static final String FLICKER = "Flicker";
public static final String TRAIL = "Trail";
public static final String SHAPE_TYPE = "Type";
public static final String FLIGHT = "Flight";
}
}
public static final class Recipe {
public static final String GROUP = "group";
public static final String RESULT = "result";
public static final String ITEM = "item";
public static final String CATEGORY = "category";
public static final String COUNT = "count";
public static final String SPONGE_TYPE = "sponge:type";
public static final String SPONGE_ID = "sponge:id";
public static final String SPONGE_RESULT = "sponge:result";
public static final String SPONGE_RESULTFUNCTION = "sponge:result_function";
public static final String SPONGE_REMAINING_ITEMS = "sponge:remaining_items";
public static final String COOKING_EXP = "experience";
public static final String COOKING_TIME = "cookingtime";
public static final String COOKING_INGREDIENT = "ingredient";
public static final String STONECUTTING_INGREDIENT = "ingredient";
public static final String SMITHING_BASE_INGREDIENT = "base";
public static final String SMITHING_TEMPLATE_INGREDIENT = "template";
public static final String SMITHING_ADDITION_INGREDIENT = "addition";
public static final String SHAPED_PATTERN = "pattern";
public static final String SHAPED_INGREDIENTS = "key";
public static final String SHAPELESS_INGREDIENTS = "ingredients";
}
public static final class TileEntity {
public static final String SIGN = "Sign";
public static final String X_POS = "x";
public static final String Y_POS = "y";
public static final String Z_POS = "z";
// TileEntities
public static final DataQuery TILE_TYPE = of("TileType");
public static final DataQuery LOCK_CODE = of("Lock");
public static final DataQuery ITEM_CONTENTS = of("Contents");
public static final DataQuery SLOT = of("SlotId");
public static final DataQuery SLOT_ITEM = of("Item");
public static final DataQuery LOCKABLE_CONTAINER_CUSTOM_NAME = of("CustomName");
// TileEntity names
public static final DataQuery CUSTOM_NAME = of("CustomName");
public static final class Structure {
// Structure block entity
public static final String DEFAULT_STRUCTURE_AUTHOR = ""; // intentionally empty, as in vanilla
public static final boolean DEFAULT_STRUCTURE_IGNORE_ENTITIES = true;
public static final Supplier<StructureMode> DEFAULT_STRUCTURE_MODE = StructureModes.DATA;
public static final Vector3i DEFAULT_STRUCTURE_POSITION = Vector3i.ONE;
public static final boolean DEFAULT_STRUCTURE_POWERED = false;
public static final boolean DEFAULT_STRUCTURE_SHOW_AIR = false;
public static final long DEFAULT_STRUCTURE_SEED = 0L;
public static final Vector3i DEFAULT_STRUCTURE_SIZE = Vector3i.ONE;
}
public static final class Spawner {
public static final short DEFAULT_SPAWN_COUNT = 4;
public static final short DEFAULT_MAXMIMUM_NEARBY_ENTITIES = 6;
}
public static final class Furnace {
public static final int MAX_BURN_TIME = 1600;
public static final int DEFAULT_COOK_TIME = 200;
public static final DataQuery BURN_TIME = of("BurnTime");
public static final DataQuery BURN_TIME_TOTAL = of("BurnTimeTotal");
public static final DataQuery COOK_TIME = of("CookTime");
public static final DataQuery COOK_TIME_TOTAL = of("CookTimeTotal");
}
public static final class Banner {
public static final String BANNER_PATTERN_ID = "Pattern";
public static final String BANNER_PATTERN_COLOR = "Color";
public static final String BANNER_BASE = "Base";
public static final String BANNER_PATTERNS = "Patterns";
// Banners
public static final DataQuery BASE = of("Base");
// BannerPatterns
public static final DataQuery SHAPE = of("BannerShapeId");
public static final DataQuery COLOR = of("DyeColor");
}
public static final class CommandBlock {
// Commands
public static final DataQuery SUCCESS_COUNT = of("SuccessCount");
public static final DataQuery DOES_TRACK_OUTPUT = of("DoesTrackOutput");
public static final DataQuery STORED_COMMAND = of("StoredCommand");
public static final DataQuery TRACKED_OUTPUT = of("TrackedOutput");
}
public static final class Hopper {
public static final DataQuery TRANSFER_COOLDOWN = of("TransferCooldown");
}
public static final class Beacon {
// Beacons
public static final DataQuery PRIMARY = of("primary");
public static final DataQuery SECONDARY = of("secondary");
}
public static final class Anvils {
// UpdateAnvilEventCost
public static final DataQuery MATERIALCOST = DataQuery.of("materialcost");
public static final DataQuery LEVELCOST = DataQuery.of("levelcost");
}
public static final class Sign {
public static final DataQuery LINES = of("SignLines");
public static final DataQuery GLOWING_TEXT = of("GlowingText");
}
}
public static final class Catalog {
public static final Supplier<DyeColor> DEFAULT_SHULKER_COLOR = DyeColors.PURPLE;
public static final Supplier<ComparatorMode> DEFAULT_COMPARATOR_MODE = ComparatorModes.COMPARE;
public static final Supplier<GameMode> DEFAULT_GAMEMODE = GameModes.SURVIVAL;
public static final Supplier<ArtType> DEFAULT_ART = ArtTypes.KEBAB;
public static final Supplier<HandPreference> DEFAULT_HAND = HandPreferences.RIGHT;
private Catalog() {
}
}
public static final class Profile {
public static final DataQuery UUID = of("UUID");
public static final DataQuery NAME = of("Name");
public static final DataQuery PROPERTIES = DataQuery.of("Properties");
public static final DataQuery VALUE = DataQuery.of("Value");
public static final DataQuery SIGNATURE = DataQuery.of("Signature");
}
public static final class Entity {
public static final String LIGHTNING_EFFECT = "effect";
public static final int ELYTRA_FLYING_FLAG = 7;
public static final int MINIMUM_FIRE_TICKS = 1;
public static final boolean DEFAULT_GLOWING = false;
public static final BlockPos HANGING_OFFSET_EAST = new BlockPos(1, 1, 0);
public static final BlockPos HANGING_OFFSET_WEST = new BlockPos(-1, 1, 0);
public static final BlockPos HANGING_OFFSET_NORTH = new BlockPos(0, 1, -1);
public static final BlockPos HANGING_OFFSET_SOUTH = new BlockPos(0, 1, 1);
// These are used by Minecraft's internals for entity spawning
public static final String ENTITY_TYPE_ID = "id";
public static final String ENTITY_POSITION = "Pos";
public static final String ENTITY_DIMENSION = "Dimension";
public static final String ENTITY_ROTATION = "Rotation";
public static final String ENTITY_UUID = "UUID";
// Entities
public static final DataQuery CLASS = of("EntityClass");
public static final DataQuery UUID = of("EntityUniqueId");
public static final DataQuery TYPE = of("EntityType");
public static final DataQuery ROTATION = of("Rotation");
public static final DataQuery SCALE = of("Scale");
public static final DataQuery CUSTOM_NAME = of("CustomName");
public static final class Ageable {
public static final int ADULT = 6000;
public static final int CHILD = -24000;
}
public static final class Boat {
public static final String BOAT_MAX_SPEED = "maxSpeed";
public static final String BOAT_MOVE_ON_LAND = "moveOnLand";
public static final String BOAT_OCCUPIED_DECELERATION_SPEED = "occupiedDecelerationSpeed";
public static final String BOAT_UNOCCUPIED_DECELERATION_SPEED = "unoccupiedDecelerationSpeed";
public static final float DEFAULT_MAX_SPEED = 0.9f;
public static final double OCCUPIED_DECELERATION_SPEED = 0D;
public static final double UNOCCUPIED_DECELERATION_SPEED = 0.8D;
public static final boolean MOVE_ON_LAND = false;
}
public static final class Creeper {
public static final int DEFAULT_EXPLOSION_RADIUS = 3;
public static final int STATE_IDLE = -1;
public static final int STATE_PRIMED = 1;
public static final int FUSE_DURATION = 30;
}
public static final class EnderCrystal {
public static final int DEFAULT_EXPLOSION_STRENGTH = 6;
}
public static final class FallingBlock {
public static final double DEFAULT_MAX_FALL_DAMAGE = 40;
public static final int DEFAULT_FALL_TIME = 1;
public static final boolean DEFAULT_CAN_HURT_ENTITIES = false;
}
public static final class Fireball {
public static final int DEFAULT_EXPLOSION_RADIUS = 1;
}
public static final class Firework {
public static final int DEFAULT_EXPLOSION_RADIUS = 0;
public static final String EXPLOSION = "Explosion";
}
public static final class Horse {
public static final Supplier<HorseStyle> DEFAULT_STYLE = HorseStyles.NONE;
public static final Supplier<HorseColor> DERAULT_TYPE = HorseColors.WHITE;
private Horse() {
}
}
public static final class Item {
public static final int MAX_PICKUP_DELAY = Short.MAX_VALUE;
public static final int DEFAULT_PICKUP_DELAY = 0;
public static final double DEFAULT_ITEM_MERGE_RADIUS = 0.5D;
public static final int MIN_DESPAWN_DELAY = Short.MIN_VALUE;
public static final int MAGIC_NO_PICKUP = Constants.Entity.Item.MAX_PICKUP_DELAY;
public static final int MAGIC_NO_DESPAWN = Constants.Entity.Item.MIN_DESPAWN_DELAY;
public static final int INFINITE_PICKUP_DELAY = 32767;
private Item() {
}
}
public static final class Llama {
public static final Supplier<LlamaType> DEFAULT_TYPE = LlamaTypes.WHITE;
}
public static final class Minecart {
public static final double DEFAULT_AIRBORNE_MOD = 0.94999998807907104D;
public static final double DEFAULT_DERAILED_MOD = 0.5D;
public static final String MINECART_TYPE = "Type";
public static final double DEFAULT_MAX_SPEED = 0.4D;
public static final double DEFAULT_FURNACE_MAX_SPEED = 0.2D;
public static final String MAX_SPEED = "maxSpeed";
public static final String SLOW_WHEN_EMPTY = "slowWhenEmpty";
public static final String AIRBORNE_MODIFIER = "airborneModifier";
public static final String DERAILED_MODIFIER = "derailedModifier";
public static final int DEFAULT_FUSE_DURATION = 80;
}
public static final class Cat {
public static final Supplier<CatType> DEFAULT_TYPE = CatTypes.WHITE;
}
public static final class Panda {
public static final int UNHAPPY_TIME = 32;
}
public static final class Parrot {
public static final Supplier<ParrotType> DEFAULT_TYPE = ParrotTypes.RED_BLUE;
}
public static final class Player {
public static final double DEFAULT_FLYING_SPEED = 0.05D;
public static final double DEFAULT_HEALTH_SCALE = 20D;
public static final String INVENTORY = "Inventory";
public static final String INVULNERABLE = "Invulnerable";
public static final String SELECTED_ITEM_SLOT = "SelectedItemSlot";
public static final String ENDERCHEST_INVENTORY = "EnderItems";
// User
public static final DataQuery UUID = of("UUID");
public static final DataQuery NAME = of("Name");
public static final DataQuery SPAWNS = of("Spawns");
public static final float PLAYER_WIDTH = 0.6F;
public static final float PLAYER_HEIGHT = 1.8F;
public static final int TRACKING_RANGE = 32;
public static final float PLAYER_Y_OFFSET = -0.35F;
public static final class Abilities {
public static final DataQuery IS_FLYING = of("abilities", "flying");
public static final DataQuery CAN_FLY = of("abilities", "mayfly");
}
}
public static final class PrimedTNT {
public static final int DEFAULT_EXPLOSION_RADIUS = 4;
public static final int DEFAULT_FUSE_DURATION = 80;
}
public static final class Rabbit {
public static final Supplier<RabbitType> DEFAULT_TYPE = RabbitTypes.WHITE;
}
public static final class Ravager {
public static final int ROAR_TIME = 10;
}
public static final class Wither {
public static final int DEFAULT_FUSE_DURATION = 220;
}
public static final class WitherSkull {
public static final int DEFAULT_EXPLOSION_RADIUS = 1;
public static final float DEFAULT_WITHER_CREATED_SKULL_DAMAGE = 8.0f;
public static final float DEFAULT_NO_SOURCE_SKULL_DAMAGE = 5.0f;
}
}
public static final class BlockChangeFlags {
/* TODO - Re-evaluate how the flags are used, The current flow of a World#setBlockState with an example of 3
goes as follows:
(3 & 2 != 0) && (!world.isClientSide || 3 & 4 == 0) && (world.isClientSide || chunk.getLocationType().isTicking) ? world.notifyBlockUpdate() (send update to client)
(!world.isClientSide && (3 & 1 != 0)) ? world.notifyNeighbors()
3 & 16 == 0 ? {
newFlag = 3 & -2 = 2;
originalState.updateDiagonal(world, pos, 2);
newState.notifyNeighbors(world, pos, 2);
newState.updateDiagonalNeighbors(world, pos, 2);
}
The tricky part is in the updateDiagonal and notifyNeighbors, currently updateDiagonal is used by redstone wire
to update placement of diagonally oriented neighboring blocks, and of course, it's a -2 anded, so it's negating the client notification update
for any new blocks changed, but retaining neighbor updates
notifyNeighbors however is slightly different:
it goes through to update neighboring blocks on the new state's position in relation to the neighbor's state based on the neighbor's decision of what block state it should replace itself with, and as usual
disabling the neighbor notification since the flag is already anded with -2 (2's complement)
The bigger issue here though is that Block.replaceBlock does some really silly things:
if the new state is air, it will do a world.destroyBlock(pos, 2 & 32 == 0 [true]) to drop the old block
Otherwise, the world.setBlockState(pos, newState, 2 & -33 [ basically says to allow future breakages and update neighbors] )
*/
/**
* Calls {@link net.minecraft.world.level.Level#blockUpdated(BlockPos, net.minecraft.world.level.block.Block)}
* if the flag is set.
*/
public static final int BLOCK_UPDATED = 1 << 0; // 1
/**
* Calls {@link net.minecraft.world.level.Level#sendBlockUpdated(BlockPos, BlockState, BlockState, int)}
* if the flag is set (which is basically notifying clients).
*/
public static final int NOTIFY_CLIENTS = 1 << 1; // 2
/**
* Stops the blocks from being marked for a render update if set (defaults to flag & 4 == 0)
*/
public static final int IGNORE_RENDER = 1 << 2; // 4
/**
* Makes the block be re-rendered immediately, on the main thread.
* If {@link #IGNORE_RENDER} is set, then this will be ignored.
*/
public static final int FORCE_RE_RENDER = 1 << 3; // 8
/**
* Causes neighboring states to be notified of changes (including diagonal positions),
* which effectively calls
* {@link net.minecraft.world.level.block.state.BlockState#updateNeighbourShapes(LevelAccessor, BlockPos, int)}
* and
* {@link net.minecraft.world.level.block.state.BlockState#updateIndirectNeighbourShapes(LevelAccessor, BlockPos, int)}
* if unset (defaults to flag & 16 == 0)
*/
public static final int DENY_NEIGHBOR_SHAPE_UPDATE = 1 << 4; // 16
/**
* If unset, allows for a block being destroyed to drop itself, used in
* {@link net.minecraft.world.level.block.Block#updateOrDestroy(BlockState, BlockState, LevelAccessor, BlockPos, int, int)}.
*/
public static final int NEIGHBOR_DROPS = 1 << 5; // 32
/**
* Tell the block being changed that it's being moved, rather than being replaced/removed.
* The flag, if set, is set as a boolean to {@link BlockState#onPlace(Level, BlockPos, BlockState, boolean)}
* by means of calling
* {@link net.minecraft.world.level.chunk.LevelChunk#setBlockState(BlockPos, BlockState, boolean)}
*/
public static final int BLOCK_MOVING = 1 << 6; // 64
/**
* Used in {@link Level#setBlock(BlockPos, BlockState, int)} as {@code (var3 & 128) == 0} to
* check if lighting is queued for the block change.
*/
public static final int LIGHTING_UPDATES = 1 << 7; // 128 if set, blocks lighting updates
public static final int PHYSICS_MASK = 1 << 31; // Sponge Added mask, because vanilla doesn't support it yet
public static final int PATHFINDING_UPDATES = 1 << 30; // Sponge Added mask, because vanilla doesn't allow bypassing notifications to ai pathfinders
public static final int PERFORM_BLOCK_DESTRUCTION = 1 << 29; // Sponge Added mask, because vanilla doesn't support it yet
public static final int MASK = Constants.BlockChangeFlags.BLOCK_UPDATED
| Constants.BlockChangeFlags.NOTIFY_CLIENTS
| Constants.BlockChangeFlags.IGNORE_RENDER
| Constants.BlockChangeFlags.FORCE_RE_RENDER
| Constants.BlockChangeFlags.DENY_NEIGHBOR_SHAPE_UPDATE
| Constants.BlockChangeFlags.NEIGHBOR_DROPS
| Constants.BlockChangeFlags.BLOCK_MOVING
| Constants.BlockChangeFlags.LIGHTING_UPDATES
| Constants.BlockChangeFlags.PHYSICS_MASK
| Constants.BlockChangeFlags.PATHFINDING_UPDATES
| Constants.BlockChangeFlags.PERFORM_BLOCK_DESTRUCTION
;
// All of these flags are what we "expose" to the API