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


Java TickRegistry类代码示例

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


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

示例1: postInit

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@Subscribe
public void postInit(FMLPostInitializationEvent event){
	int expMods = ShoulderTransformations.CODE_MODIFICATIONS;
	
	if(ShoulderTransformations.modifications != expMods){
		logger.severe("Only found " + ShoulderTransformations.modifications + " code injections, but expected " + expMods);
		logger.severe("ShoulderSurfing should be disabled!");
	} else {
		logger.info("Loaded " + ShoulderTransformations.modifications + " code injections, ShoulderSurfing good to go!");
	}
	
	//create mc pointer
	ShoulderLoader sl = new ShoulderLoader();
	sl.load();
	
	//create tick handler
	st = new ShoulderTickHandler();
	TickRegistry.registerTickHandler(st, Side.CLIENT);
	
	//register other events
	MinecraftForge.EVENT_BUS.register(new ShoulderEvents());
}
 
开发者ID:sabarjp,项目名称:ShoulderSurfing,代码行数:23,代码来源:ShoulderSurfing.java

示例2: postInit

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@Subscribe
public void postInit(FMLPostInitializationEvent event){
	int expMods = ShoulderTransformations.CODE_MODIFICATIONS;
	
	if(ShoulderTransformations.modifications != expMods){
		logger.severe("Only found " + ShoulderTransformations.modifications + " code injections, but expected " + expMods);
		logger.severe("ShoulderSurfing should be disabled!");
	} else {
		logger.info("Loaded " + ShoulderTransformations.modifications + " code injections, ShoulderSurfing good to go!");
	}
	
	//create mc pointer
	ShoulderLoader sl = new ShoulderLoader();
	sl.load();
	
	//create tick handler
	st = new ShoulderTickHandler();
	TickRegistry.registerTickHandler(st, Side.CLIENT);
}
 
开发者ID:sabarjp,项目名称:ShoulderSurfing,代码行数:20,代码来源:ShoulderSurfing.java

示例3: preInit

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@Subscribe
public void preInit(FMLPreInitializationEvent event)
{
    try
    {
        this.gameTickHandler.setMod(mod);
        this.guiTickHandler.setMod(mod);
        TickRegistry.registerTickHandler(this.gameTickHandler, Side.CLIENT);
        TickRegistry.registerTickHandler(this.guiTickHandler, Side.CLIENT);
        GameRegistry.registerWorldGenerator(ModLoaderHelper.buildWorldGenHelper(mod));
        GameRegistry.registerFuelHandler(ModLoaderHelper.buildFuelHelper(mod));
        GameRegistry.registerCraftingHandler(ModLoaderHelper.buildCraftingHelper(mod));
        GameRegistry.registerPickupHandler(ModLoaderHelper.buildPickupHelper(mod));
        NetworkRegistry.instance().registerChatListener(ModLoaderHelper.buildChatListener(mod));
        NetworkRegistry.instance().registerConnectionHandler(ModLoaderHelper.buildConnectionHelper(mod));
    }
    catch (Exception e)
    {
        controller.errorOccurred(this, e);
        Throwables.propagateIfPossible(e);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:ModLoaderModContainer.java

示例4: preInit

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent e) {

    VersionCheck.updateCheckMRPG(MysticModInfo.NAME, MysticModInfo.VERSION,
            URL);

    TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT);

    logger = Logger.getLogger(MysticModInfo.MODID);
    logger.setParent(FMLLog.getLogger());
    final Configuration config = new Configuration(
            e.getSuggestedConfigurationFile());
    MysticConfig.load(config);
    tab = new CreativeTabsMRPG(CreativeTabs.getNextID(), "tabMysticRPG");

    MysticItems.init();
    MysticBlocks.init();
    MysticRecipes.init();
    MysticDimensions.init(); // TODO Localize biomes and dimensions
    MysticBiomes.init();
    LangUtil.addNames("/assets/" + MysticModInfo.MODID + "/lang/", languages);

}
 
开发者ID:Minecraft4455,项目名称:MysticRPG,代码行数:24,代码来源:MysticRPG.java

示例5: universalPreInit

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
public void universalPreInit(FMLPreInitializationEvent event) {
	Configuration config = new Configuration(event.getSuggestedConfigurationFile());

	packets = Network.newChannel("SevenCommons")
			.register(PacketSync.class, SYNC_PACKET_ID)
			.register(PacketInventoryName.class)
			.register(PacketContainerButton.class)
			.build();

	ClassInfoUtil.preInit();

	// initialize the lazy statics in the scheduler class
	Reflection.initialize(Scheduler.class);

	TickRegistry.registerTickHandler(new SCPlayerTicker(), Side.SERVER);
	GameRegistry.registerPlayerTracker(new SCPlayerTracker());

	proxy.preInit(event);

	Syncing.registerFactory(Object.class, new BuiltinSyncers());
	ToNbtFactories.registerFactory(Object.class, new DefaultNBTSerializers());
}
 
开发者ID:diesieben07,项目名称:SevenCommons,代码行数:23,代码来源:SevenCommons.java

