mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-29 01:04:29 +00:00
PackResources.idOf: the id a pack gives the resource its files name by a key (ResourceId.ofPackKey)
This commit is contained in:
1 parent
d2d746734f
commit
d17a017418
5 files changed
+34
-2
No files matched your search
@@ -19,6 +19,13 @@ import java.util.OptionalInt;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class ApiValuesTest {
|
||||
@Test
|
||||
void aPackKeyBecomesTheIdOfItsResource() {
|
||||
assertEquals(ResourceId.parse("overworld:dungeon/chest"), ResourceId.ofPackKey("overworld", "dungeon/chest"));
|
||||
assertEquals(ResourceId.parse("overworld:dungeon/chest_1"), ResourceId.ofPackKey("overworld", "Dungeon/Chest 1"));
|
||||
assertEquals(ResourceId.parse("test:a/b"), new com.volmit.support.EmptyResources().idOf("a/b"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void idsAndStateKeysAreExplicitCanonicalImmutableValues() {
|
||||
for (String invalid : List.of("stone", "Minecraft:stone", "a:b:c", "a:", ":a")) {
|
||||
|
||||
Reference in new issue
Block a user