当前位置: 首页>>代码示例>>Java>>正文


Java IBundledRedstoneProvider类代码示例

本文整理汇总了Java中dan200.computercraft.api.redstone.IBundledRedstoneProvider的典型用法代码示例。如果您正苦于以下问题:Java IBundledRedstoneProvider类的具体用法?Java IBundledRedstoneProvider怎么用?Java IBundledRedstoneProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IBundledRedstoneProvider类属于dan200.computercraft.api.redstone包,在下文中一共展示了IBundledRedstoneProvider类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerBundledRedstoneProvider

import dan200.computercraft.api.redstone.IBundledRedstoneProvider; //导入依赖的package包/类
/**
 * Registers a bundled redstone handler to provide bundled redstone output for blocks
 * @see dan200.computercraft.api.redstone.IBundledRedstoneProvider
 */
public static void registerBundledRedstoneProvider( IBundledRedstoneProvider handler )
{
    findCC();
    if( computerCraft_registerBundledRedstoneProvider != null )
    {
        try {
            computerCraft_registerBundledRedstoneProvider.invoke( null, handler );
        } catch (Exception e) {
            // It failed
        }
    }
}
 
开发者ID:Herobone,项目名称:HeroUtils,代码行数:17,代码来源:ComputerCraftAPI.java

示例2: findCC

import dan200.computercraft.api.redstone.IBundledRedstoneProvider; //导入依赖的package包/类
private static void findCC()
{
	if( !ccSearched ) {
		try {
			computerCraft = Class.forName( "dan200.computercraft.ComputerCraft" );
			computerCraft_createUniqueNumberedSaveDir = findCCMethod( "createUniqueNumberedSaveDir", new Class[]{
                   World.class, String.class
               } );
			computerCraft_createSaveDirMount = findCCMethod( "createSaveDirMount", new Class[] {
				World.class, String.class, Long.TYPE
			} );
			computerCraft_createResourceMount = findCCMethod( "createResourceMount", new Class[] {
				Class.class, String.class, String.class
			} );
			computerCraft_registerPeripheralProvider = findCCMethod( "registerPeripheralProvider", new Class[] {
				IPeripheralProvider.class
			} );
               computerCraft_registerTurtleUpgrade = findCCMethod( "registerTurtleUpgrade", new Class[] {
                   ITurtleUpgrade.class
               } );
               computerCraft_registerBundledRedstoneProvider = findCCMethod( "registerBundledRedstoneProvider", new Class[] {
                   IBundledRedstoneProvider.class
               } );
               computerCraft_getDefaultBundledRedstoneOutput = findCCMethod( "getDefaultBundledRedstoneOutput", new Class[] {
                   World.class, Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE
               } );
               computerCraft_registerMediaProvider = findCCMethod( "registerMediaProvider", new Class[] {
                   IMediaProvider.class
               } );
		} catch( Exception e ) {
			System.out.println( "ComputerCraftAPI: ComputerCraft not found." );
		} finally {
			ccSearched = true;
		}
	}
}
 
开发者ID:PC-Logix,项目名称:OpenFM,代码行数:37,代码来源:ComputerCraftAPI.java

示例3: registerBundledRedstoneProvider

import dan200.computercraft.api.redstone.IBundledRedstoneProvider; //导入依赖的package包/类
/**
 * Registers a bundled redstone handler to provide bundled redstone output for blocks
 * @see dan200.computercraft.api.redstone.IBundledRedstoneProvider
 */
public static void registerBundledRedstoneProvider( IBundledRedstoneProvider handler )
{
    findCC();
    if( computerCraft_registerBundledRedstoneProvider != null )
    {
        try {
            computerCraft_registerBundledRedstoneProvider.invoke( null, handler );
        } catch (Exception e){
            // It failed
        }
    }
}
 
开发者ID:enhancedportals,项目名称:enhancedportals,代码行数:17,代码来源:ComputerCraftAPI.java

示例4: findCC

import dan200.computercraft.api.redstone.IBundledRedstoneProvider; //导入依赖的package包/类
private static void findCC()
{
	if( !ccSearched ) {
		try {
			computerCraft = Class.forName( "dan200.computercraft.ComputerCraft" );
               computerCraft_getVersion = findCCMethod( "getVersion", new Class[]{
               } );
			computerCraft_createUniqueNumberedSaveDir = findCCMethod( "createUniqueNumberedSaveDir", new Class[]{
                   World.class, String.class
               } );
			computerCraft_createSaveDirMount = findCCMethod( "createSaveDirMount", new Class[] {
				World.class, String.class, Long.TYPE
			} );
			computerCraft_createResourceMount = findCCMethod( "createResourceMount", new Class[] {
				Class.class, String.class, String.class
			} );
			computerCraft_registerPeripheralProvider = findCCMethod( "registerPeripheralProvider", new Class[] {
				IPeripheralProvider.class
			} );
               computerCraft_registerTurtleUpgrade = findCCMethod( "registerTurtleUpgrade", new Class[] {
                   ITurtleUpgrade.class
               } );
               computerCraft_registerBundledRedstoneProvider = findCCMethod( "registerBundledRedstoneProvider", new Class[] {
                   IBundledRedstoneProvider.class
               } );
               computerCraft_getDefaultBundledRedstoneOutput = findCCMethod( "getDefaultBundledRedstoneOutput", new Class[] {
                   World.class, BlockPos.class, EnumFacing.class
               } );
               computerCraft_registerMediaProvider = findCCMethod( "registerMediaProvider", new Class[] {
                   IMediaProvider.class
               } );
               computerCraft_registerPermissionProvider = findCCMethod( "registerPermissionProvider", new Class[] {
                   ITurtlePermissionProvider.class
               } );
		} catch( Exception e ) {
			System.out.println( "ComputerCraftAPI: ComputerCraft not found." );
		} finally {
			ccSearched = true;
		}
	}
}
 
开发者ID:Herobone,项目名称:HeroUtils,代码行数:42,代码来源:ComputerCraftAPI.java


注:本文中的dan200.computercraft.api.redstone.IBundledRedstoneProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。