Class GeneratableElement
java.lang.Object
net.mcreator.element.GeneratableElement
- Direct Known Subclasses:
Achievement, Armor, Attribute, BannerPattern, BEBlock, 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(Object value) Checks if the type of the passed value 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 type of the passed value is likely part of the data model and not related to the technical part of the application. Scanning values that do not pass this condition will most probably lead to aStackOverflowError.
NOTE: If the checked values are instances of a class not contained in this module, they will still be checked.- Parameters:
value- The value that should be checked.- Returns:
- Whether it is safe to scan the
valueobject deeper.
-