Class ReferencesFinder

java.lang.Object
net.mcreator.workspace.references.ReferencesFinder

public class ReferencesFinder extends Object
  • Constructor Details

    • ReferencesFinder

      public ReferencesFinder()
  • Method Details

    • searchModElementUsages

      public static Set<ModElement> searchModElementUsages(Workspace workspace, ModElement element)
    • searchTextureUsages

      public static Set<ModElement> searchTextureUsages(Workspace workspace, File texture, TextureType type)
    • searchModelUsages

      public static Set<ModElement> searchModelUsages(Workspace workspace, Model model)
    • searchAnimationUsages

      public static Set<ModElement> searchAnimationUsages(Workspace workspace, Animation animation)
    • searchSoundUsages

      public static Set<ModElement> searchSoundUsages(Workspace workspace, SoundElement sound)
    • searchStructureUsages

      public static Set<ModElement> searchStructureUsages(Workspace workspace, String structure)
    • searchGlobalVariableUsages

      public static Set<ModElement> searchGlobalVariableUsages(Workspace workspace, String variableName)
    • searchLocalizationKeyUsages

      public static Set<ModElement> searchLocalizationKeyUsages(Workspace workspace, String localizationKey)
    • anyValueMatches

      public static <T> boolean anyValueMatches(@Nullable Object source, Class<T> clazz, Predicate<AccessibleObject> validIf, BiPredicate<AccessibleObject,T> condition)
      Checks if values acquired from any valid fields or methods meet the specified condition.
      Type Parameters:
      T - The type of values to be checked.
      Parameters:
      source - The object to extract values from.
      clazz - The class of values to be checked.
      validIf - The predicate used to check if a field/method is considered valid.
      condition - The predicate defining the condition that the acquired values should pass.
      Returns:
      Whether any value extracted from valid fields/methods on the source object pass the condition.