示例6: init

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event) {
	new GuiHandler();
	TickRegistry.registerTickHandler(new KeyTickHandler(), Side.SERVER);
    LogHelper.log(Level.INFO, "Preparing recipes");
    Recipes.initShapedRecipes();
    Recipes.initShapelessRecipes();
    LogHelper.log(Level.INFO, "Preparing world generation");
    GameRegistry.registerWorldGenerator(worldGen);
    LogHelper.log(Level.INFO, "Preparing renders");
    proxy.registerRenderers();
    LogHelper.log(Level.INFO, "Preparing entities");
    EntityRegistry.registerModEntity(EntityBlastBlox.class, "BlastBlox", EntityRegistry.findGlobalUniqueEntityId(), this, 128, 1, true);
    if(ConfigBooleans.enableUpdateCheck){
    LogHelper.log(Level.INFO, "Checking for new version");
    NetworkRegistry.instance().registerConnectionHandler(new Update("Kingdom Keys", Reference.MOD_VER, "https://raw.github.com/Wehavecookies56/Kingdom-Keys/master/Version.txt"));
    final Side side = FMLCommonHandler.instance().getEffectiveSide();
    }
    
    
}
 
开发者ID:Wehavecookies56,项目名称:Kingdom-Keys,代码行数:22,代码来源:KingdomKeys.java

示例7: init

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
public static void init() {
    // Clear all lists
    listDevs.clear();
    listTesters.clear();
    // Retrieve all players in the lists
    try {
        retrievePlayerData();
    } catch (IOException e) {
        e.printStackTrace();
    }
    // Obtain texture files
    Minecraft.getMinecraft().renderEngine.obtainImageData(Reference.PATH_CAPES_DEV, new ImageBufferDownload());
    Minecraft.getMinecraft().renderEngine.obtainImageData(Reference.PATH_CAPES_TESTER, new ImageBufferDownload());
    // Register tickhandler to set the capes
    TickRegistry.registerTickHandler(new CapeTickHandler(), Side.CLIENT);
}
 
开发者ID:TAMmodding,项目名称:Mythical-Gods-Mod,代码行数:17,代码来源:CapeHelper.java

示例8: registerHandlers

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@Override
public void registerHandlers() {
    super.registerHandlers();

    if (AddonConfig.useHUDStuff) {
        renderTickHandler = new RenderTickHandler();
        TickRegistry.registerTickHandler(renderTickHandler, Side.CLIENT);
    }

    clientTickHandler = new ClientTickHandler();
    TickRegistry.registerTickHandler(clientTickHandler, Side.CLIENT);
    ClientTickHandler.load();

    commonTickHandler = new CommonTickHandler();
    TickRegistry.registerTickHandler(commonTickHandler, Side.CLIENT);
}
 
开发者ID:Andrew2448,项目名称:Andrew2448PowersuitAddons,代码行数:17,代码来源:ClientProxy.java

示例9: init

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@EventHandler
public void init(final FMLInitializationEvent event)
{
    Agriculture.tab = new AgricultureTab("Agriculture");
    LanguageRegistry.instance().addStringLocalization("itemGroup.Agriculture", "en_US", "Agriculture");
    AgricultureItems.init();
    AgricultureBlocks.init();
    Agriculture.tab.setItemID(AgricultureBlocks.oven.blockID);

    AgricultureItems.setupItems();

    GameRegistry.registerWorldGenerator(new WorldGenSalt(4));
    GameRegistry.registerWorldGenerator(new WorldGenSpice(AgricultureBlocks.cinnamon.blockID));
    GameRegistry.registerWorldGenerator(new WorldGenSpice(AgricultureBlocks.vanilla.blockID));

    TickRegistry.registerTickHandler(new TickHandler(), Side.SERVER);
    NetworkRegistry.instance().registerGuiHandler(Agriculture.instance, Agriculture.proxy);
    Agriculture.proxy.registerEventHandlers();
    Agriculture.proxy.registerRenderers();

    registerTCCrop(AgricultureBlocks.peanut, 6);
    registerTCCrop(AgricultureBlocks.strawberry, 6);

    registerForestryCrop(AgricultureItems.strawberry.itemID, AgricultureItems.strawberry.getDamage(), AgricultureBlocks.strawberry.blockID, 6);
    registerForestryCrop(AgricultureItems.peanuts.itemID, AgricultureItems.peanuts.getDamage(), AgricultureBlocks.peanut.blockID, 6);
}
 
开发者ID:TeamMetallurgy,项目名称:Agriculture,代码行数:27,代码来源:Agriculture.java

