Enum Class TinyMappingFormat
- All Implemented Interfaces:
Serializable,Comparable<TinyMappingFormat>,Constable
mapping format.- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionorg.cadixdev.lorenz.io.MappingsReadercreateReader(Path path, String from, String to) Creates a newmappings readerfor the mappings contained by the path supplied.org.cadixdev.lorenz.io.MappingsWritercreateWriter(Writer writer, String from, String to) Creates a newmappings writerfor the writer supplied.protected abstract net.fabricmc.mappingio.tree.MappingTreeload(BufferedReader reader) org.cadixdev.lorenz.MappingSetReads Tiny mappings from the given path, into a newmapping set.org.cadixdev.lorenz.MappingSetReads Tiny mappings from the given path, into the givenmapping set.static TinyMappingFormatReturns the enum constant of this class with the specified name.static TinyMappingFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.voidWrite the givenmapping setto the file specified by the suppliedpath.
-
Enum Constant Details
-
TINY_2
Reads tiny mappings with new v2 ("tiny"header). -
TINY
Reads tiny mappings with legacy v1 format ("v1"header). -
DETECT
Reads mappings of of any supported format.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
load
protected abstract net.fabricmc.mappingio.tree.MappingTree load(BufferedReader reader) throws IOException - Throws:
IOException
-
createWriter
Creates a newmappings writerfor the writer supplied.The resulting mappings written will use the
fromnamespace (for the obfuscated names in Lorenz) to thetonamespace (for the de-obfuscated names in Lorenz).- Parameters:
writer- TheWriterto write the mappings tofrom- The namespace to place the obfuscated names underto- The namespace to place the deobfuscated names under- Returns:
- The mappings writer
- Since:
- 3.0.0
-
write
public void write(org.cadixdev.lorenz.MappingSet mappings, Path path, String from, String to) throws IOException Write the givenmapping setto the file specified by the suppliedpath.The resulting mappings written will use the
fromnamespace (for the obfuscated names in Lorenz) to thetonamespace (for the de-obfuscated names in Lorenz).- Parameters:
mappings- The mappings to writepath- The file to write the mappings tofrom- The namespace to place the obfuscated names underto- The namespace to place the deobfuscated names under- Throws:
IOException- if an I/O error occurs writing the file- Since:
- 3.0.0
-
createReader
public org.cadixdev.lorenz.io.MappingsReader createReader(Path path, String from, String to) throws IOException Creates a newmappings readerfor the mappings contained by the path supplied.The resulting
mappingswill use the from namespace (as the obfuscated names in Lorenz) to the to namespace (as the de-obfuscated names in Lorenz).- Parameters:
path- The path to the Tiny mappingsfrom- The namespace to use in the tiny file, as Lorenz's obfuscated namesto- The namespace to use in the tiny file, as Lorenz's de-obfuscated names- Returns:
- The mappings reader
- Throws:
IOException- if an I/O error occurs opening the file
-
read
public org.cadixdev.lorenz.MappingSet read(org.cadixdev.lorenz.MappingSet mappings, Path path, String from, String to) throws IOException Reads Tiny mappings from the given path, into the givenmapping set.The resulting
mappingswill use the from namespace (as the obfuscated names in Lorenz) to the to namespace (as the de-obfuscated names in Lorenz).- Parameters:
mappings- The mapping set to read topath- The path to the Tiny mappingsfrom- The namespace to use in the tiny file, as Lorenz's obfuscated namesto- The namespace to use in the tiny file, as Lorenz's de-obfuscated names- Returns:
- The given mapping set
- Throws:
IOException- if an I/O error occurs opening the file
-
read
Reads Tiny mappings from the given path, into a newmapping set.The resulting
mappingswill use the from namespace (as the obfuscated names in Lorenz) to the to namespace (as the de-obfuscated names in Lorenz).- Parameters:
path- The path to the Tiny mappingsfrom- The namespace to use in the tiny file, as Lorenz's obfuscated namesto- The namespace to use in the tiny file, as Lorenz's de-obfuscated names- Returns:
- The mapping set
- Throws:
IOException- if an I/O error occurs opening the file
-