Class ModElementManager

java.lang.Object
net.mcreator.workspace.elements.ModElementManager

@NotThreadSafe public final class ModElementManager extends Object
ModElementManager is not thread safe
  • Constructor Details

    • ModElementManager

      public ModElementManager(@Nonnull Workspace workspace)
  • Method Details

    • getLastElementInConversion

      public ModElement getLastElementInConversion()
    • storeModElement

      public void storeModElement(GeneratableElement element)
      Also stores to cache. Is thread safe.
      Parameters:
      element - GeneratableElement to convert to store
    • removeModElement

      public void removeModElement(ModElement element)
    • generatableElementToJSON

      public String generatableElementToJSON(GeneratableElement element)
    • fromJSONtoGeneratableElement

      public GeneratableElement fromJSONtoGeneratableElement(String json, ModElement modElement)
    • requiresElementGradleBuild

      public boolean requiresElementGradleBuild(GeneratableElement generatableElement)
    • storeModElementPicture

      public void storeModElementPicture(GeneratableElement element)
      This method should be called after the mod element is generated by Generator So potential metadata fields of ModElement are properly loaded.
      Parameters:
      element - GeneratableElement to generate the picture for
    • getModElementIcon

      public static ImageIcon getModElementIcon(ModElement element)
    • invalidateCache

      public void invalidateCache()
      Invalidates the generatable element cache