ModInfo

Holds information about a loaded mod

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.mods.ModInfo;

Properties

NameTypeHas GetterHas SetterDescription
blocksstdlib.List<MCBlock>truefalseFinds all blocks registered for that mod.
displayNamestringtruefalseGets the display name of the mod
entitytypesstdlib.List<MCEntityType>truefalseFinds all EntityTypes registered for that mod
fluidsstdlib.List<MCFluid>truefalseFinds all EntityTypes registered for that mod
itemsstdlib.List<IItemStack>truefalseGets all known items from that mod

Does not take "sub items" into account!
That means, that it will e.g. find an enchanted book, but without tags, and only one!
modidstringtruefalseGets the modid of the mod
namespacestringtruefalseGets the namespace of the mod
versionstringtruefalseGets the version of the mod