You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Publish new things on https://maven.minecrafttas.com/#/main
- Add workflow for merging into develop to publish the snapshot
- Add workflow for releasing to publish main and snapshot
- Javadoc errors
/*Welcome to the madness that is this preprocessor. Here I will try as best as I can to explain how this works.
13
+
/*
14
+
* Welcome to the madness that is this preprocessor. Here I will try as best as I can to explain how this works.
14
15
* Why am I explaining it? Because my hope is, that at least I can remember what the hell I was doing when I made this
15
16
*
16
17
* Start of with the "preprocess" method which is the only public method here.
@@ -48,7 +49,7 @@ public class LinePreprocessor {
48
49
* "1.20",
49
50
* "1.19",
50
51
* "1.18",
51
-
* "1.16" <- default version since it's the lowest
52
+
* "1.16" <- default version since it's the lowest
52
53
* ]
53
54
* </pre>
54
55
* @param versions The versions to check for in an order
@@ -64,7 +65,7 @@ public LinePreprocessor(List<String> versions, Map<String, Map<String, String>>
64
65
*
65
66
* <pre>
66
67
* [
67
-
* "1.20", <- default version since it's the highest
68
+
* "1.20", <- default version since it's the highest
68
69
* "1.19",
69
70
* "1.18",
70
71
* "1.16"
@@ -83,15 +84,15 @@ public LinePreprocessor(List<String> versions, Map<String, Map<String, String>>
83
84
}
84
85
85
86
/**
86
-
* Preprocesses the lines to a targeted version.
87
+
* <p>Preprocesses the lines to a targeted version.
87
88
* <p>Preprocessing can happen in 2 ways:<br>
88
89
* <ol>
89
90
* <li>Preprocessing a block of code</li>
90
91
* <li>Preprocessing a specific line of code with patterns</li>
91
92
* </ol>
92
93
* <p>The advantage of pattern processing is that you can save yourself some work making a version block for common patterns like <code>Minecraft.getMinecraft().player</code> in 1.12 to <code>Minecraft.getMinecraft().thePlayer</code> in e.g. 1.10
93
94
*
94
-
* <h2>VersionBlock</h2>
95
+
* <h4>VersionBlock</h4>
95
96
* <p>A version block allows you to uncomment part of the code in certain versions via comments:
96
97
* <pre>
97
98
* //# 1.12.2
@@ -107,7 +108,7 @@ public LinePreprocessor(List<String> versions, Map<String, Map<String, String>>
107
108
*
108
109
* <p>You can define these blocks out of order (e.g. first 1.9.4 then 1.12.2)... The version order is ultimately defined in the build.gradle.
109
110
*
110
-
* <h3>Nesting</h3>
111
+
* <h5>Nesting</h5>
111
112
*
112
113
* <p>Sometimes you have a lot of changes in one version but a tiny amount is added in the following versions. In these cases, you would need to copy all the large changes again into the newest version:
113
114
*
@@ -139,9 +140,9 @@ public LinePreprocessor(List<String> versions, Map<String, Map<String, String>>
139
140
* than the changes in
140
141
* 1.16.5
141
142
*
142
-
* //## 1.16.5 <-- 2 hashtags define the nested version
143
+
* //## 1.16.5 <-- 2 hashtags define the nested version
143
144
* New things in 1.16.5
144
-
* //## end <-- The end of the nested block is defined with 2 hashtags as well
145
+
* //## end <-- The end of the nested block is defined with 2 hashtags as well
145
146
*
146
147
* //# end
147
148
* </pre>
@@ -157,7 +158,7 @@ public LinePreprocessor(List<String> versions, Map<String, Map<String, String>>
157
158
* <li>Using def in a nested block will use the parent version</li>
158
159
* </ul>
159
160
*
160
-
* <h2>Patterns</h2>
161
+
* <h4>Patterns</h4>
161
162
* Patterns are defined in the build.gradle:
162
163
*
163
164
* <pre>
@@ -186,7 +187,7 @@ public LinePreprocessor(List<String> versions, Map<String, Map<String, String>>
186
187
*
187
188
* @param targetVersion The version for which lines should be enabled
188
189
* @param lines The lines to preprocess
189
-
* @param filename Debug filename for errors during preprocessing
190
+
* @param fileending The fileending of the preprocess file for applying different comment types
* Generates a list of version blocks by prereading the block. To take nesting into account, it generates the lists recursively. Most of the error checking is done here.
0 commit comments