Package mindustry.mod
Class ContentParser
java.lang.Object
mindustry.mod.ContentParser
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidarc.util.serialization.JsongetJson()voidvoidmarkError(Content content, Mods.LoadedMod mod, arc.files.Fi file, Throwable error) parse(Mods.LoadedMod mod, String name, String json, arc.files.Fi file, ContentType type) Parses content from a json file.voidreadBlockConsumers(Block block, arc.util.serialization.JsonValue value)
-
Constructor Details
-
ContentParser
public ContentParser()
-
-
Method Details
-
readBlockConsumers
-
finishParsing
public void finishParsing() -
parse
public Content parse(Mods.LoadedMod mod, String name, String json, arc.files.Fi file, ContentType type) throws Exception Parses content from a json file.- Parameters:
name- the name of the file without its extensionjson- the json to parsetype- the type of content this isfile- file that this content is being parsed from- Returns:
- the content that was parsed
- Throws:
Exception
-
checkInit
public void checkInit() -
markError
-
markError
-
getJson
public arc.util.serialization.Json getJson()
-