Package mindustry.core
Class ContentLoader
java.lang.Object
mindustry.core.ContentLoader
Loads all game content.
Call load() before doing anything with content.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionblock
(int id) blocks()
bullet
(int id) bullets()
void
Creates all base types.void
Creates mod content, if applicable.void
getBy
(ContentType type) <T extends Content>
TgetByID
(ContentType type, int id) <T extends MappableContent>
TgetByName
(ContentType type, String name) Get last piece of content created for error-handling purposes.void
handleContent
(Content content) void
handleMappableContent
(MappableContent content) void
init()
Calls Content#init() on everything.item
(int id) items()
liquid
(int id) liquids()
void
load()
Calls Content#loadIcon() and Content#load() on everything.void
Loads block colors.void
Logs content statistics.planets()
void
Remove last content added in case of an exception.sectors()
void
void
setTemporaryMapper
(MappableContent[][] temporaryMapper) statusEffect
(String name) transformName
(String name) unit
(int id) units()
-
Constructor Details
-
ContentLoader
public ContentLoader()
-
-
Method Details
-
createBaseContent
public void createBaseContent()Creates all base types. -
createModContent
public void createModContent()Creates mod content, if applicable. -
logContent
public void logContent()Logs content statistics. -
init
public void init()Calls Content#init() on everything. Use only after all modules have been created. -
load
public void load()Calls Content#loadIcon() and Content#load() on everything. Use only after all modules have been created on the client. -
loadColors
public void loadColors()Loads block colors. -
getLastAdded
Get last piece of content created for error-handling purposes. -
removeLast
public void removeLast()Remove last content added in case of an exception. -
handleContent
-
setCurrentMod
-
transformName
-
handleMappableContent
-
setTemporaryMapper
-
getContentMap
-
each
-
getByName
-
getByID
-
getBy
-
blocks
-
block
-
block
-
items
-
item
-
item
-
liquids
-
liquid
-
liquid
-
bullets
-
bullet
-
statusEffects
-
statusEffect
-
sectors
-
sector
-
units
-
unit
-
unit
-
planets
-
planet
-