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


Java ForgeChunkManager.setForcedChunkLoadingCallback方法代码示例

本文整理汇总了Java中net.minecraftforge.common.ForgeChunkManager.setForcedChunkLoadingCallback方法的典型用法代码示例。如果您正苦于以下问题:Java ForgeChunkManager.setForcedChunkLoadingCallback方法的具体用法?Java ForgeChunkManager.setForcedChunkLoadingCallback怎么用?Java ForgeChunkManager.setForcedChunkLoadingCallback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraftforge.common.ForgeChunkManager的用法示例。


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

示例1: preInit

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
    // Config
    ConfigurationHandler.Init(event.getSuggestedConfigurationFile());
    MinecraftForge.EVENT_BUS.register(new ConfigurationHandler());

    // Login/Logout Tracking
    MinecraftForge.EVENT_BUS.register(new PlayerActivity());
    MinecraftForge.EVENT_BUS.register(new PlayerTimeout());

    // Chunk Loading
    ForgeChunkManager.setForcedChunkLoadingCallback(instance, new ChunkLoadingCallback());

    // Blocks and Items
    ModBlocks.init();
    ModBlocks.registerBlocks();
    ModBlocks.registerRecipes();

    // Keybinds
    proxy.registerKeys();
}
 
开发者ID:CorwinJV,项目名称:AChunkLoader,代码行数:23,代码来源:AChunkLoader.java

示例2: preLoad

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@Mod.EventHandler
public void preLoad(FMLPreInitializationEvent event)
{
    config = ConfigHandler.createConfig(event.getSuggestedConfigurationFile(), "itfellfromthesky", "It Fell From The Sky", logger, instance);

    config.setCurrentCategory("gameplay", "itfellfromthesky.config.cat.gameplay.name", "itfellfromthesky.config.cat.gameplay.comment");
    config.createIntBoolProperty("summonPigzillaNeedsOp", "itfellfromthesky.config.prop.summonPigzillaNeedsOp.name", "itfellfromthesky.config.prop.summonPigzillaNeedsOp.comment", true, false, false);

    proxy.initMod();

    EventHandler handler = new EventHandler();
    MinecraftForge.EVENT_BUS.register(handler);
    ForgeChunkManager.setForcedChunkLoadingCallback(this, new ChunkLoadHandler());

    ModVersionChecker.register_iChunMod(new ModVersionInfo("ItFellFromTheSky", iChunUtil.versionOfMC, version, false));
}
 
开发者ID:iChun,项目名称:ItFellFromTheSky,代码行数:17,代码来源:ItFellFromTheSky.java

示例3: registerEventHandlers

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@Override
public void registerEventHandlers()
{
    MinecraftForge.EVENT_BUS.register(new AnvilUpdateEventHandler());
    MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
    MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
    MinecraftForge.EVENT_BUS.register(new ItemPickupEventHandler());
    MinecraftForge.EVENT_BUS.register(new LivingDropsEventHandler());
    MinecraftForge.EVENT_BUS.register(new PlayerEventHandler());
    MinecraftForge.EVENT_BUS.register(new WorldEventHandler());
    MinecraftForge.EVENT_BUS.register(new TickHandler());

    MinecraftForge.EVENT_BUS.register(this);

    ForgeChunkManager.setForcedChunkLoadingCallback(EnderUtilities.instance, new ChunkLoading());
}
 
开发者ID:maruohon,项目名称:enderutilities,代码行数:17,代码来源:CommonProxy.java

示例4: init

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event) {
	proxy.initServerSide();
	proxy.initClientSide();

	MinecraftForge.EVENT_BUS.register(proxy);

	NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy);

	DimensionManager.registerProviderType(Reference.DIMENSION_ID, WorldProviderPocket.class, true);
	DimensionManager.registerDimension(Reference.DIMENSION_ID, Reference.DIMENSION_ID);

	BiomeHelper.init();

	if (Reference.KEEP_POCKET_ROOMS_CHUNK_LOADED) {
		ForgeChunkManager.setForcedChunkLoadingCallback(this, new ChunkLoaderHandler());
	}
}
 
开发者ID:NPException,项目名称:Dimensional-Pockets,代码行数:19,代码来源:DimensionalPockets.java

示例5: init

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event) {
    PacketHandler.init();

    if (ConfigData.shouldChunkLoad()) {
        LogUtil.debug("Registering chunk loading callback");
        ForgeChunkManager.setForcedChunkLoadingCallback(INSTANCE, new ChunkLoadingCallback());
    }

    if (ConfigData.enableAntenna) {
        LogUtil.debug("Registering BitNet tick handler");
        FMLCommonHandler.instance().bus().register(BitNetUniverse.UNIVERSE);
    }

    if (TickHandler.shouldRegister()) {
        LogUtil.debug("Registering server tick handler");
        FMLCommonHandler.instance().bus().register(TickHandler.INSTANCE);
    }

    proxy.init();
    proxy.registerRenderInfo();

    for (IModule module : MODULES)
        if (module.shouldLoad())
            module.init();
}
 
