Skip to content

Commit e28214c

Browse files
committed
clean up config comment syntax
1 parent a7ca5df commit e28214c

9 files changed

Lines changed: 234 additions & 147 deletions

src/main/java/com/falsepattern/falsetweaks/config/ModuleConfig.java

Lines changed: 84 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -31,98 +31,123 @@
3131
category = "00_modules")
3232
@Config.RequiresMcRestart
3333
public class ModuleConfig {
34-
@Config.Comment("Optimizes the way forge scans the classpath during launch.\n" +
35-
"Not compatible with some badly-written mods.\n" +
36-
"FPS impact: None, but makes startup a bit faster")
34+
@Config.Comment({
35+
"Optimizes the way forge scans the classpath during launch.",
36+
"Not compatible with some badly-written mods.",
37+
"FPS impact: None, but makes startup a bit faster"
38+
})
3739
@Config.DefaultBoolean(false)
3840
public static boolean STARTUP_OPTIMIZATIONS_V2;
3941

40-
@Config.Comment("Enable/Disable texture optimizations. This includes:\n" +
41-
"- Multithreaded animated textures\n" +
42-
"- Faster texture atlas packing during startup\n" +
43-
"FPS impact: Reduced stuttering in heavily modded packs")
42+
@Config.Comment({
43+
"Enable/Disable texture optimizations. This includes:",
44+
"- Multithreaded animated textures",
45+
"- Faster texture atlas packing during startup",
46+
"FPS impact: Reduced stuttering in heavily modded packs"
47+
})
4448
@Config.DefaultBoolean(true)
4549
public static boolean TEXTURE_OPTIMIZATIONS;
4650

47-
@Config.Comment("Enable/Disable item voxelization. This fixes a huge amount of item render issues, but is still\n" +
48-
"an experimental feature.\n" +
49-
"Also includes the 3D rails.")
51+
@Config.Comment({
52+
"Enable/Disable item voxelization. This fixes a huge amount of item render issues, but is still",
53+
"an experimental feature.",
54+
"Also includes the 3D rails."
55+
})
5056
@Config.DefaultBoolean(true)
5157
public static boolean VOXELIZER;
5258

53-
@Config.Comment("Enables the Triangulator module. This also includes the ambient occlusion and smooth lighting fix," +
54-
"along with the block crack fix. Also provides the VertexAPI used by the BSP sorter and the threading system.\n" +
55-
"If you want to use those fixes without having triangulated meshes, set the ENABLE_QUAD_TRIANGULATION\n" +
56-
"property to false in the triangulator category.\n" +
57-
"FPS impact: Tiny performance decrease, but smooth lighting will look way better.")
59+
@Config.Comment({
60+
"Enables the Triangulator module. This also includes the ambient occlusion and smooth lighting fix," +
61+
"along with the block crack fix. Also provides the VertexAPI used by the BSP sorter and the threading system.",
62+
"If you want to use those fixes without having triangulated meshes, set the ENABLE_QUAD_TRIANGULATION",
63+
"property to false in the triangulator category.",
64+
"FPS impact: Tiny performance decrease, but smooth lighting will look way better."
65+
})
5866
@Config.DefaultBoolean(true)
5967
public static boolean TRIANGULATOR;
6068

61-
@Config.Comment("Enable an optimized, BSP-tree based vertex sorting algorithm for transparent blocks.\n" +
62-
"Force-enables TRIANGULATOR.\n" +
63-
"FPS impact: A little bit less stuttering when moving around with a lot of stained glass-like blocks around")
69+
@Config.Comment({
70+
"Enable an optimized, BSP-tree based vertex sorting algorithm for transparent blocks.",
71+
"Force-enables TRIANGULATOR.",
72+
"FPS impact: A little bit less stuttering when moving around with a lot of stained glass-like blocks around"
73+
})
6474
@Config.DefaultBoolean(true)
6575
public static boolean BSP_SORTING;
6676

67-
@Config.Comment("Dropped and held items are re-rendered every frame, generating a lot of\n" +
68-
"unnecessary CPU load because of the very inefficient way the rendering is done.\n" +
69-
"With this enabled, FalseTweaks will cache pre-rendered versions of items into RenderLists\n" +
70-
"(same things that chunks use) to minimize the amount of work done by the cpu for every single item.\n" +
71-
"FPS impact: Decent improvement with lots of items on ground")
77+
@Config.Comment({
78+
"Dropped and held items are re-rendered every frame, generating a lot of",
79+
"unnecessary CPU load because of the very inefficient way the rendering is done.",
80+
"With this enabled, FalseTweaks will cache pre-rendered versions of items into RenderLists",
81+
"(same things that chunks use) to minimize the amount of work done by the cpu for every single item.",
82+
"FPS impact: Decent improvement with lots of items on ground"
83+
})
7284
@Config.DefaultBoolean(true)
7385
public static boolean ITEM_RENDER_LISTS;
7486

7587
@Config.Comment("Disables the Realms button on the main menu.")
7688
@Config.DefaultBoolean(true)
7789
public static boolean NO_REALMS_ON_MENU;
7890

79-
@Config.Comment("Beacons also have an optimization using renderlists. If you spot any issues related to beacons,\n" +
80-
"you can toggle said optimization here.\n" +
81-
"FPS impact: Tiny improvement near beacons")
91+
@Config.Comment({
92+
"Beacons also have an optimization using renderlists. If you spot any issues related to beacons,",
93+
"you can toggle said optimization here.",
94+
"FPS impact: Tiny improvement near beacons"
95+
})
8296
@Config.DefaultBoolean(true)
8397
public static boolean BEACON_OPTIMIZATION;
8498

85-
@Config.Comment("Transparent tile entities (beacons, for instance) might render behind other tile entities that are\n" +
86-
"actually BEHIND the transparent part. Sorting the tile entities before rendering fixes this bug.\n" +
87-
"FPS impact: Slight decrease")
99+
@Config.Comment({
100+
"Transparent tile entities (beacons, for instance) might render behind other tile entities that are",
101+
"actually BEHIND the transparent part. Sorting the tile entities before rendering fixes this bug.",
102+
"FPS impact: Slight decrease"
103+
})
88104
@Config.DefaultBoolean(false)
89105
public static boolean TE_TRANSPARENCY_FIX;
90106

91-
@Config.Comment("Makes translucent geometry of chunks render slightly closer to the camera. (experimental)\n" +
92-
"This reduces Z-Fighting on blocks which have overlapping opaque and translucent geometry,\n" +
93-
"at the cost of far away geometry sometimes rendering on top of opaque geometry. (>100~ blocks)\n" +
94-
"FPS impact: Unknown")
95-
@Config.DefaultBoolean(false)
96-
public static boolean BLOCK_LAYER_TRANSPARENCY_FIX;
97107
@Config.Comment({
98-
"Particle water transparency fix"
108+
"Makes translucent geometry of chunks render slightly closer to the camera. (experimental)",
109+
"This reduces Z-Fighting on blocks which have overlapping opaque and translucent geometry,",
110+
"at the cost of far away geometry sometimes rendering on top of opaque geometry. (>100~ blocks)",
111+
"FPS impact: Unknown"
99112
})
113+
@Config.DefaultBoolean(false)
114+
public static boolean BLOCK_LAYER_TRANSPARENCY_FIX;
115+
116+
@Config.Comment("Particle water transparency fix")
100117
@Config.DefaultBoolean(true)
101118
public static boolean PARTICLE_TRANSPARENCY_FIX;
102119

103-
@Config.Comment("3D particles (experimental)\n" +
104-
"FPS impact: Unknown")
120+
@Config.Comment({
121+
"3D particles (experimental)",
122+
"FPS impact: Unknown"
123+
})
105124
@Config.DefaultBoolean(false)
106125
public static boolean CUBIC_PARTICLES;
107126

108-
@Config.Comment("Improves the mipmap system of minecraft with 2 things:\n" +
109-
"1. Every tiny texture is upscaled to at least 16x16 to allow for 4 mipmap levels, even if a mod has a texture smaller than 16x16.\n" +
110-
"2. Replaces the mipmap generation with a multithreaded system, which scales with the number of cores in your system.\n" +
111-
"FPS impact: none, but resource pack reload times (and startup time) are cut down by a lot")
127+
@Config.Comment({
128+
"Improves the mipmap system of minecraft with 2 things:",
129+
"1. Every tiny texture is upscaled to at least 16x16 to allow for 4 mipmap levels, even if a mod has a texture smaller than 16x16.",
130+
"2. Replaces the mipmap generation with a multithreaded system, which scales with the number of cores in your system.",
131+
"FPS impact: none, but resource pack reload times (and startup time) are cut down by a lot"
132+
})
112133
@Config.DefaultBoolean(true)
113134
public static boolean MIPMAP_FIX;
114135

115-
@Config.Comment("Replaces the minecraft profiler with fully custom logic (used in the Shift+F3 pie chart)\n" +
116-
"Also check the profiler config category!\n" +
117-
"FPS impact: Slightly faster profiler")
136+
@Config.Comment({
137+
"Replaces the minecraft profiler with fully custom logic (used in the Shift+F3 pie chart)",
138+
"Also check the profiler config category!",
139+
"FPS impact: Slightly faster profiler"
140+
})
118141
@Config.DefaultBoolean(true)
119142
public static boolean ADVANCED_PROFILER;
120143

121-
@Config.Comment("Enables multi-threaded chunk updating.\n" +
122-
"Not compatible with quad triangulation (automatically disables it if you turn this on)\n" +
123-
"Force-enables BSP_SORTING.\n" +
124-
"COMPATIBLE WITH OPTIFINE AND SHADERS\n" +
125-
"FPS impact: Significant FPS and world rendering speed gains. Even higher with Neodymium installed.")
144+
@Config.Comment({
145+
"Enables multi-threaded chunk updating.",
146+
"Not compatible with quad triangulation (automatically disables it if you turn this on)",
147+
"Force-enables BSP_SORTING.",
148+
"COMPATIBLE WITH OPTIFINE AND SHADERS",
149+
"FPS impact: Significant FPS and world rendering speed gains. Even higher with Neodymium installed."
150+
})
126151
@Config.DefaultBoolean(false)
127152
@Config.RequiresMcRestart
128153
public static boolean THREADED_CHUNK_UPDATES;
@@ -154,15 +179,19 @@ public class ModuleConfig {
154179
@Config.DefaultBoolean(true)
155180
public static boolean MINECART_EAR_BLAST_FIX;
156181

157-
@Config.Comment("Improves the performance of the minecraft sky mesh.\n" +
158-
"Also fixes the weird white lines that some OptiFine shaderpacks get with huge render distances.\n" +
159-
"FPS impact: Negligible gain")
182+
@Config.Comment({
183+
"Improves the performance of the minecraft sky mesh.",
184+
"Also fixes the weird white lines that some OptiFine shaderpacks get with huge render distances.",
185+
"FPS impact: Negligible gain"
186+
})
160187
@Config.DefaultBoolean(true)
161188
@Config.RequiresMcRestart
162189
public static boolean SKY_MESH_OPTIMIZATION;
163190

164-
@Config.Comment("Fixes an occasional crash that happens when trying to render a GUI block overlay (more common with optifine shaders enabled.)\n" +
165-
"FPS impact: Zero")
191+
@Config.Comment({
192+
"Fixes an occasional crash that happens when trying to render a GUI block overlay (more common with optifine shaders enabled.)",
193+
"FPS impact: Zero"
194+
})
166195
@Config.DefaultBoolean(true)
167196
@Config.RequiresMcRestart
168197
public static boolean OVERLAY_CRASH_FIX;

src/main/java/com/falsepattern/falsetweaks/config/OcclusionConfig.java

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,33 +38,43 @@ public class OcclusionConfig {
3838
@Config.DefaultBoolean(false)
3939
public static boolean DYNAMIC_CHUNK_UPDATES;
4040

41-
@Config.Comment("The amount of chunks renderers to update PER SECOND. This is a MAXIMUM limit, not a minimum.\n" +
42-
"Every chunk has 32 chunk renderers (16 subchunks, each has 2 render passes)")
41+
@Config.Comment({
42+
"The amount of chunks renderers to update PER SECOND. This is a MAXIMUM limit, not a minimum.",
43+
"Every chunk has 32 chunk renderers (16 subchunks, each has 2 render passes)"
44+
})
4345
@Config.LangKey("config.falsetweaks.occlusion.updates_per_second")
4446
@Config.DefaultInt(200)
45-
@Config.RangeInt(min = 10, max = 10000)
47+
@Config.RangeInt(min = 10,
48+
max = 10000)
4649
public static int CHUNK_UPDATES_PER_SECOND;
4750

48-
@Config.Comment("The occlusion caller uses a dynamic allocation for renderlists.\n" +
49-
"You can set this to any value above zero, but setting it too high will eat a bit more VRAM. 4096 is\n" +
50-
"a decent safe point.\n" +
51-
"FPS impact: zero when tuned right")
51+
@Config.Comment({
52+
"The occlusion caller uses a dynamic allocation for renderlists.",
53+
"You can set this to any value above zero, but setting it too high will eat a bit more VRAM. 4096 is",
54+
"a decent safe point.",
55+
"FPS impact: zero when tuned right"
56+
})
5257
@Config.RangeInt(min = 0)
5358
@Config.LangKey("config.falsetweaks.occlusion.cache_size_target")
5459
@Config.DefaultInt(4096)
5560
public static int CACHE_SIZE_TARGET;
5661

57-
@Config.Comment("Changes the maximum render distance.\n" +
58-
"NOTE: things might get extremely laggy above 32 without serverside performance mods!\n")
59-
@Config.RangeInt(min = 16, max = MaximumRenderDistance)
62+
@Config.Comment({
63+
"Changes the maximum render distance.",
64+
"NOTE: things might get extremely laggy above 32 without serverside performance mods!"
65+
})
66+
@Config.RangeInt(min = 16,
67+
max = MaximumRenderDistance)
6068
@Config.LangKey("config.falsetweaks.occlusion.render_distance")
6169
@Config.DefaultInt(32)
6270
public static int RENDER_DISTANCE;
6371

64-
@Config.Comment("Makes sure that the clipping helper is only initialized once per frame.\n" +
65-
"Saves a bunch of opengl data retrieval calls and some matrix math, but might lead of weird/broken\n" +
66-
"culling behaviour, so this is disabled by default.\n" +
67-
"DO NOT REPORT BUGS IF YOU TURNED THIS ON!")
72+
@Config.Comment({
73+
"Makes sure that the clipping helper is only initialized once per frame.",
74+
"Saves a bunch of opengl data retrieval calls and some matrix math, but might lead of weird/broken",
75+
"culling behaviour, so this is disabled by default.",
76+
"DO NOT REPORT BUGS IF YOU TURNED THIS ON!"
77+
})
6878
@Config.LangKey("config.falsetweaks.occlusion.aggressive_clipping_helper")
6979
@Config.DefaultBoolean(false)
7080
public static boolean AGGRESSIVE_CLIPPING_HELPER_OPTIMIZATIONS;

src/main/java/com/falsepattern/falsetweaks/config/OptiSpamConfig.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.falsepattern.falsetweaks.Tags;
44
import com.falsepattern.lib.config.Config;
55
import com.falsepattern.lib.config.ConfigurationManager;
6+
67
@Config(modid = Tags.MOD_ID,
78
category = "optifine_log_spam_fixes")
89
public class OptiSpamConfig {
@@ -25,9 +26,11 @@ public class OptiSpamConfig {
2526
@Config.LangKey("config.falsetweaks.optispam.custom_uniforms")
2627
@Config.DefaultBoolean(true)
2728
public static boolean CUSTOM_UNIFORMS;
29+
2830
static {
2931
ConfigurationManager.selfInit();
3032
}
33+
3134
//This is here to make the static initializer run
3235
public static void init() {
3336

src/main/java/com/falsepattern/falsetweaks/config/RenderListConfig.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@
3030
@Config(modid = Tags.MOD_ID,
3131
category = "item_render_lists")
3232
public class RenderListConfig {
33-
@Config.Comment("The total amount of renderlists FalseTweaks may allocate for optimized item rendering.\n" +
34-
"When the limit is exceeded, the render list that was used the longest time ago gets released.\n" +
35-
"Bigger buffer sizes use more VRAM, but also get a higher average performance.\n" +
36-
"256 should be good enough for most modded games, and going above 1024 is not recommended unless\n" +
37-
"you have a lot of VRAM.\n" + "(Only useful if you have ITEM_RENDERLISTS turned on)\n" +
38-
"FPS impact: zero when tuned right")
33+
@Config.Comment({
34+
"The total amount of renderlists FalseTweaks may allocate for optimized item rendering.",
35+
"When the limit is exceeded, the render list that was used the longest time ago gets released.",
36+
"Bigger buffer sizes use more VRAM, but also get a higher average performance.",
37+
"256 should be good enough for most modded games, and going above 1024 is not recommended unless",
38+
"you have a lot of VRAM.",
39+
"(Only useful if you have ITEM_RENDERLISTS turned on)",
40+
"FPS impact: zero when tuned right"
41+
})
3942
@Config.RangeInt(min = 64)
4043
@Config.LangKey("config.falsetweaks.item_render_lists.max_buffer_size")
4144
@Config.DefaultInt(256)

src/main/java/com/falsepattern/falsetweaks/config/RenderingSafetyConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ public class RenderingSafetyConfig {
1111
@Config.LangKey("config.falsetweaks.rendering_safety.block")
1212
@Config.DefaultBoolean(true)
1313
public static boolean ENABLE_BLOCK;
14+
1415
@Config.Comment("Enable safety wrapper for tile entities.")
1516
@Config.LangKey("config.falsetweaks.rendering_safety.tesr")
1617
@Config.DefaultBoolean(true)
1718
public static boolean ENABLE_TESR;
19+
1820
@Config.Comment("Enable safety wrapper for items.")
1921
@Config.LangKey("config.falsetweaks.rendering_safety.item")
2022
@Config.DefaultBoolean(true)

0 commit comments

Comments
 (0)