Class MultipartGenerator

java.lang.Object
codechicken.mixin.MixinFactoryImpl<TileMultipart,MultipartGenerator.Factory>
codechicken.mixin.SidedFactory<TileMultipart,MultipartGenerator.Factory,MultiPart>
codechicken.multipart.util.MultipartGenerator
All Implemented Interfaces:
codechicken.mixin.api.MixinFactory<TileMultipart,MultipartGenerator.Factory>

public class MultipartGenerator extends codechicken.mixin.SidedFactory<TileMultipart,MultipartGenerator.Factory,MultiPart>
Created by covers1624 on 4/5/20.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     

    Nested classes/interfaces inherited from interface codechicken.mixin.api.MixinFactory

    codechicken.mixin.api.MixinFactory.TraitKey
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final MultipartGenerator
     
    static final codechicken.mixin.api.MixinCompiler
     

    Fields inherited from class codechicken.mixin.SidedFactory

    clientObjectTraitCache, clientTraits, serverObjectTraitCache, serverTraits

    Fields inherited from class codechicken.mixin.MixinFactoryImpl

    baseType, classCache, classSuffix, counter, factoryCache, factoryClass, factoryGenerator, mixinCompiler, registeredTraits, traitLookup
  • Method Summary

    Modifier and Type
    Method
    Description
    generateCompositeTile(@Nullable net.minecraft.world.level.block.entity.BlockEntity tile, net.minecraft.core.BlockPos pos, Collection<MultiPart> parts, boolean client)
     
    com.google.common.collect.ImmutableSet<codechicken.mixin.api.MixinFactory.TraitKey>
    getTraits(MultiPart part, boolean client)
     
    com.google.common.collect.ImmutableSet<codechicken.mixin.api.MixinFactory.TraitKey>
    getTraits(Collection<MultiPart> parts, boolean client)
     
    void
    load(net.neoforged.bus.api.IEventBus modBus)
     
    void
    Overload for registerPassThroughInterface(Class, boolean, boolean), passing true to both boolean parameters.
    void
    registerPassThroughInterface(Class<?> iFace, boolean client, boolean server)
    A passthrough interface is an interface to be implemented on the container tile instance, for which all calls are passed directly through to a single implementing part.
    codechicken.mixin.api.MixinFactory.TraitKey
     

    Methods inherited from class codechicken.mixin.SidedFactory

    getObjectTraitCache, getTraitMap, getTraitsForObject, hierarchy, register, registerTrait, registerTrait

    Methods inherited from class codechicken.mixin.MixinFactoryImpl

    construct, getMixinCompiler, getTraitsForClass, registerTrait, registerTrait

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INSTANCE

      public static final MultipartGenerator INSTANCE
    • MIXIN_COMPILER

      public static final codechicken.mixin.api.MixinCompiler MIXIN_COMPILER
  • Method Details

    • registerPassThroughInterface

      public void registerPassThroughInterface(Class<?> iFace)
      Overload for registerPassThroughInterface(Class, boolean, boolean), passing true to both boolean parameters.
      Parameters:
      iFace - The interface.
    • registerPassThroughInterface

      public void registerPassThroughInterface(Class<?> iFace, boolean client, boolean server)
      A passthrough interface is an interface to be implemented on the container tile instance, for which all calls are passed directly through to a single implementing part. Registering a passthrough interface is equivalent to defining a mixin trait as follows. 1. field 'impl' which contains a reference to the corresponding part. 2. occlusionTest is overriden to prevent more than one part with iFace existing in the block space. 3. implementing iFace and passing all calls directly to the part instance.

      This allows compatibility with APIs that expect interfaces on the tile entity. If you require more than one part in the space implementing an interface, i.e the old IInventory system. You will need to write your own trait implementation manually. Refer to TInventoryTile.

      Parameters:
      iFace - The Interface to implement.
      client - If this interface should be used client side.
      server - If this interface should be used server side.
    • load

      public void load(net.neoforged.bus.api.IEventBus modBus)
    • getTraits

      public com.google.common.collect.ImmutableSet<codechicken.mixin.api.MixinFactory.TraitKey> getTraits(MultiPart part, boolean client)
    • getTraits

      public com.google.common.collect.ImmutableSet<codechicken.mixin.api.MixinFactory.TraitKey> getTraits(Collection<MultiPart> parts, boolean client)
    • generateCompositeTile

      public TileMultipart generateCompositeTile(@Nullable @Nullable net.minecraft.world.level.block.entity.BlockEntity tile, net.minecraft.core.BlockPos pos, Collection<MultiPart> parts, boolean client)
    • registerPassthroughTrait

      public codechicken.mixin.api.MixinFactory.TraitKey registerPassthroughTrait(Class<?> iClass)