开发者ID:theoriginalbit,项目名称:MoarPeripherals,代码行数:27,代码来源:MoarPeripherals.java

示例6: preInit

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
    ConfigHandler.init(event);
    Mods.init();
    VersionChecker.execute();

    ModBlocks.init();
    ModItems.init();
    ModMultiBlocks.init();

    NetworkHandler.init();

    RelocatorModuleRegistry.registerModules();
    MultiFilterRegistry.registerFilters();

    proxy.registerEventHandlers();

    ForgeChunkManager.setForcedChunkLoadingCallback(this, new LoadingCallbackHelper());
}
 
开发者ID:Dynious,项目名称:RefinedRelocation,代码行数:20,代码来源:RefinedRelocation.java

示例7: preInit

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
public void preInit(FMLPreInitializationEvent event)
{
	// Handle configuration
	File configDir = event.getModConfigurationDirectory();
	config = new Configuration(new File(configDir.getPath(), "simplechunks.cfg"));
	try
	{
		config.load();

		GeneralConfig.readConfig(config);
	}
	catch (Exception e)
	{
		SimpleChunks.logger.error("Error loading config file!", e);
	}
	finally
	{
		if (config.hasChanged())
		{
			config.save();
		}
	}

	// Integrate with other mods
	if (Loader.isModLoaded("theoneprobe"))
	{
		TOPCompat.register();
	}

	// Register chunkloading callback
	ForgeChunkManager.setForcedChunkLoadingCallback(SimpleChunks.instance, new ChunkLoadingHandler());
}
 
开发者ID:DarkMorford,项目名称:Simple-Chunks,代码行数:33,代码来源:CommonProxy.java

示例8: postInit

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
	proxy.postInit(event);

	ticketList = new HashMap<ChunkPos, Integer>();
	ForgeChunkManager.setForcedChunkLoadingCallback(this, new LoadingCallback() {
		@Override
		public void ticketsLoaded(List<Ticket> tickets, World world) {

		}
	});
}
 
开发者ID:Zundrel,项目名称:Never-Enough-Currency,代码行数:13,代码来源:Currency.java

