forked from DarkholmeTenk/WarpDrive
-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathWarpDriveConfig.java
1916 lines (1671 loc) · 119 KB
/
WarpDriveConfig.java
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
package cr0s.warpdrive.config;
import cr0s.warpdrive.Commons;
import cr0s.warpdrive.WarpDrive;
import cr0s.warpdrive.api.IBlockTransformer;
import cr0s.warpdrive.compat.CompatActuallyAdditions;
import cr0s.warpdrive.compat.CompatAdvancedRepulsionSystems;
import cr0s.warpdrive.compat.CompatAppliedEnergistics2;
import cr0s.warpdrive.compat.CompatArsMagica2;
import cr0s.warpdrive.compat.CompatBiblioCraft;
import cr0s.warpdrive.compat.CompatBlockcraftery;
import cr0s.warpdrive.compat.CompatBotania;
import cr0s.warpdrive.compat.CompatBuildCraft;
import cr0s.warpdrive.compat.CompatCarpentersBlocks;
import cr0s.warpdrive.compat.CompatComputerCraft;
import cr0s.warpdrive.compat.CompatCustomNPCs;
import cr0s.warpdrive.compat.CompatDecocraft;
import cr0s.warpdrive.compat.CompatDeepResonance;
import cr0s.warpdrive.compat.CompatDraconicEvolution;
import cr0s.warpdrive.compat.CompatEmbers;
import cr0s.warpdrive.compat.CompatEnderIO;
import cr0s.warpdrive.compat.CompatEnergyControl;
import cr0s.warpdrive.compat.CompatEnvironmentalTech;
import cr0s.warpdrive.compat.CompatEvilCraft;
import cr0s.warpdrive.compat.CompatExtraUtilities2;
import cr0s.warpdrive.compat.CompatForgeMultipart;
import cr0s.warpdrive.compat.CompatGalacticraft;
import cr0s.warpdrive.compat.CompatGregTech;
import cr0s.warpdrive.compat.CompatImmersiveEngineering;
import cr0s.warpdrive.compat.CompatIndustrialCraft2;
import cr0s.warpdrive.compat.CompatIndustrialForegoing;
import cr0s.warpdrive.compat.CompatIronChest;
import cr0s.warpdrive.compat.CompatMekanism;
import cr0s.warpdrive.compat.CompatMetalChests;
import cr0s.warpdrive.compat.CompatMysticalAgriculture;
import cr0s.warpdrive.compat.CompatNatura;
import cr0s.warpdrive.compat.CompatOpenComputers;
import cr0s.warpdrive.compat.CompatParziStarWars;
import cr0s.warpdrive.compat.CompatPneumaticCraft;
import cr0s.warpdrive.compat.CompatRealFilingCabinet;
import cr0s.warpdrive.compat.CompatRedstonePaste;
import cr0s.warpdrive.compat.CompatRefinedStorage;
import cr0s.warpdrive.compat.CompatRoots;
import cr0s.warpdrive.compat.CompatRustic;
import cr0s.warpdrive.compat.CompatSGCraft;
import cr0s.warpdrive.compat.CompatStorageDrawers;
import cr0s.warpdrive.compat.CompatTConstruct;
import cr0s.warpdrive.compat.CompatTechguns;
import cr0s.warpdrive.compat.CompatThaumcraft;
import cr0s.warpdrive.compat.CompatThermalDynamics;
import cr0s.warpdrive.compat.CompatThermalExpansion;
import cr0s.warpdrive.compat.CompatUndergroundBiomes;
import cr0s.warpdrive.compat.CompatVariedCommodities;
import cr0s.warpdrive.compat.CompatWarpDrive;
import cr0s.warpdrive.compat.CompatWoot;
import cr0s.warpdrive.config.structures.StructureManager;
import cr0s.warpdrive.data.CelestialObject;
import cr0s.warpdrive.data.CelestialObjectManager;
import cr0s.warpdrive.data.EnergyWrapper;
import cr0s.warpdrive.data.EnumShipMovementType;
import cr0s.warpdrive.data.EnumDisplayAlignment;
import cr0s.warpdrive.data.EnumTier;
import cr0s.warpdrive.data.EnumTooltipCondition;
import cr0s.warpdrive.network.PacketHandler;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.JsonToNBT;
import net.minecraft.nbt.NBTException;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.common.ForgeModContainer;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.oredict.OreDictionary;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXParseException;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
public class WarpDriveConfig {
private static final boolean unused = false; // TODO
private static String stringConfigDirectory;
private static File fileConfigDirectory;
private static DocumentBuilder xmlDocumentBuilder;
private static final String[] defaultXML_fillerSets = {
"fillerSets-default.xml",
"fillerSets-GTCEu.xml",
"fillerSets-netherores.xml",
"fillerSets-undergroundbiomes.xml",
"fillerSets-undergroundBiomes_GTCEu.xml",
};
private static final String[] defaultXML_lootSets = {
"lootSets-default.xml",
};
private static final String[] defaultXML_schematicSets = {
"schematicSets-default.xml",
};
private static final String[] defaultXML_structures = {
"structures-default.xml",
"structures-netherores.xml",
"structures-ship.xml",
};
private static final String[] defaultXML_celestialObjects = {
"celestialObjects-default.xml",
"celestialObjects-Galacticraft+ExtraPlanets.xml",
};
private static final String[] defaultSchematics = {
"default-legacy_1.schematic",
"default-legacy_2.schematic",
};
public static GenericSetManager<Filler> FillerManager = new GenericSetManager<>("filler", "filler", "fillerSet", Filler.DEFAULT);
public static GenericSetManager<Loot> LootManager = new GenericSetManager<>("loot", "loot", "lootSet", Loot.DEFAULT);
/*
* The variables which store whether or not individual mods are loaded
*/
public static boolean isAdvancedRepulsionSystemLoaded = false;
public static boolean isRedstoneFluxLoaded = false;
public static boolean isComputerCraftLoaded = false;
public static boolean isCCTweakedLoaded = false;
public static boolean isEnderIOLoaded = false;
public static boolean isForgeMultipartLoaded = false;
public static boolean isGregtechLoaded = false;
public static boolean isICBMClassicLoaded = false;
public static boolean isIndustrialCraft2Loaded = false;
public static boolean isMatterOverdriveLoaded = false;
public static boolean isNotEnoughItemsLoaded = false;
public static boolean isOpenComputersLoaded = false;
public static boolean isThermalExpansionLoaded = false;
public static boolean isThermalFoundationLoaded = false;
public static ItemStack IC2_compressedAir;
public static ItemStack IC2_emptyCell;
public static Block IC2_rubberWood;
public static ItemStack IC2_Resin;
// Mod configuration (see loadConfig() for comments/definitions)
// General
public static int G_SPACE_BIOME_ID = 95;
public static int G_SPACE_PROVIDER_ID = 14;
public static int G_HYPERSPACE_PROVIDER_ID = 15;
public static int G_ENTITY_SPHERE_GENERATOR_ID = 241;
public static int G_ENTITY_STAR_CORE_ID = 242;
public static int G_ENTITY_CAMERA_ID = 243;
public static int G_ENTITY_PARTICLE_BUNCH_ID = 244;
public static int G_ENTITY_LASER_EXPLODER_ID = 245;
public static int G_ENTITY_NPC_ID = 246;
public static int G_ENTITY_OFFLINE_AVATAR_ID = 247;
public static int G_ENTITY_SEAT_ID = 248;
public static final int LUA_SCRIPTS_NONE = 0;
public static final int LUA_SCRIPTS_TEMPLATES = 1;
public static final int LUA_SCRIPTS_ALL = 2;
public static int G_LUA_SCRIPTS = LUA_SCRIPTS_ALL;
public static String G_SCHEMATICS_LOCATION = "warpDrive_schematics";
private static int G_ASSEMBLY_SCAN_INTERVAL_SECONDS = 10;
public static int G_ASSEMBLY_SCAN_INTERVAL_TICKS = 20 * WarpDriveConfig.G_ASSEMBLY_SCAN_INTERVAL_SECONDS;
public static int G_PARAMETERS_UPDATE_INTERVAL_TICKS = 20;
private static int G_REGISTRY_UPDATE_INTERVAL_SECONDS = 10;
public static int G_REGISTRY_UPDATE_INTERVAL_TICKS = 20 * WarpDriveConfig.G_REGISTRY_UPDATE_INTERVAL_SECONDS;
public static boolean G_ENFORCE_VALID_CELESTIAL_OBJECTS = true;
public static int G_BLOCKS_PER_TICK = 3500;
public static boolean G_ENABLE_FAST_SET_BLOCKSTATE = false;
public static boolean G_ENABLE_PROTECTION_CHECKS = true;
public static boolean G_ENABLE_EXPERIMENTAL_REFRESH = false;
public static boolean G_ENABLE_EXPERIMENTAL_UNLOAD = true;
public static int G_MINIMUM_DIMENSION_UNLOAD_QUEUE_DELAY = 100;
public static boolean G_ENABLE_FORGE_CHUNK_MANAGER = true;
public static float G_BLAST_RESISTANCE_CAP = 60.0F;
// Client
public static boolean CLIENT_BREATHING_OVERLAY_FORCED = true;
public static float CLIENT_LOCATION_SCALE = 1.0F;
public static String CLIENT_LOCATION_NAME_PREFIX = "§l";
public static int CLIENT_LOCATION_BACKGROUND_COLOR = Commons.colorARGBtoInt(64, 48, 48, 48);
public static int CLIENT_LOCATION_TEXT_COLOR = Commons.colorARGBtoInt(230, 180, 180, 240);
public static boolean CLIENT_LOCATION_HAS_SHADOW = true;
public static EnumDisplayAlignment CLIENT_LOCATION_SCREEN_ALIGNMENT = EnumDisplayAlignment.MIDDLE_RIGHT;
public static int CLIENT_LOCATION_SCREEN_OFFSET_X = 0;
public static int CLIENT_LOCATION_SCREEN_OFFSET_Y = -20;
public static EnumDisplayAlignment CLIENT_LOCATION_TEXT_ALIGNMENT = EnumDisplayAlignment.TOP_RIGHT;
public static float CLIENT_LOCATION_WIDTH_RATIO = 0.0F;
public static int CLIENT_LOCATION_WIDTH_MIN = 90;
// Tooltip
public static EnumTooltipCondition TOOLTIP_ENABLE_DEDUPLICATION = EnumTooltipCondition.ALWAYS;
public static String[] TOOLTIP_CLEANUP_LIST = new String[] {
"fuel details",
"burn time",
"durability"
};
public static EnumTooltipCondition TOOLTIP_ADD_REGISTRY_NAME = EnumTooltipCondition.ADVANCED_TOOLTIPS;
public static EnumTooltipCondition TOOLTIP_ADD_ORE_DICTIONARY_NAME = EnumTooltipCondition.ALWAYS;
public static EnumTooltipCondition TOOLTIP_ADD_ARMOR_POINTS = EnumTooltipCondition.NEVER;
public static EnumTooltipCondition TOOLTIP_ADD_BLOCK_MATERIAL = EnumTooltipCondition.ADVANCED_TOOLTIPS;
public static EnumTooltipCondition TOOLTIP_ADD_BURN_TIME = EnumTooltipCondition.ADVANCED_TOOLTIPS;
public static EnumTooltipCondition TOOLTIP_ADD_DURABILITY = EnumTooltipCondition.ALWAYS;
public static EnumTooltipCondition TOOLTIP_ADD_ENCHANTABILITY = EnumTooltipCondition.ON_SNEAK;
public static EnumTooltipCondition TOOLTIP_ADD_ENTITY_ID = EnumTooltipCondition.ADVANCED_TOOLTIPS;
public static EnumTooltipCondition TOOLTIP_ADD_FLAMMABILITY = EnumTooltipCondition.ADVANCED_TOOLTIPS;
public static EnumTooltipCondition TOOLTIP_ADD_FLUID = EnumTooltipCondition.ALWAYS;
public static EnumTooltipCondition TOOLTIP_ADD_HARDNESS = EnumTooltipCondition.ADVANCED_TOOLTIPS;
public static EnumTooltipCondition TOOLTIP_ADD_HARVESTING = EnumTooltipCondition.ALWAYS;
public static EnumTooltipCondition TOOLTIP_ADD_OPACITY = EnumTooltipCondition.ADVANCED_TOOLTIPS;
public static EnumTooltipCondition TOOLTIP_ADD_REPAIR_WITH = EnumTooltipCondition.ON_SNEAK;
// Logging
public static long LOGGING_THROTTLE_MS = 5000L;
public static boolean LOGGING_JUMP = true;
public static boolean LOGGING_JUMPBLOCKS = false;
public static boolean LOGGING_ENERGY = false;
public static boolean LOGGING_EFFECTS = false;
public static boolean LOGGING_CLOAKING = false;
public static boolean LOGGING_VIDEO_CHANNEL = false;
public static boolean LOGGING_TARGETING = false;
public static boolean LOGGING_WEAPON = false;
public static boolean LOGGING_CAMERA = false;
public static boolean LOGGING_BUILDING = false;
public static boolean LOGGING_COLLECTION = false;
public static boolean LOGGING_TRANSPORTER = false;
public static boolean LOGGING_LUA = false;
public static boolean LOGGING_RADAR = false;
public static boolean LOGGING_BREATHING = false;
public static boolean LOGGING_WORLD_GENERATION = false;
public static boolean LOGGING_PROFILING_CPU_USAGE = true;
public static boolean LOGGING_PROFILING_MEMORY_ALLOCATION = false;
public static boolean LOGGING_PROFILING_THREAD_SAFETY = false;
public static boolean LOGGING_DICTIONARY = false;
public static boolean LOGGING_GLOBAL_REGION_REGISTRY = false;
public static boolean LOGGING_BREAK_PLACE = false;
public static boolean LOGGING_FORCE_FIELD = false;
public static boolean LOGGING_FORCE_FIELD_REGISTRY = false;
public static boolean LOGGING_ACCELERATOR = false;
public static boolean LOGGING_XML_PREPROCESSOR = false;
public static boolean LOGGING_RENDERING = false;
public static boolean LOGGING_CHUNK_HANDLER = false;
public static boolean LOGGING_CHUNK_RELOADING = false;
public static boolean LOGGING_CHUNK_LOADING = true;
public static boolean LOGGING_ENTITY_FX = false;
public static boolean LOGGING_CLIENT_SYNCHRONIZATION = false;
public static boolean LOGGING_GRAVITY = false;
public static boolean LOGGING_OFFLINE_AVATAR = true;
// Energy
public static String ENERGY_DISPLAY_UNITS = "RF";
public static boolean ENERGY_ENABLE_IC2_EU = true;
public static boolean ENERGY_ENABLE_FE = true;
public static boolean ENERGY_ENABLE_GTCE_EU = true;
public static boolean ENERGY_ENABLE_RF = true;
public static float ENERGY_OVERVOLTAGE_SHOCK_FACTOR = 1.0F;
public static float ENERGY_OVERVOLTAGE_EXPLOSION_FACTOR = 1.0F;
public static int ENERGY_SCAN_INTERVAL_TICKS = 20;
// Space generator
public static int SPACE_GENERATOR_Y_MIN_CENTER = 55;
public static int SPACE_GENERATOR_Y_MAX_CENTER = 128;
public static int SPACE_GENERATOR_Y_MIN_BORDER = 5;
public static int SPACE_GENERATOR_Y_MAX_BORDER = 200;
// Ship movement costs
public static ShipMovementCosts.Factors[] SHIP_MOVEMENT_COSTS_FACTORS = null;
// Ship
public static int[] SHIP_MAX_ENERGY_STORED_BY_TIER = { 0, 500000, 10000000, 100000000 };
public static int[] SHIP_MASS_MAX_BY_TIER = { 2000000, 3456, 13824, 110592 };
public static int[] SHIP_MASS_MIN_BY_TIER = { 0, 64, 1728, 6912 };
public static int SHIP_MASS_MAX_ON_PLANET_SURFACE = 3000;
public static int SHIP_MASS_MIN_FOR_HYPERSPACE = 4000;
public static int[] SHIP_SIZE_MAX_PER_SIDE_BY_TIER = { 127, 24, 48, 96 };
public static int SHIP_COLLISION_TOLERANCE_BLOCKS = 3;
public static int SHIP_WARMUP_RANDOM_TICKS = 60;
public static int SHIP_VOLUME_SCAN_BLOCKS_PER_TICK = 1000;
public static int SHIP_VOLUME_SCAN_AGE_TOLERANCE_SECONDS = 120;
public static String[] SHIP_MASS_UNLIMITED_PLAYER_NAMES = { "notch", "someone" };
// Jump gate
public static int[] JUMP_GATE_SIZE_MAX_PER_SIDE_BY_TIER = { 127, 32, 64, 127 };
// Biometric scanner
public static int BIOMETRIC_SCANNER_DURATION_TICKS = 100;
public static int BIOMETRIC_SCANNER_RANGE_BLOCKS = 3;
// Camera
public static int CAMERA_IMAGE_RECOGNITION_INTERVAL_TICKS = 20;
public static int CAMERA_RANGE_BASE_BLOCKS = 0;
public static int CAMERA_RANGE_UPGRADE_BLOCKS = 8;
public static int CAMERA_RANGE_UPGRADE_MAX_QUANTITY = 8;
// Offline avatar
public static boolean OFFLINE_AVATAR_ENABLE = true;
public static boolean OFFLINE_AVATAR_CREATE_ONLY_ABOARD_SHIPS = true;
public static boolean OFFLINE_AVATAR_FORGET_ON_DEATH = false;
public static float OFFLINE_AVATAR_MODEL_SCALE = 0.5F;
public static boolean OFFLINE_AVATAR_ALWAYS_RENDER_NAME_TAG = false;
public static float OFFLINE_AVATAR_MIN_RANGE_FOR_REMOVAL = 1.0F;
public static float OFFLINE_AVATAR_MAX_RANGE_FOR_REMOVAL = 5.0F;
public static int OFFLINE_AVATAR_DELAY_FOR_REMOVAL_SECONDS = 1;
public static int OFFLINE_AVATAR_DELAY_FOR_REMOVAL_TICKS = 20 * OFFLINE_AVATAR_DELAY_FOR_REMOVAL_SECONDS;
// Radar
public static int RADAR_MAX_ENERGY_STORED = 100000000; // 100kk eU
public static int RADAR_SCAN_MIN_ENERGY_COST = 10000;
public static double[] RADAR_SCAN_ENERGY_COST_FACTORS = { 0.0, 0.0, 0.0, 0.0001 };
public static int RADAR_SCAN_MIN_DELAY_SECONDS = 1;
public static double[] RADAR_SCAN_DELAY_FACTORS_SECONDS = { 1.0, 0.001, 0.0, 0.0 };
public static int RADAR_MAX_ISOLATION_RANGE = 2;
public static int RADAR_MIN_ISOLATION_BLOCKS = 2;
public static int RADAR_MAX_ISOLATION_BLOCKS = 16;
public static double RADAR_MIN_ISOLATION_EFFECT = 0.12;
public static double RADAR_MAX_ISOLATION_EFFECT = 1.00;
// Siren
public static float[] SIREN_RANGE_BLOCKS_BY_TIER = { 0.0F, 32.0F, 64.0F, 128.0F };
// Speaker
public static float[] SPEAKER_RANGE_BLOCKS_BY_TIER = { 0.0F, 16.0F, 32.0F, 64.0F };
public static float SPEAKER_QUEUE_MAX_MESSAGES = 12;
public static float SPEAKER_RATE_MAX_MESSAGES = 3;
public static int SPEAKER_RATE_PERIOD_TICKS = 60;
// Ship Scanner
public static int SS_MAX_DEPLOY_RADIUS_BLOCKS = 100;
public static int SS_SEARCH_INTERVAL_TICKS = 20;
public static int SS_SCAN_BLOCKS_PER_SECOND = 10;
public static int SS_DEPLOY_BLOCKS_PER_INTERVAL = 10;
public static int SS_DEPLOY_INTERVAL_TICKS = 4;
// Virtual Assistant
public static int[] VIRTUAL_ASSISTANT_ENERGY_PER_TICK_BY_TIER = { 0, 10, 40, 160 };
public static boolean VIRTUAL_ASSISTANT_HIDE_COMMANDS_IN_CHAT = false;
public static int[] VIRTUAL_ASSISTANT_MAX_ENERGY_STORED_BY_TIER = { 1000000, 10000, 30000, 100000 };
public static float[] VIRTUAL_ASSISTANT_RANGE_BLOCKS_BY_TIER = { 0.0F, 32.0F, 64.0F, 128.0F };
// Laser medium
public static int[] LASER_MEDIUM_MAX_ENERGY_STORED_BY_TIER = { 1000000, 10000, 30000, 100000 };
public static double[] LASER_MEDIUM_FACTOR_BY_TIER = { 1.25D, 0.5D, 1.0D, 1.5D };
// Laser cannon
// 1 main laser + 4 boosting lasers = 10 * 100k + 0.6 * 40 * 100k = 3.4M
public static int LASER_CANNON_MAX_MEDIUMS_COUNT = 10;
public static int LASER_CANNON_MAX_LASER_ENERGY = 3400000;
public static int LASER_CANNON_EMIT_FIRE_DELAY_TICKS = 5;
public static int LASER_CANNON_EMIT_SCAN_DELAY_TICKS = 1;
public static double LASER_CANNON_BOOSTER_BEAM_ENERGY_EFFICIENCY = 0.60D;
public static double LASER_CANNON_ENERGY_ATTENUATION_PER_AIR_BLOCK = 0.000200D;
public static double LASER_CANNON_ENERGY_ATTENUATION_PER_VOID_BLOCK = 0.000005D;
public static double LASER_CANNON_ENERGY_ATTENUATION_PER_BROKEN_BLOCK = 0.23D;
public static int LASER_CANNON_RANGE_MAX = 500;
public static int LASER_CANNON_ENTITY_HIT_SET_ON_FIRE_SECONDS = 20;
public static int LASER_CANNON_ENTITY_HIT_ENERGY = 15000;
public static int LASER_CANNON_ENTITY_HIT_BASE_DAMAGE = 3;
public static int LASER_CANNON_ENTITY_HIT_ENERGY_PER_DAMAGE = 30000;
public static int LASER_CANNON_ENTITY_HIT_MAX_DAMAGE = 100;
public static int LASER_CANNON_ENTITY_HIT_EXPLOSION_ENERGY_THRESHOLD = 900000;
public static float LASER_CANNON_ENTITY_HIT_EXPLOSION_BASE_STRENGTH = 4.0F;
public static int LASER_CANNON_ENTITY_HIT_EXPLOSION_ENERGY_PER_STRENGTH = 125000;
public static float LASER_CANNON_ENTITY_HIT_EXPLOSION_MAX_STRENGTH = 4.0F;
public static int LASER_CANNON_BLOCK_HIT_ENERGY_MIN = 75000;
public static int LASER_CANNON_BLOCK_HIT_ENERGY_PER_BLOCK_HARDNESS = 150000;
public static int LASER_CANNON_BLOCK_HIT_ENERGY_MAX = 750000;
public static double LASER_CANNON_BLOCK_HIT_ABSORPTION_PER_BLOCK_HARDNESS = 0.01;
public static double LASER_CANNON_BLOCK_HIT_ABSORPTION_MAX = 0.80;
public static float LASER_CANNON_BLOCK_HIT_EXPLOSION_HARDNESS_THRESHOLD = 5.0F;
public static float LASER_CANNON_BLOCK_HIT_EXPLOSION_BASE_STRENGTH = 8.0F;
public static int LASER_CANNON_BLOCK_HIT_EXPLOSION_ENERGY_PER_STRENGTH = 125000;
public static float LASER_CANNON_BLOCK_HIT_EXPLOSION_MAX_STRENGTH = 50F;
// Mining laser
// BuildCraft quarry values for reference
// - harvesting one block is 60 MJ/block = 600 RF/block = ~145 EU/block
// - maximum speed is 3.846 ticks per blocks
// - overall consumption varies from 81.801 to 184.608 MJ/block (depending on speed) = up to 1846.08 RF/block = up to ~448 EU/block
// - at radius 5, one layer takes ~465 ticks ((radius * 2 + 1) ^ 2 * 3.846)
// - overall consumption is ((radius * 2 + 1) ^ 2) * 448 => ~ 54208 EU/layer
// WarpDrive mining laser in comparison
// - each mined layer is scanned twice
// - default ore generation: 1 ore out of 25 blocks
// - overall consumption in 'all, space' is energyPerLayer / ((radius * 2 + 1) ^ 2) + energyPerBlock => ~ 356 EU/block in space
// - overall consumption in 'all, space' is energyPerLayer + ((radius * 2 + 1) ^ 2) * energyPerBlock => ~ 43150 EU/layer in space
// - overall consumption in 'ores, space' is energyPerLayer + ((radius * 2 + 1) ^ 2) * energyPerBlock * factorOresOnly / 25 => ~ 28630 EU/layer in space
// - at radius 5, one layer takes (2 * MINING_LASER_SCAN_DELAY_TICKS + MINING_LASER_MINE_DELAY_TICKS * (radius * 2 + 1) ^ 2) => 403 ticks
// Nota: this is only assuming minimum radius of 5 (11x11), with 1 ore for 25 blocks mined.
public static int MINING_LASER_MAX_MEDIUMS_COUNT = 3;
public static int MINING_LASER_RADIUS_NO_LASER_MEDIUM = 4;
public static int MINING_LASER_RADIUS_PER_LASER_MEDIUM = 1;
public static int MINING_LASER_SETUP_UPDATE_PARAMETERS_TICKS = 20;
public static int MINING_LASER_WARMUP_DELAY_TICKS = 20;
public static int MINING_LASER_SCAN_DELAY_TICKS = 20;
public static int MINING_LASER_MINE_DELAY_TICKS = 3;
public static int MINING_LASER_SCAN_ENERGY_PER_LAYER_IN_VOID = 20000;
public static int MINING_LASER_SCAN_ENERGY_PER_LAYER_IN_ATMOSPHERE = 30000;
public static int MINING_LASER_MINE_ENERGY_PER_BLOCK_IN_VOID = 1500;
public static int MINING_LASER_MINE_ENERGY_PER_BLOCK_IN_ATMOSPHERE = 2500;
public static double MINING_LASER_MINE_ORES_ONLY_ENERGY_FACTOR = 15.0; // lower than 25 to encourage keeping the land 'clean', higher than 13 to use more than scanning
public static double MINING_LASER_MINE_SILKTOUCH_ENERGY_FACTOR = 1.5;
public static int MINING_LASER_MINE_SILKTOUCH_DEUTERIUM_MB = 0;
public static double MINING_LASER_MINE_FORTUNE_ENERGY_FACTOR = 1.5;
public static boolean MINING_LASER_PUMP_UPGRADE_HARVEST_FLUID = false;
// Laser tree farm
// oak tree height is 8 to 11 logs + 2 leaves
// dark oak tree height is up to 25 logs + 2 leaves
// jungle tree height is up to 30 logs + 1 leaf
// => basic setup is 8, then 18, then up to 32
public static int TREE_FARM_MAX_MEDIUMS_COUNT = 5;
public static int TREE_FARM_MAX_RADIUS_NO_LASER_MEDIUM = 3;
public static int TREE_FARM_MAX_RADIUS_PER_LASER_MEDIUM = 2;
public static int TREE_FARM_totalMaxRadius = 0;
public static int TREE_FARM_MAX_DISTANCE_NO_LASER_MEDIUM = 8;
public static int TREE_FARM_MAX_DISTANCE_PER_MEDIUM = 6;
public static int TREE_FARM_WARM_UP_DELAY_TICKS = 40;
public static int TREE_FARM_SCAN_DELAY_TICKS = 40;
public static int TREE_FARM_HARVEST_LOG_DELAY_TICKS = 4;
public static int TREE_FARM_BREAK_LEAF_DELAY_TICKS = 2;
public static int TREE_FARM_SILKTOUCH_LEAF_DELAY_TICKS = 4;
public static int TREE_FARM_TAP_WET_SPOT_DELAY_TICKS = 4;
public static int TREE_FARM_TAP_DRY_SPOT_DELAY_TICKS = 1;
public static int TREE_FARM_TAP_RUBBER_LOG_DELAY_TICKS = 6;
public static int TREE_FARM_PLANT_DELAY_TICKS = 2;
public static int TREE_FARM_SCAN_ENERGY_PER_SURFACE = 1;
public static int TREE_FARM_TAP_WET_SPOT_ENERGY_PER_BLOCK = 1;
public static int TREE_FARM_TAP_RUBBER_LOG_ENERGY_PER_BLOCK = 2;
public static int TREE_FARM_HARVEST_LOG_ENERGY_PER_BLOCK = 1;
public static int TREE_FARM_HARVEST_LEAF_ENERGY_PER_BLOCK = 1;
public static int TREE_FARM_SILKTOUCH_LOG_ENERGY_PER_BLOCK = 2;
public static int TREE_FARM_SILKTOUCH_LEAF_ENERGY_PER_BLOCK = 2;
public static int TREE_FARM_PLANT_ENERGY_PER_BLOCK = 1;
// Laser harvester
// @TODO
// Laser pump
// @TODO
// Cloaking
public static int CLOAKING_MAX_ENERGY_STORED = 500000000;
public static int CLOAKING_COIL_CAPTURE_BLOCKS = 5;
public static int CLOAKING_MAX_FIELD_RADIUS = 63;
public static int CLOAKING_TIER1_ENERGY_PER_BLOCK = 32;
public static int CLOAKING_TIER2_ENERGY_PER_BLOCK = 128;
public static int CLOAKING_TIER1_FIELD_REFRESH_INTERVAL_TICKS = 60;
public static int CLOAKING_TIER2_FIELD_REFRESH_INTERVAL_TICKS = 30;
public static int CLOAKING_VOLUME_SCAN_BLOCKS_PER_TICK = 1000;
public static int CLOAKING_VOLUME_SCAN_AGE_TOLERANCE_SECONDS = 120;
// Breathing
public static int BREATHING_ENERGY_PER_CANISTER = 200;
public static int[] BREATHING_ENERGY_PER_NEW_AIR_BLOCK_BY_TIER = { 0, 12, 180, 2610 };
public static int[] BREATHING_ENERGY_PER_EXISTING_AIR_BLOCK_BY_TIER = { 0, 4, 60, 870 };
public static int[] BREATHING_MAX_ENERGY_STORED_BY_TIER = { 0, 1400, 21000, 304500 }; // almost 6 mn of autonomy
public static int BREATHING_AIR_GENERATION_TICKS = 40;
public static int[] BREATHING_AIR_GENERATION_RANGE_BLOCKS_BY_TIER = { 200, 16, 48, 144 };
public static int BREATHING_VOLUME_UPDATE_DEPTH_BLOCKS = 256;
public static int BREATHING_AIR_SIMULATION_DELAY_TICKS = 30;
public static final boolean BREATHING_AIR_BLOCK_DEBUG = false;
public static boolean BREATHING_AIR_AT_ENTITY_DEBUG = false;
public static int BREATHING_AIR_TANK_BREATH_DURATION_TICKS = 300;
public static int[] BREATHING_AIR_TANK_CAPACITY_BY_TIER = { 20, 32, 64, 128 };
// IC2 Reactor cooler
public static int IC2_REACTOR_MAX_HEAT_STORED = 30000;
public static int IC2_REACTOR_FOCUS_HEAT_TRANSFER_PER_TICK = 648;
public static int IC2_REACTOR_COMPONENT_HEAT_TRANSFER_PER_TICK = 54;
public static int IC2_REACTOR_REACTOR_HEAT_TRANSFER_PER_TICK = 54;
public static int IC2_REACTOR_COOLING_PER_INTERVAL = 1080;
public static double IC2_REACTOR_ENERGY_PER_HEAT = 2.0D;
public static int IC2_REACTOR_COOLING_INTERVAL_TICKS = 10;
// Transporter
public static int TRANSPORTER_MAX_ENERGY_STORED = 1000000;
public static int TRANSPORTER_ENERGY_STORED_UPGRADE_BONUS = TRANSPORTER_MAX_ENERGY_STORED / 2;
public static int TRANSPORTER_ENERGY_STORED_UPGRADE_MAX_QUANTITY = 8;
public static int TRANSPORTER_SETUP_SCANNER_RANGE_XZ_BLOCKS = 8;
public static int TRANSPORTER_SETUP_SCANNER_RANGE_Y_BELOW_BLOCKS = 3;
public static int TRANSPORTER_SETUP_SCANNER_RANGE_Y_ABOVE_BLOCKS = 1;
public static int TRANSPORTER_RANGE_BASE_BLOCKS = 256;
public static int TRANSPORTER_RANGE_UPGRADE_BLOCKS = 64;
public static int TRANSPORTER_RANGE_UPGRADE_MAX_QUANTITY = 8;
public static double[] TRANSPORTER_LOCKING_ENERGY_FACTORS = { 20.0, 3.0, 0.0, 10.0, 1.0 / Math.sqrt(2.0) };
public static double TRANSPORTER_LOCKING_STRENGTH_FACTOR_PER_TICK = Math.pow(0.01D, 1.0D / 300.0D); // natural decay down to 1% over 300 ticks
public static double TRANSPORTER_LOCKING_STRENGTH_IN_WILDERNESS = 0.25D;
public static double TRANSPORTER_LOCKING_STRENGTH_AT_BEACON = 0.50D;
public static double TRANSPORTER_LOCKING_STRENGTH_AT_TRANSPORTER = 1.00D;
public static double TRANSPORTER_LOCKING_STRENGTH_BONUS_AT_MAX_ENERGY_FACTOR = 0.5D;
public static double TRANSPORTER_LOCKING_STRENGTH_UPGRADE = 0.15D;
public static double TRANSPORTER_LOCKING_SPEED_IN_WILDERNESS = 0.25D;
public static double TRANSPORTER_LOCKING_SPEED_AT_BEACON = 0.75D;
public static double TRANSPORTER_LOCKING_SPEED_AT_TRANSPORTER = 1.0D;
public static double TRANSPORTER_LOCKING_SPEED_UPGRADE = 0.25D;
public static int TRANSPORTER_LOCKING_SPEED_OPTIMAL_TICKS = 5 * 20;
public static int TRANSPORTER_LOCKING_UPGRADE_MAX_QUANTITY = 2;
public static int TRANSPORTER_JAMMED_COOLDOWN_TICKS = 2 * 20;
public static double[] TRANSPORTER_ENERGIZING_ENERGY_FACTORS = { 10000.0, 1500.0, 0.0, 10.0, 1.0 / Math.sqrt(2.0) };
public static double TRANSPORTER_ENERGIZING_MAX_ENERGY_FACTOR = 10.0D;
public static int TRANSPORTER_ENERGIZING_FAILURE_MAX_DAMAGE = 5;
public static double TRANSPORTER_ENERGIZING_SUCCESS_LOCK_BONUS = 0.20D;
public static int TRANSPORTER_ENERGIZING_SUCCESS_MAX_DAMAGE = 100;
public static double TRANSPORTER_ENERGIZING_LOCKING_LOST = 0.5D;
public static int TRANSPORTER_ENERGIZING_CHARGING_TICKS = 3 * 20;
public static int TRANSPORTER_ENERGIZING_COOLDOWN_TICKS = 10 * 20;
public static double TRANSPORTER_ENERGIZING_ENTITY_MOVEMENT_TOLERANCE_BLOCKS = 1.0D;
public static int TRANSPORTER_ENTITY_GRAB_RADIUS_BLOCKS = 2;
public static int TRANSPORTER_FOCUS_SEARCH_RADIUS_BLOCKS = 2;
public static int TRANSPORTER_BEACON_MAX_ENERGY_STORED = 60000;
public static int TRANSPORTER_BEACON_ENERGY_PER_TICK = 60000 / (300 * 20); // 10 EU/t over 5 minutes
public static int TRANSPORTER_BEACON_DEPLOYING_DELAY_TICKS = 20;
// Enantiomorphic power reactor
public static int[] ENAN_REACTOR_MAX_ENERGY_STORED_BY_TIER = { 100000000, 100000000, 500000000, 2000000000 };
public static final int ENAN_REACTOR_UPDATE_INTERVAL_TICKS = 5; // hardcoded in the equations
public static final int ENAN_REACTOR_FREEZE_INTERVAL_TICKS = 40;
public static int[] ENAN_REACTOR_MAX_LASERS_PER_SECOND = { 64, 6, 12, 24 };
public static int[] ENAN_REACTOR_GENERATION_MIN_RF_BY_TIER = { 4, 4, 4, 4 };
public static int[] ENAN_REACTOR_GENERATION_MAX_RF_BY_TIER = { 64000, 64000, 192000, 576000 };
public static int[] ENAN_REACTOR_EXPLOSION_MAX_RADIUS_BY_TIER = { 6, 6, 8, 10 };
public static double[] ENAN_REACTOR_EXPLOSION_MAX_REMOVAL_CHANCE_BY_TIER = { 0.1D, 0.1D, 0.1D, 0.1D };
public static int[] ENAN_REACTOR_EXPLOSION_COUNT_BY_TIER = { 3, 3, 3, 3 };
public static float[] ENAN_REACTOR_EXPLOSION_STRENGTH_MIN_BY_TIER = { 4.0F, 4.0F, 5.0F, 6.0F };
public static float[] ENAN_REACTOR_EXPLOSION_STRENGTH_MAX_BY_TIER = { 7.0F, 7.0F, 9.0F, 11.0F };
// Force field setup
public static int[] FORCE_FIELD_PROJECTOR_MAX_ENERGY_STORED_BY_TIER = { 20000000, 30000, 90000, 150000 }; // 30000 * (1 + 2 * tier)
public static double FORCE_FIELD_PROJECTOR_EXPLOSION_SCALE = 1000.0D;
public static double FORCE_FIELD_PROJECTOR_MAX_LASER_REQUIRED = 10.0D;
public static double FORCE_FIELD_EXPLOSION_STRENGTH_VANILLA_CAP = 15.0D;
// Subspace capacitor
public static int[] CAPACITOR_MAX_ENERGY_STORED_BY_TIER = { 20000000, 800000, 4000000, 20000000 };
public static String[] CAPACITOR_IC2_SINK_TIER_NAME_BY_TIER = { "MaxV", "MV", "HV", "EV" };
public static String[] CAPACITOR_IC2_SOURCE_TIER_NAME_BY_TIER = { "MaxV", "MV", "HV", "EV" };
public static int[] CAPACITOR_FLUX_RATE_INPUT_BY_TIER = { Integer.MAX_VALUE / 2, 800, 4000, 20000 };
public static int[] CAPACITOR_FLUX_RATE_OUTPUT_BY_TIER = { Integer.MAX_VALUE / 2, 800, 4000, 20000 };
public static double[] CAPACITOR_EFFICIENCY_PER_UPGRADE = { 0.95D, 0.98D, 1.0D };
// Laser lift
public static int LIFT_MAX_ENERGY_STORED = 900;
public static int LIFT_ENERGY_PER_ENTITY = 150;
public static int LIFT_UPDATE_INTERVAL_TICKS = 10;
public static int LIFT_ENTITY_COOLDOWN_TICKS = 40;
// Chunk loader
public static int CHUNK_LOADER_MAX_ENERGY_STORED = 1000000;
public static int CHUNK_LOADER_MAX_RADIUS = 2;
public static int CHUNK_LOADER_ENERGY_PER_CHUNK = 8;
// Hull
public static float[] HULL_HARDNESS = { 666666.0F, 25.0F, 50.0F, 80.0F };
public static float[] HULL_BLAST_RESISTANCE = { 666666.0F, 60.0F, 90.0F, 120.0F };
public static int[] HULL_HARVEST_LEVEL = { 666666, 2, 3, 3 };
// Block transformers library
public static HashMap<String, IBlockTransformer> blockTransformers = new HashMap<>(30);
// Particles accelerator
public static boolean ACCELERATOR_ENABLE = true;
public static final double[] ACCELERATOR_TEMPERATURES_K = { 270.0, 200.0, 7.0 };
public static final double ACCELERATOR_THRESHOLD_DEFAULT = 0.95D;
public static int ACCELERATOR_MAX_PARTICLE_BUNCHES = 20;
// Electromagnetic cell
public static int[] ELECTROMAGNETIC_CELL_CAPACITY_BY_TIER = { 16000, 500, 1000, 2000 };
// Plasma torch
public static int[] PLASMA_TORCH_CAPACITY_BY_TIER = { 16000, 200, 400, 800 };
@Nonnull
public static Block getBlockOrFire(@Nonnull final String registryName) {
final ResourceLocation resourceLocation = new ResourceLocation(registryName);
final Block block = Block.REGISTRY.getObject(resourceLocation);
if (block == Blocks.AIR) {
WarpDrive.logger.error(String.format("Failed to get mod block for %s",
registryName));
return Blocks.FIRE;
}
return block;
}
@Nonnull
public static ItemStack getItemStackOrFire(@Nonnull final String registryName, final int meta, final String stringNBT) {
final Object object = getOreOrItemStackOrNull(registryName, meta);
if (!(object instanceof ItemStack)) {
return ItemStack.EMPTY;
}
final ItemStack itemStack = (ItemStack) object;
if (stringNBT == null || stringNBT.isEmpty()) {
return itemStack;
}
try {
final NBTTagCompound tagCompound = JsonToNBT.getTagFromJson(stringNBT);
itemStack.setTagCompound(tagCompound);
} catch (final NBTException exception) {
WarpDrive.logger.error(exception.getMessage());
exception.printStackTrace(WarpDrive.printStreamError);
WarpDrive.logger.error(String.format("Invalid NBT for %s@%d %s",
registryName, meta, stringNBT));
return ItemStack.EMPTY;
}
return itemStack;
}
@Nonnull
public static ItemStack getItemStackOrFire(@Nonnull final String registryName, final int meta) {
return getItemStackOrFire(registryName, meta, "");
}
@Nullable
private static Object getOreOrItemStackOrNull(@Nonnull final String registryName, final int meta) {
assert registryName.contains(":");
if (registryName.startsWith("ore:")) {
final String ore = registryName.substring(4);
if (OreDictionary.doesOreNameExist(ore) && !OreDictionary.getOres(ore).isEmpty()) {
return ore;
}
WarpDrive.logger.info(String.format("Skipping missing ore dictionary entry %s",
ore));
return null;
}
final ResourceLocation resourceLocation = new ResourceLocation(registryName);
final Item item = Item.REGISTRY.getObject(resourceLocation);
if (item == null) {
WarpDrive.logger.info(String.format("Skipping missing mod item %s@%d",
registryName, meta));
return null;
}
final ItemStack itemStack;
try {
if (meta == -1) {
itemStack = new ItemStack(item);
} else {
itemStack = new ItemStack(item, 1, meta);
if (itemStack.getMetadata() != meta) {
throw new RuntimeException(String.format("Invalid meta value found %d, expected %d",
itemStack.getMetadata(), meta ));
}
}
} catch (final Exception exception) {
exception.printStackTrace(WarpDrive.printStreamError);
WarpDrive.logger.error(String.format("Failed to get mod item for %s@%d",
registryName, meta ));
return null;
}
return itemStack;
}
public static Object getOreOrItemStack(final String registryName1, final int meta1,
@Nonnull final Object... args) {
// always validate parameters in dev space
assert args.length % 2 == 0;
for (int index = 0; index < args.length; index += 2) {
assert args[index ] instanceof String;
assert ((String) args[index]).contains(":");
assert args[index + 1] instanceof Integer;
}
// try the first one
Object object = getOreOrItemStackOrNull(registryName1, meta1);
if (object != null) {
return object;
}
// try the next ones
for (int index = 0; index < args.length; index += 2) {
object = getOreOrItemStackOrNull((String) args[index], (Integer) args[index + 1]);
if (object != null) {
return object;
}
}
return ItemStack.EMPTY;
}
public static ItemStack getOreDictionaryEntry(final String ore) {
if (!OreDictionary.doesOreNameExist(ore)) {
WarpDrive.logger.info(String.format("Skipping missing ore named %s",
ore));
return ItemStack.EMPTY;
}
final List<ItemStack> itemStacks = OreDictionary.getOres(ore);
if (itemStacks.isEmpty()) {
WarpDrive.logger.error(String.format("Failed to get item from empty ore dictionary %s",
ore));
return ItemStack.EMPTY;
}
return itemStacks.get(0);
}
protected static double[] getDoubleList(@Nonnull final Configuration config, final String category, final String key, final String comment, final double[] valuesDefault) {
double[] valuesRead = config.get(category, key, valuesDefault, comment).getDoubleList();
if (valuesRead.length != valuesDefault.length) {
valuesRead = valuesDefault.clone();
}
return valuesRead;
}
public static void reload(@Nonnull final MinecraftServer server) {
CelestialObjectManager.clearForReload(false);
onFMLpreInitialization(stringConfigDirectory);
onFMLPostInitialization();
final List<EntityPlayerMP> entityPlayers = server.getPlayerList().getPlayers();
for (final EntityPlayerMP entityPlayerMP : entityPlayers) {
if ( !(entityPlayerMP instanceof FakePlayer) ) {
final CelestialObject celestialObject = CelestialObjectManager.get(entityPlayerMP.world,
MathHelper.floor(entityPlayerMP.posX),
MathHelper.floor(entityPlayerMP.posZ));
PacketHandler.sendClientSync(entityPlayerMP, celestialObject);
}
}
}
public static void onFMLpreInitialization(final String stringConfigDirectory) {
WarpDriveConfig.stringConfigDirectory = stringConfigDirectory;
// create mod folder
fileConfigDirectory = new File(stringConfigDirectory, WarpDrive.MODID);
//noinspection ResultOfMethodCallIgnored
fileConfigDirectory.mkdir();
if (!fileConfigDirectory.isDirectory()) {
throw new RuntimeException(String.format("Unable to create config directory %s",
fileConfigDirectory));
}
// unpack default XML files if none are defined
unpackResourcesToFolder("fillerSets", ".xml", defaultXML_fillerSets, "config", fileConfigDirectory);
unpackResourcesToFolder("lootSets", ".xml", defaultXML_lootSets, "config", fileConfigDirectory);
unpackResourcesToFolder("schematicSets", ".xml", defaultXML_schematicSets, "config", fileConfigDirectory);
unpackResourcesToFolder("structures", ".xml", defaultXML_structures, "config", fileConfigDirectory);
unpackResourcesToFolder("celestialObjects", ".xml", defaultXML_celestialObjects, "config", fileConfigDirectory);
// always unpack the XML Schema
unpackResourceToFolder("WarpDrive.xsd", "config", fileConfigDirectory);
// read configuration files
loadConfig(new File(fileConfigDirectory, "config.yml"));
loadDictionary(new File(fileConfigDirectory, "dictionary.yml"));
loadDataFixer(new File(fileConfigDirectory, "dataFixer.yml"));
CelestialObjectManager.load(fileConfigDirectory);
// create schematics folder
final File fileSchematicsDirectory = new File(G_SCHEMATICS_LOCATION);
//noinspection ResultOfMethodCallIgnored
fileSchematicsDirectory.mkdir();
if (!fileSchematicsDirectory.isDirectory()) {
throw new RuntimeException(String.format("Unable to create schematic directory %s",
fileSchematicsDirectory));
}
// unpack default schematic files if none are defined
unpackResourcesToFolder("default", ".schematic", defaultSchematics, "schematics", fileSchematicsDirectory);
// read mod dependencies at runtime and for recipes
isRedstoneFluxLoaded = Loader.isModLoaded("redstoneflux");
isComputerCraftLoaded = Loader.isModLoaded("computercraft");
isCCTweakedLoaded = Loader.isModLoaded("cctweaked");
isEnderIOLoaded = Loader.isModLoaded("enderio");
isGregtechLoaded = Loader.isModLoaded("gregtech");
isIndustrialCraft2Loaded = Loader.isModLoaded("ic2");
isOpenComputersLoaded = Loader.isModLoaded("opencomputers");
// read mod dependencies for recipes
isAdvancedRepulsionSystemLoaded = Loader.isModLoaded("AdvancedRepulsionSystems");
isForgeMultipartLoaded = Loader.isModLoaded("forgemultipartcbe");
isICBMClassicLoaded = Loader.isModLoaded("icbmclassic");
isMatterOverdriveLoaded = Loader.isModLoaded("matteroverdrive");
isNotEnoughItemsLoaded = Loader.isModLoaded("NotEnoughItems");
isThermalExpansionLoaded = Loader.isModLoaded("thermalexpansion");
isThermalFoundationLoaded = Loader.isModLoaded("thermalfoundation");
}
public static void loadConfig(final File file) {
final Configuration config = new Configuration(file);
config.load();
// General
G_SPACE_BIOME_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "space_biome_id", G_SPACE_BIOME_ID, "Space biome ID").getInt());
G_SPACE_PROVIDER_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "space_provider_id", G_SPACE_PROVIDER_ID, "Space dimension provider ID").getInt());
G_HYPERSPACE_PROVIDER_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "hyperspace_provider_id", G_HYPERSPACE_PROVIDER_ID, "Hyperspace dimension provider ID").getInt());
G_ENTITY_SPHERE_GENERATOR_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "entity_sphere_generator_id", G_ENTITY_SPHERE_GENERATOR_ID, "Entity sphere generator ID").getInt());
G_ENTITY_STAR_CORE_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "entity_star_core_id", G_ENTITY_STAR_CORE_ID, "Entity star core ID").getInt());
G_ENTITY_CAMERA_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "entity_camera_id", G_ENTITY_CAMERA_ID, "Entity camera ID").getInt());
G_ENTITY_PARTICLE_BUNCH_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "entity_particle_bunch_id", G_ENTITY_PARTICLE_BUNCH_ID, "Entity particle bunch ID").getInt());
G_ENTITY_LASER_EXPLODER_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "entity_laser_exploder_id", G_ENTITY_LASER_EXPLODER_ID, "Entity laser exploder ID").getInt());
G_ENTITY_NPC_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "entity_NPC_id", G_ENTITY_NPC_ID, "Entity NPC ID").getInt());
G_ENTITY_OFFLINE_AVATAR_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "entity_offline_avatar_id", G_ENTITY_OFFLINE_AVATAR_ID, "Entity offline avatar ID").getInt());
G_ENTITY_SEAT_ID = Commons.clamp(Integer.MIN_VALUE, Integer.MAX_VALUE,
config.get("general", "entity_seat_id", G_ENTITY_SEAT_ID, "Entity seat ID").getInt());
G_LUA_SCRIPTS = Commons.clamp(0, 2,
config.get("general", "lua_scripts", G_LUA_SCRIPTS,
"LUA scripts to load when connecting machines: 0 = none, 1 = templates in a subfolder, 2 = ready to roll (templates are still provided)").getInt());
G_SCHEMATICS_LOCATION = config.get("general", "schematics_location", G_SCHEMATICS_LOCATION, "Root folder where to load and save ship schematics").getString();
G_ASSEMBLY_SCAN_INTERVAL_SECONDS = Commons.clamp(0, 300,
config.get("general", "assembly_scanning_interval", G_ASSEMBLY_SCAN_INTERVAL_SECONDS,
"Reaction delay when updating blocks in an assembly (measured in seconds)").getInt());
G_ASSEMBLY_SCAN_INTERVAL_TICKS = 20 * WarpDriveConfig.G_ASSEMBLY_SCAN_INTERVAL_SECONDS;
G_PARAMETERS_UPDATE_INTERVAL_TICKS = Commons.clamp(0, 300,
config.get("general", "parameters_update_interval", G_PARAMETERS_UPDATE_INTERVAL_TICKS,
"Complex computation delay in an assembly (measured in ticks)").getInt());
G_REGISTRY_UPDATE_INTERVAL_SECONDS = Commons.clamp(0, 300,
config.get("general", "registry_update_interval", G_REGISTRY_UPDATE_INTERVAL_SECONDS,
"Registration period for an assembly (measured in seconds)").getInt());
G_REGISTRY_UPDATE_INTERVAL_TICKS = 20 * WarpDriveConfig.G_REGISTRY_UPDATE_INTERVAL_SECONDS;
G_ENFORCE_VALID_CELESTIAL_OBJECTS =
config.get("general", "enforce_valid_celestial_objects", G_ENFORCE_VALID_CELESTIAL_OBJECTS,
"Disable to boot the game even when celestial objects are invalid. Use at your own risk!").getBoolean();
G_BLOCKS_PER_TICK = Commons.clamp(100, 100000,
config.get("general", "blocks_per_tick", G_BLOCKS_PER_TICK,
"Number of blocks to move per ticks, too high will cause lag spikes on ship jumping or deployment, too low may break the ship wirings").getInt());
G_ENABLE_FAST_SET_BLOCKSTATE = config.get("general", "enable_fast_set_blockstate", G_ENABLE_FAST_SET_BLOCKSTATE,
"Enable fast blockstate placement, skipping light computation. Disable if you have world implementations conflicts").getBoolean(G_ENABLE_FAST_SET_BLOCKSTATE);
G_ENABLE_PROTECTION_CHECKS = config.get("general", "enable_protection_checks", G_ENABLE_PROTECTION_CHECKS,
"Enable area protection checks from other mods or plugins, disable if you use the event system exclusively").getBoolean(G_ENABLE_PROTECTION_CHECKS);
G_ENABLE_EXPERIMENTAL_REFRESH = config.get("general", "enable_experimental_refresh", G_ENABLE_EXPERIMENTAL_REFRESH,
"Enable experimental refresh during jump to prevent duping, use at your own risk").getBoolean(G_ENABLE_EXPERIMENTAL_REFRESH);
G_ENABLE_EXPERIMENTAL_UNLOAD = config.get("general", "enable_experimental_unload", G_ENABLE_EXPERIMENTAL_UNLOAD,
"Enable experimental tile entity unloading during jump to force a cleanup, required for IC2 Classic, may cause issues with other mods").getBoolean(G_ENABLE_EXPERIMENTAL_UNLOAD);
G_MINIMUM_DIMENSION_UNLOAD_QUEUE_DELAY = Commons.clamp(0, 1000,
config.get("general", "minimum_dimension_unload_queue_delay_ticks", G_MINIMUM_DIMENSION_UNLOAD_QUEUE_DELAY,
"Enforce a minimum value for Forge's dimensionUnloadQueueDelay to fix various dimension transition issues from unloading the world too soon (set below 100 at your own risk)").getInt());
ForgeModContainer.dimensionUnloadQueueDelay = Math.max(ForgeModContainer.dimensionUnloadQueueDelay, G_MINIMUM_DIMENSION_UNLOAD_QUEUE_DELAY);
WarpDrive.logger.info(String.format("Forge's dimensionUnloadQueueDelay is set to %d ticks",
ForgeModContainer.dimensionUnloadQueueDelay ));
if (ForgeModContainer.dimensionUnloadQueueDelay < 100) {
FMLLog.bigWarning("Forge's dimensionUnloadQueueDelay is lower than 100 ticks, world transitions won't work properly!");
try {
Thread.sleep(1000L);
} catch (final Exception exception) {
// no operation
}
}
G_ENABLE_FORGE_CHUNK_MANAGER = config.get("general", "enable_forge_chunk_manager", G_ENABLE_FORGE_CHUNK_MANAGER,
"Enable automatic configuration of Forge's ChunkManager for WarpDrive. Disable to control manually WarpDrive specific settings.").getBoolean(G_ENABLE_FORGE_CHUNK_MANAGER);
G_BLAST_RESISTANCE_CAP = Commons.clamp(10.0F, 6000.0F,
(float) config.get("general", "blast_resistance_cap", G_BLAST_RESISTANCE_CAP,
"Maximum allowed blast resistance for non-hull, breakable blocks from other mods. Required to fix non-sense scaling in modded fluids, etc. Default is basic hull resistance (60).").getDouble(G_BLAST_RESISTANCE_CAP));
// Client
CLIENT_BREATHING_OVERLAY_FORCED = config.get("client", "breathing_overlay_forced", CLIENT_BREATHING_OVERLAY_FORCED,
"Force rendering the breathing overlay to compensate HUD modifications").getBoolean(false);
CLIENT_LOCATION_SCALE = Commons.clamp(0.25F, 4.0F, (float) config.get("client", "location_scale", CLIENT_LOCATION_SCALE,
"Scale for location text font").getDouble() );
CLIENT_LOCATION_NAME_PREFIX = config.get("client", "location_name_prefix", CLIENT_LOCATION_NAME_PREFIX,
"Prefix for location name, useful to add formatting").getString();
{
String stringValue = config.get("client", "location_background_color", String.format("0x%6X", CLIENT_LOCATION_BACKGROUND_COLOR),
"Hexadecimal color code for location background (0xAARRGGBB where AA is alpha, RR is Red, GG is Green and BB is Blue component)").getString();
CLIENT_LOCATION_BACKGROUND_COLOR = (int) (Long.decode(stringValue) & 0xFFFFFFFFL);
stringValue = config.get("client", "location_text_color", String.format("0x%6X", CLIENT_LOCATION_TEXT_COLOR),
"Hexadecimal color code for location foreground (0xAARRGGBB where AA is alpha, RR is Red, GG is Green and BB is Blue component)").getString();
CLIENT_LOCATION_TEXT_COLOR = (int) (Long.decode(stringValue) & 0xFFFFFFFFL);
}
CLIENT_LOCATION_HAS_SHADOW = config.get("client", "location_has_shadow", CLIENT_LOCATION_HAS_SHADOW,
"Shadow casting option for current celestial object name").getBoolean(CLIENT_LOCATION_HAS_SHADOW);
CLIENT_LOCATION_SCREEN_ALIGNMENT = EnumDisplayAlignment.valueOf(config.get("client", "location_screen_alignment", CLIENT_LOCATION_SCREEN_ALIGNMENT.name(),
"Alignment on screen: TOP_LEFT, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER or BOTTOM_RIGHT").getString());
CLIENT_LOCATION_SCREEN_OFFSET_X = config.get("client", "location_offset_x", CLIENT_LOCATION_SCREEN_OFFSET_X,
"Horizontal offset on screen, increase to move to the right").getInt();
CLIENT_LOCATION_SCREEN_OFFSET_Y = config.get("client", "location_offset_y", CLIENT_LOCATION_SCREEN_OFFSET_Y,
"Vertical offset on screen, increase to move down").getInt();
CLIENT_LOCATION_TEXT_ALIGNMENT = EnumDisplayAlignment.valueOf(config.get("client", "location_text_alignment", CLIENT_LOCATION_TEXT_ALIGNMENT.name(),
"Text alignment: TOP_LEFT, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER or BOTTOM_RIGHT").getString());
CLIENT_LOCATION_WIDTH_RATIO = (float) config.get("client", "location_width_ratio", CLIENT_LOCATION_WIDTH_RATIO,
"Text width as a ratio of full screen width").getDouble();
CLIENT_LOCATION_WIDTH_MIN = config.get("client", "location_width_min", CLIENT_LOCATION_WIDTH_MIN,
"Text width as a minimum 'pixel' count").getInt();
// Tooltip
final String commentTooltip = "When to show %s in tooltips. Valid values are " + EnumTooltipCondition.formatAllValues() + ".";
TOOLTIP_ADD_REGISTRY_NAME = EnumTooltipCondition.valueOf(config.get("tooltip", "add_registry_name", TOOLTIP_ADD_REGISTRY_NAME.name(),
String.format(commentTooltip, "registry name")).getString());
TOOLTIP_ADD_ORE_DICTIONARY_NAME = EnumTooltipCondition.valueOf(config.get("tooltip", "add_ore_dictionary_name", TOOLTIP_ADD_ORE_DICTIONARY_NAME.name(),
String.format(commentTooltip, "ore dictionary names")).getString());
TOOLTIP_ADD_ARMOR_POINTS = EnumTooltipCondition.valueOf(config.get("tooltip", "add_armor_points", TOOLTIP_ADD_ARMOR_POINTS.name(),
String.format(commentTooltip, "armor points")).getString());
TOOLTIP_ADD_BLOCK_MATERIAL = EnumTooltipCondition.valueOf(config.get("tooltip", "add_block_material", TOOLTIP_ADD_BLOCK_MATERIAL.name(),
String.format(commentTooltip, "block material")).getString());
TOOLTIP_ADD_BURN_TIME = EnumTooltipCondition.valueOf(config.get("tooltip", "add_burn_time", TOOLTIP_ADD_BURN_TIME.name(),
String.format(commentTooltip, "burn time")).getString());
TOOLTIP_ADD_DURABILITY = EnumTooltipCondition.valueOf(config.get("tooltip", "add_durability", TOOLTIP_ADD_DURABILITY.name(),
String.format(commentTooltip, "durability")).getString());
TOOLTIP_ADD_ENCHANTABILITY = EnumTooltipCondition.valueOf(config.get("tooltip", "add_enchantability", TOOLTIP_ADD_ENCHANTABILITY.name(),
String.format(commentTooltip, "armor & tool enchantability")).getString());
TOOLTIP_ADD_ENTITY_ID = EnumTooltipCondition.valueOf(config.get("tooltip", "add_entity_id", TOOLTIP_ADD_ENTITY_ID.name(),
String.format(commentTooltip, "entity id")).getString());
TOOLTIP_ADD_FLAMMABILITY = EnumTooltipCondition.valueOf(config.get("tooltip", "add_flammability", TOOLTIP_ADD_FLAMMABILITY.name(),
String.format(commentTooltip, "flammability")).getString());
TOOLTIP_ADD_FLUID = EnumTooltipCondition.valueOf(config.get("tooltip", "add_fluid_stats", TOOLTIP_ADD_FLUID.name(),
String.format(commentTooltip, "fluid stats")).getString());
TOOLTIP_ADD_HARDNESS = EnumTooltipCondition.valueOf(config.get("tooltip", "add_hardness", TOOLTIP_ADD_HARDNESS.name(),
String.format(commentTooltip, "hardness & explosion resistance")).getString());
TOOLTIP_ADD_HARVESTING = EnumTooltipCondition.valueOf(config.get("tooltip", "add_harvesting_stats", TOOLTIP_ADD_HARVESTING.name(),
String.format(commentTooltip, "harvesting stats")).getString());
TOOLTIP_ADD_OPACITY = EnumTooltipCondition.valueOf(config.get("tooltip", "add_opacity", TOOLTIP_ADD_OPACITY.name(),
String.format(commentTooltip, "opacity")).getString());
TOOLTIP_ADD_REPAIR_WITH = EnumTooltipCondition.valueOf(config.get("tooltip", "add_repair_material", TOOLTIP_ADD_REPAIR_WITH.name(),
String.format(commentTooltip, "repair material")).getString());
TOOLTIP_CLEANUP_LIST = config.get("tooltip", "cleanup_list", TOOLTIP_CLEANUP_LIST,
"List of lines to remove from tooltips before adding ours. This can be a partial match in a line. Must be lowercase without formatting.").getStringList();
for (int index = 0; index < TOOLTIP_CLEANUP_LIST.length; index++) {
final String old = TOOLTIP_CLEANUP_LIST[index];
TOOLTIP_CLEANUP_LIST[index] = Commons.removeFormatting(old).toLowerCase();
}
TOOLTIP_ENABLE_DEDUPLICATION = EnumTooltipCondition.valueOf(config.get("tooltip", "enable_deduplication", TOOLTIP_ENABLE_DEDUPLICATION.name(),
String.format("When to remove duplicate lines in tooltips. Valid values are %s.", EnumTooltipCondition.formatAllValues())).getString());
// Logging
LOGGING_THROTTLE_MS = Commons.clamp(0L, 600000L,
config.get("logging", "throttle_ms", LOGGING_THROTTLE_MS, "How many milliseconds to wait before logging another occurrence in a time sensitive section of the mod (rendering, events, etc.)").getLong(LOGGING_THROTTLE_MS));
LOGGING_JUMP = config.get("logging", "enable_jump_logs", LOGGING_JUMP, "Basic jump logs, should always be enabled").getBoolean(true);
LOGGING_JUMPBLOCKS = config.get("logging", "enable_jumpblocks_logs", LOGGING_JUMPBLOCKS, "Detailed jump logs to help debug the mod, will spam your logs...").getBoolean(false);
LOGGING_ENERGY = config.get("logging", "enable_energy_logs", LOGGING_ENERGY, "Detailed energy logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
if (WarpDrive.isDev) {// disabled in production, for obvious reasons :)
LOGGING_EFFECTS = config.get("logging", "enable_effects_logs", LOGGING_EFFECTS, "Detailed effects logs to help debug the mod, will spam your console!").getBoolean(false);
LOGGING_CLOAKING = config.get("logging", "enable_cloaking_logs", LOGGING_CLOAKING, "Detailed cloaking logs to help debug the mod, will spam your console!").getBoolean(false);
LOGGING_VIDEO_CHANNEL = config.get("logging", "enable_videoChannel_logs", LOGGING_VIDEO_CHANNEL, "Detailed video channel logs to help debug the mod, will spam your console!").getBoolean(false);
LOGGING_TARGETING = config.get("logging", "enable_targeting_logs", LOGGING_TARGETING, "Detailed targeting logs to help debug the mod, will spam your console!").getBoolean(false);
LOGGING_CLIENT_SYNCHRONIZATION = config.get("logging", "enable_client_synchronization_logs", LOGGING_CLIENT_SYNCHRONIZATION, "Detailed client synchronization logs to help debug the mod.").getBoolean(false);
} else {
LOGGING_EFFECTS = false;
LOGGING_CLOAKING = false;
LOGGING_VIDEO_CHANNEL = false;
LOGGING_TARGETING = false;
LOGGING_CLIENT_SYNCHRONIZATION = false;
}
LOGGING_WEAPON = config.get("logging", "enable_weapon_logs", LOGGING_WEAPON, "Detailed weapon logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
LOGGING_CAMERA = config.get("logging", "enable_camera_logs", LOGGING_CAMERA, "Detailed camera logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
LOGGING_BUILDING = config.get("logging", "enable_building_logs", LOGGING_BUILDING, "Detailed building logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
LOGGING_COLLECTION = config.get("logging", "enable_collection_logs", LOGGING_COLLECTION, "Detailed collection logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
LOGGING_TRANSPORTER = config.get("logging", "enable_transporter_logs", LOGGING_TRANSPORTER, "Detailed transporter logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
LOGGING_LUA = config.get("logging", "enable_LUA_logs", LOGGING_LUA, "Detailed LUA logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
LOGGING_RADAR = config.get("logging", "enable_radar_logs", LOGGING_RADAR, "Detailed radar logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
LOGGING_BREATHING = config.get("logging", "enable_breathing_logs", LOGGING_BREATHING, "Detailed breathing logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
LOGGING_WORLD_GENERATION = config.get("logging", "enable_world_generation_logs", LOGGING_WORLD_GENERATION, "Detailed world generation logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
LOGGING_PROFILING_CPU_USAGE = config.get("logging", "enable_profiling_CPU_time", LOGGING_PROFILING_CPU_USAGE, "Profiling logs for CPU time, enable it to check for lag").getBoolean(true);
LOGGING_PROFILING_MEMORY_ALLOCATION = config.get("logging", "enable_profiling_memory_allocation", LOGGING_PROFILING_MEMORY_ALLOCATION, "Profiling logs for memory allocation, enable it to check for lag").getBoolean(true);
LOGGING_PROFILING_THREAD_SAFETY = config.get("logging", "enable_profiling_thread_safety", LOGGING_PROFILING_THREAD_SAFETY, "Profiling logs for multi-threading, enable it to check for ConcurrentModificationException").getBoolean(false);
LOGGING_DICTIONARY = config.get("logging", "enable_dictionary_logs", LOGGING_DICTIONARY, "Dictionary logs, enable it to dump blocks hardness and blast resistance at boot").getBoolean(true);
LOGGING_GLOBAL_REGION_REGISTRY = config.get("logging", "enable_global_region_registry_logs", LOGGING_GLOBAL_REGION_REGISTRY, "GlobalRegion registry logs, enable it to dump global region registry updates").getBoolean(false);
LOGGING_BREAK_PLACE = config.get("logging", "enable_break_place_logs", LOGGING_BREAK_PLACE, "Detailed break/place event logs to help debug the mod, enable it before reporting a bug").getBoolean(false);
LOGGING_FORCE_FIELD = config.get("logging", "enable_force_field_logs", LOGGING_FORCE_FIELD, "Detailed force field logs to help debug the mod, enable it before reporting a bug").getBoolean(false);