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
Copy file name to clipboardExpand all lines: doc/VALIDATORS.md
+99-1Lines changed: 99 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,23 +144,121 @@ Checks if all hashprefixed referenced textures (e.g. #side) are bound to a textu
144
144
## ModelOverridesExistsValidator
145
145
Checks if item overrides are correct and the referenced model exists.
146
146
147
+
> [!NOTE]
148
+
> This validator only takes model overrides from before 1.21.4 into account (not the new item definitions inside the items subfolder)
149
+
150
+
<details>
151
+
<summary>Failing Examples</summary>
152
+
<ul>
153
+
<li><br>
154
+
<prelang="json">{
155
+
"parent": "minecraft:item/generated",
156
+
"textures": {
157
+
"someKey": "someValue"
158
+
},
159
+
"overrides": [
160
+
{
161
+
"predicate": {
162
+
"custom_model_data": 1
163
+
},
164
+
"model": "some/path/not_existing"
165
+
}
166
+
]
167
+
}</pre><br>
168
+
In this example the override references a model path, which can not be resolved to a model json (e.g. the file does not exist or is located wrongly)
169
+
</li>
170
+
</ul>
171
+
</details>
172
+
147
173
## UnusedFileValidator
148
174
Checks every file if it has been referenced in any json file. Most files need to be referenced somewhere, but this check may falsely detect files, which are in use. This will not flag for vanilla texture/model overrides. Files can be ignored with the `ignore` option using shell globs or regex.
149
175
176
+
> [!NOTE]
177
+
> This validator may have many false-positives and false-negatives
178
+
179
+
150
180
## TextureLimitMipLevelValidator
151
181
Checks every PNG file, that will be loaded into the texture atlas, if it limits the mipmap levels. If the mip level drops below 4, the game displays certain textures with lower quality (e.g. leaves).
152
182
183
+
<details>
184
+
<summary>Details</summary>
185
+
Whenever a texture is loaded, which does not respect the texture sizes required for mip mapping, it may drop the usable mip level. For mip mapping to work (for mip map level 4) you need to have a texture size of at least 16x16, height and width should be divisible by 16 without a remainder. For comparison: Here are two screenshots with mip level 0 and mip level 4 (differences mostly notable on distant leaves):<br><br>
186
+
Mip Level 4:<br>
187
+
<imgalt="minecraft screenshot with mip level of 4"src="img/mip_level_4.png" /><br><br>
188
+
Mip Level 0:<br>
189
+
<imgalt="minecraft screenshot with mip level of 0"src="img/mip_level_0.png" />
190
+
</details>
191
+
<details>
192
+
<summary>Fixing textures</summary>
193
+
To fix textures that do limit the mip level, you simply need to adjust their size to be divisible by 16 without remainder. This may also involve changing the model files for UV mapping.
194
+
</details>
195
+
196
+
153
197
## TextureIsNotCorruptedValidator
154
198
Checks every PNG file, that is located in any resource pack directory, if the texture is an actual image.
155
199
156
200
## FontTextureExistsValidator
157
201
Checks if the texture file referenced in the font provider exists.
158
202
203
+
<details>
204
+
<summary>Failing Examples</summary>
205
+
<ul>
206
+
<li><br>
207
+
<prelang="json">{
208
+
"providers": [
209
+
{
210
+
"type": "bitmap",
211
+
"file": "some/path/not_existing.png",
212
+
"ascent": 4,
213
+
"height": 10,
214
+
"chars": [
215
+
"\uE000"
216
+
]
217
+
}
218
+
]
219
+
}</pre><br>
220
+
In this example the font provider references a texture which does not exist.
221
+
</li>
222
+
</ul>
223
+
</details>
224
+
225
+
159
226
## FontCharacterUsageValidator
160
227
Checks if a font file defines a character multiple times, which overrides the character.
161
228
229
+
<details>
230
+
<summary>Failing Examples</summary>
231
+
<ul>
232
+
<li><br>
233
+
<prelang="json">{
234
+
"providers": [
235
+
{
236
+
"type": "bitmap",
237
+
"file": "some/path/file1.png",
238
+
"ascent": 4,
239
+
"height": 10,
240
+
"chars": [
241
+
"\uE000"
242
+
]
243
+
},
244
+
{
245
+
"type": "bitmap",
246
+
"file": "some/path/file2.png",
247
+
"ascent": 4,
248
+
"height": 10,
249
+
"chars": [
250
+
"\uE000"
251
+
]
252
+
}
253
+
]
254
+
}</pre><br>
255
+
In this example the font provider references the same character twice, which would override the character.
256
+
</li>
257
+
</ul>
258
+
</details>
259
+
162
260
## InvalidPathValidator
163
261
Checks if a namespace or resource path violates the allowed pattern: [a-z0-9-_.] (for namespaces) and [a-z0-9-_./] for paths.
164
262
165
263
## ModelRequiresOverlayOverrideValidator
166
-
Checks if a model json, which is present in the default pack, is also present in a specified overlay. This Validator requires some additional configuration to run and may be used to make sure every model in a specified path is overridden in a specific overlay (e.g. to fix certain models in certain game versions).
264
+
Checks if a model json, which is present in the default pack, is also present in a specified overlay. This Validator requires some additional configuration to run and may be used to make sure every model in a specified path is overridden in a specific overlay (e.g. to fix certain models in certain game versions). Take a look at the [config file](CONFIG.md) for more details on how to configure this validator.
0 commit comments