Class FMLMixinClassProcessor

java.lang.Object
net.neoforged.fml.loading.mixin.FMLMixinClassProcessor
All Implemented Interfaces:
ClassProcessor

public class FMLMixinClassProcessor extends Object implements ClassProcessor
  • Field Details

  • Constructor Details

    • FMLMixinClassProcessor

      public FMLMixinClassProcessor(FMLMixinService service)
  • Method Details

    • link

      public void link(ClassProcessor.LinkContext context)
      Description copied from interface: ClassProcessor
      Called once after a set of class processors has been linked together with a bytecode source. FML will not call transformation methods on this class processor, until it has been linked.

      FML only links providers once during startup.

      Specified by:
      link in interface ClassProcessor
    • name

      public ProcessorName name()
      Description copied from interface: ClassProcessor
      Returns a unique identifier for this processor.
      Specified by:
      name in interface ClassProcessor
      Returns:
      a unique identifier for this processor
    • generatesPackages

      public Set<String> generatesPackages()
      Description copied from interface: ClassProcessor
      Returns packages that this processor generates classes for, that do not already exist on the game layer. Generated packages in the game layer will be in the module "net.neoforged.fml.generated".
      Specified by:
      generatesPackages in interface ClassProcessor
      Returns:
      packages that this processor generates classes for, that do not already exist on the game layer
    • handlesClass

      public boolean handlesClass(ClassProcessor.SelectionContext context)
      Description copied from interface: ClassProcessor
      Returns whether the processor wants to recieve the class.
      Specified by:
      handlesClass in interface ClassProcessor
      Parameters:
      context - the context of the class to consider
      Returns:
      whether the processor wants to recieve the class
    • processesClass

      private boolean processesClass(Type classType)
    • generatesClass

      boolean generatesClass(Type classType)
    • generateClass

      boolean generateClass(Type classType, ClassNode classNode)
    • processClass

      Description copied from interface: ClassProcessor
      Each class that the processor has opted to recieve is passed to this method for processing.
      Specified by:
      processClass in interface ClassProcessor
      Parameters:
      context - the context of the class to process
      Returns:
      the ClassProcessor.ComputeFlags indicating how the class should be rewritten.
    • afterProcessing

      public void afterProcessing(ClassProcessor.AfterProcessingContext context)
      Description copied from interface: ClassProcessor
      Where a class may be processed multiple times by the same processor (for example, if in addition to being loaded a later processor requests the state of the given class using a BytecodeProvider), an after-processing callback is guaranteed to run at most once per class, just before class load. A transformer will only see this context for classes it has processed.
      Specified by:
      afterProcessing in interface ClassProcessor
      Parameters:
      context - the context of the class that was processed