Record Class WorkspaceInfo

java.lang.Object
java.lang.Record
net.mcreator.workspace.misc.WorkspaceInfo

public record WorkspaceInfo(Workspace workspace) extends Record
  • Constructor Details

    • WorkspaceInfo

      public WorkspaceInfo(Workspace workspace)
      Creates an instance of a WorkspaceInfo record class.
      Parameters:
      workspace - the value for the workspace record component
  • Method Details

    • getElementsOfType

      public List<ModElement> getElementsOfType(String typeString)
    • getGElementsOfType

      public List<GeneratableElement> getGElementsOfType(String typeString)
    • hasElementsOfBaseType

      public boolean hasElementsOfBaseType(String baseTypeString)
    • hasElementsOfType

      public boolean hasElementsOfType(String typeString)
    • hasVariablesOfScope

      public boolean hasVariablesOfScope(String type)
    • hasVariables

      public boolean hasVariables()
    • hasSounds

      public boolean hasSounds()
    • hasJavaModels

      public boolean hasJavaModels()
    • getItemTextureMap

      public Map<String,TextureHolder> getItemTextureMap()
    • hasItemsInTabs

      public boolean hasItemsInTabs()
    • getCreativeTabMap

      public Map<String,List<MItemBlock>> getCreativeTabMap()
    • filterBrokenReferences

      public <T extends MappableElement> Set<MappableElement> filterBrokenReferences(Collection<T> input)
    • normalizeTagElements

      public <T extends MappableElement> Set<MappableElement> normalizeTagElements(String tag, int mappingTable, Collection<T> elements)
      Returns a set of mappable elements that do not trigger circular dependency to tag
      Type Parameters:
      T - Type of elements
      Parameters:
      tag - Tag name with namespace to check. A plain name without # or TAG: prefix is required.
      mappingTable - Mapping table to use for getting mapped values of the elements
      elements - Collection of elements to normalize/filter
      Returns:
      Set of elements that do not trigger circular dependency to tag
    • getUUID

      public String getUUID(String offset)
    • getUUID

      public String getUUID()
    • itemBlock

      public MItemBlock itemBlock(String itemBlock)
    • getWorkspace

      public Workspace getWorkspace()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • workspace

      public Workspace workspace()
      Returns the value of the workspace record component.
      Returns:
      the value of the workspace record component