Class SidedFactory<B,F,T>

java.lang.Object
codechicken.mixin.MixinFactoryImpl<B,F>
codechicken.mixin.SidedFactory<B,F,T>
All Implemented Interfaces:
MixinFactory<B,F>

public abstract class SidedFactory<B,F,T> extends MixinFactoryImpl<B,F>
Created by covers1624 on 20/1/24.
  • Field Details

  • Constructor Details

  • Method Details

    • registerTrait

      public void registerTrait(Class<?> marker, Class<?> trait)
      Overload of registerTrait(Class, Class, Class), using the same trait impl for client and server.
      Parameters:
      marker - The Marker class, to be found in the part instances class hierarchy.
    • registerTrait

      public void registerTrait(Class<?> marker, @Nullable @Nullable Class<?> clientTrait, @Nullable @Nullable Class<?> serverTrait)
      Registers a trait to be applied to the host tile in the presence of a specific marker class existing in the class hierarchy of a part instance.
      Parameters:
      marker - The Marker class, to be found in the part instances class hierarchy.
      clientTrait - The trait class to be applied on the client side.
      serverTrait - The trait class to be applied on the server side.
    • getTraitsForObject

      public com.google.common.collect.ImmutableSet<MixinFactory.TraitKey> getTraitsForObject(T thing, boolean client)
      Gets all the MixinFactory.TraitKey's this generator knows about from the thing's class hierarchy.
      Parameters:
      thing - The thing to get all traits from.
      client - If this is the client side or not.
      Returns:
      The MixinFactory.TraitKeys.
    • hierarchy

      protected net.covers1624.quack.collection.FastStream<Class<?>> hierarchy(Class<?> clazz)
    • getTraitMap

      protected Map<Class<?>,MixinFactory.TraitKey> getTraitMap(boolean client)
    • getObjectTraitCache

      protected Map<Class<?>,com.google.common.collect.ImmutableSet<MixinFactory.TraitKey>> getObjectTraitCache(boolean client)
    • register

      protected void register(Map<Class<?>,MixinFactory.TraitKey> map, Class<?> marker, Class<?> trait)