Search in sources :

Example 1 with AccessorContainerCrafter

use of top.theillusivec4.polymorph.mixin.integration.cyclic.AccessorContainerCrafter in project Polymorph by TheIllusiveC4.

the class CyclicModule method setup.

@Override
public void setup() {
    IPolymorphCommon commonApi = PolymorphApi.common();
    commonApi.registerTileEntity2RecipeData(tileEntity -> {
        if (tileEntity instanceof TileCrafter) {
            return new TileCrafterRecipeData((TileCrafter) tileEntity);
        }
        return null;
    });
    commonApi.registerContainer2TileEntity(container -> {
        if (container instanceof ContainerCrafter) {
            return ((AccessorContainerCrafter) container).getTile();
        }
        return null;
    });
}
Also used : ContainerCrafter(com.lothrazar.cyclic.block.crafter.ContainerCrafter) AccessorContainerCrafter(top.theillusivec4.polymorph.mixin.integration.cyclic.AccessorContainerCrafter) AccessorContainerCrafter(top.theillusivec4.polymorph.mixin.integration.cyclic.AccessorContainerCrafter) IPolymorphCommon(top.theillusivec4.polymorph.api.common.base.IPolymorphCommon) AccessorTileCrafter(top.theillusivec4.polymorph.mixin.integration.cyclic.AccessorTileCrafter) TileCrafter(com.lothrazar.cyclic.block.crafter.TileCrafter)

Aggregations

ContainerCrafter (com.lothrazar.cyclic.block.crafter.ContainerCrafter)1 TileCrafter (com.lothrazar.cyclic.block.crafter.TileCrafter)1 IPolymorphCommon (top.theillusivec4.polymorph.api.common.base.IPolymorphCommon)1 AccessorContainerCrafter (top.theillusivec4.polymorph.mixin.integration.cyclic.AccessorContainerCrafter)1 AccessorTileCrafter (top.theillusivec4.polymorph.mixin.integration.cyclic.AccessorTileCrafter)1