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

public abstract class GeneratableElement extends Object
  • Field Details

  • Constructor Details

    • GeneratableElement

      public GeneratableElement(ModElement element)
  • Method Details

    • getModElement

      public ModElement getModElement()
    • setModElement

      public void setModElement(ModElement element)
    • generateModElementPicture

      public BufferedImage 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

      @Nullable public IAdditionalTemplateDataProvider 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

      public static boolean isDataModelObject(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. Scanning values that do not pass this condition will most probably lead to a StackOverflowError.
      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 value object deeper.