本文整理汇总了Java中net.minecraftforge.common.DimensionManager.createProviderFor方法的典型用法代码示例。如果您正苦于以下问题:Java DimensionManager.createProviderFor方法的具体用法?Java DimensionManager.createProviderFor怎么用?Java DimensionManager.createProviderFor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.common.DimensionManager
的用法示例。
在下文中一共展示了DimensionManager.createProviderFor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: preInit
import net.minecraftforge.common.DimensionManager; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
proxy.preInit();
CONFIG = new Configuration(event.getSuggestedConfigurationFile());
CONFIG.setCategoryComment("neohell", "These keys affect how the world is generated, and whether it is generated.");
CONFIG_SHOULD_REGISTER_NEOHELL = CONFIG.getBoolean("enabled", "neohell", CONFIG_SHOULD_REGISTER_NEOHELL,
"Setting this to false disables neohell entirely, and this mod's blocks will be unobtainable unless tweaked in.");
CONFIG_DIMENSION_ID_NEOHELL = CONFIG.getInt("id", "neohell", CONFIG_DIMENSION_ID_NEOHELL, Integer.MIN_VALUE, Integer.MAX_VALUE,
"Remaps neohell to a different dimension ID, possibly causing it to replace a different dimension. May be catastrophically bad for existing maps.");
CONFIG.save();
if (CONFIG_SHOULD_REGISTER_NEOHELL) {
if (DimensionManager.isDimensionRegistered(CONFIG_DIMENSION_ID_NEOHELL)) {
//Nuking hell just makes it stronger
DimensionManager.unregisterDimension(CONFIG_DIMENSION_ID_NEOHELL);
}
DimensionType neohellType = DimensionType.register("Neo-Hell", "_neohell", CONFIG_DIMENSION_ID_NEOHELL, WorldProviderNeoHell.class, false);
DimensionManager.registerDimension(CONFIG_DIMENSION_ID_NEOHELL, neohellType);
@SuppressWarnings("unused")
WorldProvider provider = DimensionManager.createProviderFor(CONFIG_DIMENSION_ID_NEOHELL);
}
/* Obsidian is a glossy, vitreous rock, useful because when struck it easily forms conchoidal fractures,
* meaning you can hit it with an ordinary rock, and it shatters, making a super-sharp edge you can use for an
* axe head or a knife blade. It's frequently found
* just lying around volcanic islands. None of this describes what we see in Minecraft when we look at an
* obsidian block or the way we use that block.
*/
Blocks.OBSIDIAN.setUnlocalizedName("thermionics_world.basalt");
Blocks.OBSIDIAN.setHardness(2.5f);
Blocks.OBSIDIAN.setHarvestLevel("pickaxe",2);
//Ender Chest and Enchantment Table should have the same hardness as raw Basalt
Blocks.ENDER_CHEST.setHardness(2.5f);
Blocks.ENCHANTING_TABLE.setHardness(2.5f);
MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(proxy);
MinecraftForge.EVENT_BUS.register(TWBlocks.class);
MinecraftForge.EVENT_BUS.register(TWItems.class);
MinecraftForge.EVENT_BUS.register(BiomeRegistry.class);
}
示例2: getProviderForDimension
import net.minecraftforge.common.DimensionManager; //导入方法依赖的package包/类
/** Get Provider for Dimension **/
public static WorldProvider getProviderForDimension(int id)
{
return DimensionManager.createProviderFor(DimensionRegistry.dimensionId);
}