示例10: init

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@EventHandler
public void init( FMLInitializationEvent event )
{
	Block.blocksList[ Block.mobSpawner.blockID ] = null;
	mobSpawner = new ToggleableMobSpawnerBlock( Block.mobSpawner.blockID );
	
	// Associate our tile entity with the vanilla one.
	if ( event.getSide().equals( Side.CLIENT ) ) registerTileEntityRenderer();
	try
	{
		Class c = TileEntity.class;
		Field nameToClassField = c.getDeclaredFields()[ 0 ];
		Field classToNameField = c.getDeclaredFields()[ 1 ];
		nameToClassField.setAccessible( true );
		classToNameField.setAccessible( true );
		Map nameToClassMap = ( Map ) nameToClassField.get( null );
		Map classToNameMap = ( Map ) classToNameField.get( null );
		nameToClassMap.put( "MobSpawner", ToggleableMobSpawnerTileEntity.class );
		classToNameMap.put( ToggleableMobSpawnerTileEntity.class, "MobSpawner" );
	}
	catch ( Exception exception )
	{
		exception.printStackTrace();
	}
	
	toggleKey = new KeyBinding( "Toggle Spawner Status", Keyboard.KEY_M );
	renderKey = new KeyBinding( "Toggle Render Status", Keyboard.KEY_N );
	keyHandler = new KeyHandler( new KeyBinding[] { toggleKey, renderKey } );
	statRenderer = new StatusTextRenderer();

	TickRegistry.registerTickHandler( keyHandler, Side.CLIENT );
	TickRegistry.registerTickHandler( statRenderer, Side.CLIENT );
}
 
开发者ID:spacechase0,项目名称:OldMods,代码行数:34,代码来源:ToggleSpawners.java

示例11: load

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
/**
 * Initialize the blocks, items, tick handler
 * @param evt
 */
@EventHandler
public void load(FMLInitializationEvent evt) {
	guestBedBlock = new BlockGuestBed(bedBlockID).setHardness(0.2F).setUnlocalizedName("guest_bed").setTextureName("bed");

	guestBedItem = (new ItemGuestBed(bedItemID)).setMaxStackSize(1).setUnlocalizedName("guest_bed").setTextureName("bed");

	GameRegistry.registerBlock(guestBedBlock, "Guest Bed Block");
	LanguageRegistry.addName(guestBedBlock, "Guest Bed");

	GameRegistry.registerItem(guestBedItem, "Guest Bed Item");
	LanguageRegistry.addName(guestBedItem, "Guest Bed");

	TickRegistry.registerTickHandler(new TickHandlerSleep(), Side.SERVER);
}
 
开发者ID:Cojomax99,项目名称:GuestBeds,代码行数:19,代码来源:GuestBedsMod.java

示例12: tryEnableItemStackRenderer

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@Override
public void tryEnableItemStackRenderer()
{
    if (gl32_enabled)
    {
        TickRegistry.registerTickHandler( new RenderTickHandler(),
                                          Side.CLIENT );
    }
    else
    {
        LogWrapper.severe( "OpenGL 3.2 not detected, mod data dump for images and item/block JSON data will not work!" );
    }
}
 
开发者ID:Maxwolf,项目名称:MC-MineAPI.Java,代码行数:14,代码来源:ClientProxy.java

示例13: init

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
/**
 * Wireless Remote GUI
 */
// public static GuiRedstoneWirelessRemote guiWirelessRemote;

@Override
public void init() {
    TickRegistry.registerTickHandler(new ClientTickHandler(),
                                     Side.CLIENT);
    initGUIs();
    super.init();
}
 
开发者ID:SlimeVoid,项目名称:WirelessRedstone-Addons,代码行数:13,代码来源:WRemoteClientProxy.java

示例14: preInit

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event) 
{ 
	addModFlags();
	Configuration config = new Configuration(
			event.getSuggestedConfigurationFile());
	new cfg().setConfig(config);
	
	if(isDebug())
	{
		System.out.println("MineFantasy: Debug mode ACTIVE");
		HeatableItem.requiresHeating = false;
	}
	removeRecipes();
	GameRegistry.registerFuelHandler(new MineFantasyFuels());
	TickRegistry.registerTickHandler(new ArmourTickHandlerMF(), FMLCommonHandler.instance().getSide());
	TickRegistry.registerTickHandler(new ArmourTickHandlerMF(), Side.SERVER);
	TickRegistry.registerTickHandler(new HotItemTickHandler(), FMLCommonHandler.instance().getSide());
	TickRegistry.registerTickHandler(new HotItemTickHandler(), Side.SERVER);
	
	proxy.registerTickHandlers();
	proxy.registerRenderInformation();
	NetworkRegistry.instance().registerGuiHandler(instance, proxy);
	if (client) {
		MinecraftForge.EVENT_BUS.register(new SoundManagerMF());
		StatListMF.init();
	}
	CrossbowAmmo.addCrossbowHandler(new CrossbowAmmoMF());
	
	rebuildRecipes();
	
	QuiverArrowRegistry.addArrowFireHandler(new QuiverArrowsMF());
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:34,代码来源:MineFantasyBase.java

示例15: init

import cpw.mods.fml.common.registry.TickRegistry; //导入依赖的package包/类
@Subscribe
public void init(FMLInitializationEvent event){		
	//load the keyboard bindings
	kbh = ShoulderKeybindings.registerKeybindings();
	
	//create mc pointer
	mc = ModLoader.getMinecraftInstance();
	
	//create tick handler
	st = new ShoulderTickHandler();
	TickRegistry.registerTickHandler(st, Side.CLIENT);
}
 
开发者ID:sabarjp,项目名称:ShoulderSurfing,代码行数:13,代码来源:ShoulderSurfing.java


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