mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-21 07:46:55 +00:00
Modded pack metadata
- Modded jars ship pack.mcmeta for client resources and mod data - Modded jars bundle jlibdeflate and its native libraries - Artifact check requires pack.mcmeta and the jlibdeflate entries - Artifact check rejects client language resources without pack.mcmeta - Test loads the pack metadata against the current Minecraft formats
This commit is contained in:
1 parent
c20296d106
commit
34684da611
8 files changed
+90
No files matched your search
@@ -44,6 +44,28 @@ public class ModdedArtifactVerifierTest {
|
||||
ModdedArtifactVerifier.verify(artifact, REQUIRED_ENTRIES);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void rejectsClientLanguagesWithoutPackMetadata() throws Exception {
|
||||
Map<String, byte[]> entries = validEntries();
|
||||
entries.put("assets/irisworldgen/lang/en_us.json", "{}".getBytes(StandardCharsets.UTF_8));
|
||||
File artifact = createArtifact(entries);
|
||||
|
||||
GradleException failure = assertThrows(GradleException.class,
|
||||
() -> ModdedArtifactVerifier.verify(artifact, REQUIRED_ENTRIES));
|
||||
assertTrue(failure.getMessage().contains("client language resources without pack.mcmeta"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void acceptsClientLanguagesWithPackMetadata() throws Exception {
|
||||
Map<String, byte[]> entries = validEntries();
|
||||
entries.put("assets/irisworldgen/lang/en_us.json", "{}".getBytes(StandardCharsets.UTF_8));
|
||||
entries.put("pack.mcmeta", ("{\"pack\":{\"description\":\"Iris\","
|
||||
+ "\"min_format\":[88,0],\"max_format\":[107,1]}}")
|
||||
.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
ModdedArtifactVerifier.verify(createArtifact(entries), REQUIRED_ENTRIES);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void rejectsRelocatedRuntimeReference() throws Exception {
|
||||
Map<String, byte[]> entries = validEntries();
|
||||
|
||||
Reference in new issue
Block a user