Package appeng.api.definitions

Examples of appeng.api.definitions.Parts


    MinecraftForge.EVENT_BUS.register( OreDictionaryHandler.instance );

    Items items = appeng.core.Api.instance.items();
    Materials materials = appeng.core.Api.instance.materials();
    Parts parts = appeng.core.Api.instance.parts();
    Blocks blocks = appeng.core.Api.instance.blocks();

    AEItemDefinition materialItem = addFeature( ItemMultiMaterial.class );

    Class materialClass = materials.getClass();
    for (MaterialType mat : MaterialType.values())
    {
      try
      {
        if ( mat == MaterialType.InvalidType )
          ((ItemMultiMaterial) materialItem.item()).createMaterial( mat );
        else
        {
          Field f = materialClass.getField( "material" + mat.name() );
          IStackSrc is = ((ItemMultiMaterial) materialItem.item()).createMaterial( mat );
          if ( is != null )
            f.set( materials, new DamagedItemDefinition( is ) );
          else
            f.set( materials, new NullItemDefinition() );
        }
      }
      catch (Throwable err)
      {
        AELog.severe( "Error creating material: " + mat.name() );
        throw new RuntimeException( err );
      }
    }

    AEItemDefinition partItem = addFeature( ItemMultiPart.class );

    Class partClass = parts.getClass();
    for (PartType type : PartType.values())
    {
      try
      {
        if ( type == PartType.InvalidType )
View Full Code Here


    /**
     * attune based on lots of random item related stuff
     */
    appeng.api.definitions.Blocks AEBlocks = AEApi.instance().blocks();
    Parts Parts = AEApi.instance().parts();

    addNewAttunement( AEBlocks.blockInterface.stack( 1 ), TunnelType.ITEM );
    addNewAttunement( Parts.partInterface.stack( 1 ), TunnelType.ITEM );
    addNewAttunement( Parts.partStorageBus.stack( 1 ), TunnelType.ITEM );
    addNewAttunement( Parts.partImportBus.stack( 1 ), TunnelType.ITEM );
View Full Code Here

TOP

Related Classes of appeng.api.definitions.Parts

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.