示例9: postInit

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
public void postInit(final FMLPostInitializationEvent evt) {
    ForgeChunkManager.setForcedChunkLoadingCallback((Object)ExtraUtilsMod.instance, (ForgeChunkManager.LoadingCallback)new ChunkloadCallback());
    CommandTPSTimer.init();
    if (ExtraUtils.underdarkDimID != 0 && ExtraUtils.portalEnabled) {
        FMLCommonHandler.instance().bus().register((Object)new DarknessTickHandler());
    }
    if (ExtraUtils.divisionSigilEnabled && !ExtraUtils.disableDivisionSigilInChests) {
        this.addSigil("dungeonChest", 0.01);
        this.addSigil("mineshaftCorridor", 0.001);
        this.addSigil("pyramidDesertyChest", 0.02);
        this.addSigil("pyramidJungleChest", 0.05);
        this.addSigil("strongholdCrossing", 0.01);
        this.addSigil("strongholdCorridor", 0.01);
    }
    if (!ExtraUtils.disableEnderLiliesInDungeons && ExtraUtils.enderLily != null) {
        addDungeonItem(new ItemStack((Block)ExtraUtils.enderLily), 1, 5, "dungeonChest", 0.03);
    }
    ExtraUtilsMod.proxy.postInit();
    if (ExtraUtils.enderQuarryEnabled) {
        BlockBreakingRegistry.instance.setupBreaking();
    }
    DispenserStuff.registerItems();
    if (ExtraUtils.generatorEnabled) {
        TileEntityGeneratorPotion.genPotionLevels();
    }
    if (ExtraUtils.transferPipeEnabled) {
        TNHelper.initBlocks();
    }
    if (Loader.isModLoaded("Thaumcraft")) {
        ThaumcraftHelper.registerItems();
    }
    for (final ILoading loader : this.loaders) {
        loader.postInit();
    }
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:36,代码来源:ExtraUtils.java

示例10: enableTicketSupport

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
public static void enableTicketSupport(Object mod) {
  ForgeChunkManager.setForcedChunkLoadingCallback(mod,
      new net.minecraftforge.common.ForgeChunkManager.LoadingCallback() {
        @Override
        public void ticketsLoaded(List<Ticket> tickets, World world) {
          // This is called when the server is restarted and if there are tickets that we
          // have registered before.
          // Since we do not support to restore interrupted Lua programs, we do not need
          // to do here anything.
        }
      });
}
 
开发者ID:wizards-of-lua,项目名称:wizards-of-lua,代码行数:13,代码来源:ChunkLoaderTicketSupport.java

示例11: preinit

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@Mod.EventHandler
public void preinit(FMLPreInitializationEvent event)
{
	chunkloader = new BlockChunkLoader(Material.iron);
	GameRegistry.registerBlock(chunkloader, chunkloader.getUnlocalizedName());
	GameRegistry.registerTileEntity(TileChunkLoader.class, "simplechunkloader");
		ForgeChunkManager.setForcedChunkLoadingCallback(INSTANCE, new ChunkLoadingHandler());
		
	GameRegistry.addRecipe(new ItemStack(chunkloader), 
			"III", 
			"ILI", 
			"III", 
			'I', new ItemStack(Items.iron_ingot), 
			'L', new ItemStack(Items.dye, 1, 4));
}
 
开发者ID:gigabit101,项目名称:SimpleChunkLoader,代码行数:16,代码来源:SimpleChunkLoader.java

示例12: postInit

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {
	GenericUtil.init();

	ForgeChunkManager.setForcedChunkLoadingCallback(INSTANCE, (tickets, world) -> {
		if(tickets != null && tickets.size() > 0)
			GenericUtil.initChunkLoadTicket(world, tickets.get(0));
	});
}
 
开发者ID:Lordmau5,项目名称:FFS,代码行数:10,代码来源:FancyFluidStorage.java

示例13: registerMod

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
/**
 * By doing this you are delegating all chunks from your mod to be handled by yours truly.
 */
public static void registerMod(Object mod) {
    ModContainer container = Loader.instance().getModObjectList().inverse().get(mod);
    if (container == null) {
        throw new NullPointerException("Mod container not found for: " + mod);
    }
    mods.put(mod, container);
    ForgeChunkManager.setForcedChunkLoadingCallback(mod, new DummyLoadingCallback());
}
 
开发者ID:TheCBProject,项目名称:ChickenChunks,代码行数:12,代码来源:ChunkLoaderManager.java

示例14: setup

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@EventHandler
public void setup(FMLPreInitializationEvent event) {
    FzUtil.setCoreParent(event);
    if (!DeltaChunk.enabled()) return;
    final File configFile = event.getSuggestedConfigurationFile();
    File base = configFile.getParentFile();
    hammerInfo.setConfigFile(new File(base, "hammerChannels.cfg"));
    
    int client_despawn_distance = 16*10; //NORELEASE: This wants for a config setting. "How far away the a client must be from a DSE before the server will tell the client to forget about it (eg, client side despawn)."
    EntityRegistry.registerModEntity(DimensionSliceEntity.class, "fzds", 1, this, client_despawn_distance, 1, true);
    // Sigh. Would be nice to kill the velocity update packet noise. :/
    // EntityRegistry.registerModEntity(PacketProxyingPlayer.class, "fzds", 2, this, 1, Integer.MAX_VALUE, false);
    
    //Create the hammer dimension
    DimensionManager.registerProviderType(DeltaChunk.getDimensionId(), HammerWorldProvider.class, true);
    DimensionManager.registerDimension(DeltaChunk.getDimensionId(), DeltaChunk.getDimensionId());
    fzds_command_channel = hammerInfo.makeChannelFor(Core.modId, "fzdscmd", fzds_command_channel, -1, "This channel is used for Slices created using the /fzds command");
    FzdsPacketRegistry.init();
    NORELEASE.fixme("That isn't used is it?");

    proxy.clientInit();

    //This sets up saving how many IDs we've used
    Core.loadBus(hammerInfo);
    Core.loadBus(proxy);
    if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
        Core.loadBus(new ClickHandler());
    }
    ForgeChunkManager.setForcedChunkLoadingCallback(this, new PPPChunkLoader());
    if (log_client_chunking && FMLCommonHandler.instance().getSide() == Side.CLIENT) {
        Core.loadBus(new ChunkLogger());
    }
}
 
开发者ID:purpleposeidon,项目名称:Factorization,代码行数:34,代码来源:Hammer.java

示例15: postInit

import net.minecraftforge.common.ForgeChunkManager; //导入方法依赖的package包/类
@EventHandler
@Override
public void postInit(FMLPostInitializationEvent event) {
    super.postInit(event);
    ComputerCraft.registerPeripheralProvider(EPBlocks.frame);
    creativeTab.setItem(new ItemStack(EPBlocks.portal, 1));
    ForgeChunkManager.setForcedChunkLoadingCallback(instance, this);
}
 
开发者ID:enhancedportals,项目名称:enhancedportals,代码行数:9,代码来源:EnhancedPortals.java


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