Class GeneratableElement
java.lang.Object
net.mcreator.element.GeneratableElement
- Direct Known Subclasses:
Achievement, Armor, ArmorTrim, Attribute, BannerPattern, BEBiome, BEBlock, BEEntity, BEItem, BEScript, Biome, Block, Command, CustomElement, DamageType, Dimension, Enchantment, Feature, Fluid, GameRule, GeneratableElement.Unknown, GUI, Item, ItemExtension, KeyBinding, LivingEntity, NamespacedGeneratableElement, Overlay, Painting, Particle, Plant, Potion, PotionEffect, Procedure, Projectile, SpecialEntity, Structure, Tab, Tool, VillagerProfession, VillagerTrade
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method should take care of generating additional mod element resources for cases such as GUI mod elementOverride this to add additional data to the element data modelstatic booleanisDataModelObject(Class<?> clazz) Checks if the passed type is likely part of the data model and not related to the technical part of the application.booleanvoidsetModElement(ModElement element) boolean
-
Field Details
-
formatVersion
public static final int formatVersion- See Also:
-
-
Constructor Details
-
GeneratableElement
-
-
Method Details
-
getModElement
-
setModElement
-
generateModElementPicture
- Returns:
- BufferedImage of mod element preview or null if default mod element icon should be used
-
finalizeModElementGeneration
public void finalizeModElementGeneration()This method should take care of generating additional mod element resources for cases such as GUI mod element -
getAdditionalTemplateData
Override this to add additional data to the element data model- Returns:
- null if no additional data, or IAdditionalTemplateDataProvider implementation
-
wasConversionApplied
public boolean wasConversionApplied() -
isUnknown
public boolean isUnknown() -
isDataModelObject
Checks if the passed type is likely part of the data model and not related to the technical part of the application. Scanning types that do not pass this condition will most probably lead to aStackOverflowError.- Parameters:
clazz- The type that should be checked.- Returns:
- Whether it is safe to scan instances of the
clazzdeeper.
-