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


Java GameRegistry类代码示例

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


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

示例1: init

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent evt) {
	INSTANCE.registerMessage(LobbyPlayerOpenedGuiPacketHandler.class, LobbyPlayerOpenedGuiPacket.class, 0,
			Side.SERVER);

	INSTANCE.registerMessage(LobbyBeginGamePacketHandler.class, LobbyBeginGamePacket.class, 1, Side.SERVER);
	INSTANCE.registerMessage(PacketSyncPlayerPropertiesClientHandler.class, PacketSyncPlayerPropertiesClient.class,
			2, Side.CLIENT);
	INSTANCE.registerMessage(PacketSyncPlayerPropertiesServerHandler.class, PacketSyncPlayerPropertiesServer.class,
			3, Side.SERVER);

	INSTANCE.registerMessage(PacketSyncTileEntityServerHandler.class, PacketSyncTileEntityServer.class, 4,
			Side.SERVER);
	INSTANCE.registerMessage(PacketSyncTileEntityClientHandler.class, PacketSyncTileEntityClient.class, 5,
			Side.CLIENT);

	NetworkRegistry.INSTANCE.registerGuiHandler(PAYDAY.instance, new MGuiHandler());
	GameRegistry.registerBlock(lobbyBlock, "Lobby");
	GameRegistry.registerTileEntity(LobbyTileEntity.class, "lobby_tile_entity");

	FMLCommonHandler.instance().bus().register(eventHandler);
	MinecraftForge.EVENT_BUS.register(eventHandler);
}
 
开发者ID:TominoCZ,项目名称:PAYDAY,代码行数:24,代码来源:PAYDAY.java

示例2: init

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    Configurator.configure(new File("config/" + MODID + ".cfg"));
    GameRegistry.registerWorldGenerator(new Decorator(), 4096);
    FMLCommonHandler.instance().bus().register(this);
    MinecraftForge.EVENT_BUS.register(this);
}
 
开发者ID:ternsip,项目名称:StructPro,代码行数:8,代码来源:Structpro.java

示例3: init

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event) {
	NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);

	ModRecipes.init();

	proxy.registerEvents();
	proxy.registerEntities();
	proxy.registerRenderers();

	if (ModEntityList.hasEntitiesWithEggs()) {
		ModEntityList.entity_egg = new ItemEntityEgg();
		GameRegistry.registerItem(ModEntityList.entity_egg, "entity_egg");
		OreDictionary.registerOre("mobEgg", ModEntityList.entity_egg);
	}

	isTinkersConstructLoaded = Loader.isModLoaded("TConstruct");
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:19,代码来源:EtFuturum.java

示例4: init

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
public static final void init() {

copperingot = new CopperIngot();
aluminiumingot = new AluminiumIngot();
leadingot = new LeadIngot();
nickelingot = new NickelIngot();
tiningot = new TinIngot();
uraniumingot = new UraniumIngot();
ruby = new Ruby();
sulfurdust = new SulfurDust();
glassbottomtank = new GlassBottomTank();

GameRegistry.registerItem(copperingot, "copper_ingot");
GameRegistry.registerItem(aluminiumingot, "aluminium_ingot");
GameRegistry.registerItem(leadingot, "lead_ingot");
GameRegistry.registerItem(nickelingot, "nickel_ingot");
GameRegistry.registerItem(tiningot, "tin_ingot");
GameRegistry.registerItem(uraniumingot, "uranium_ingot");
GameRegistry.registerItem(ruby, "ruby");
GameRegistry.registerItem(sulfurdust, "sulfur_dust");
GameRegistry.registerItem(glassbottomtank, "glass_bottom_tank");

  }
 
开发者ID:grand-mine-inc,项目名称:Steam-and-Steel,代码行数:24,代码来源:GrandItem.java

示例5: addRecipe

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
public static void addRecipe() {
	
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.aluminiumblock), new Object[] { "###", "###", "###", '#', GrandItem.aluminiumingot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.aluminiumingot, 9), new Object[] { "#", '#', GrandBlocks.aluminiumblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.copperblock), new Object[] { "###", "###", "###", '#', GrandItem.copperingot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.copperingot, 9), new Object[] { "#", '#', GrandBlocks.copperblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.leadblock), new Object[] { "###", "###", "###", '#', GrandItem.leadingot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.leadingot, 9), new Object[] { "#", '#', GrandBlocks.leadblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.nickelblock), new Object[] { "###", "###", "###", '#', GrandItem.nickelingot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.nickelingot, 9), new Object[] { "#", '#', GrandBlocks.nickelblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.rubyblock), new Object[] { "###", "###", "###", '#', GrandItem.ruby});
	GameRegistry.addRecipe( new ItemStack(GrandItem.ruby, 9), new Object[] { "#", '#', GrandBlocks.rubyblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.tinblock), new Object[] { "###", "###", "###", '#', GrandItem.tiningot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.tiningot, 9), new Object[] { "#", '#', GrandBlocks.tinblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.uraniumblock), new Object[] { "###", "###", "###", '#', GrandItem.uraniumingot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.uraniumingot, 9), new Object[] { "#", '#', GrandBlocks.uraniumblock});
	GameRegistry.addRecipe( new ItemStack(GrandFluidTank.glassfluidtank), new Object[] { "###", "# #", "111", '#', Blocks.glass, '1', GrandItem.glassbottomtank});
	GameRegistry.addRecipe( new ItemStack(GrandItem.glassbottomtank, 3), new Object[] { "###", '#', Blocks.glass_pane});
	
}
 
开发者ID:grand-mine-inc,项目名称:Steam-and-Steel,代码行数:21,代码来源:BaseCraft.java

示例6: addWeapon

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
private void addWeapon(_WeaponBase weapon, ModelBase model, String weaponName, boolean isClient, String handedness)
{
	if (Main.weapons == null) { Main.weapons = new ArrayList<_WeaponBase>(); }
	
	Main.weapons.add(weapon);
	
	GameRegistry.registerItem(weapon, "weaponchevsky_" + weaponName);	// And register it
	
	weapon.setUniqueName(weaponName);
	
	if (isClient && useModels && model != null)	// Do we care about models? And if we do, do we got a custom weapon model? :O
	{
		if (Main.models == null) { Main.models = new ArrayList<ModelBase>(); }	// Init
		
		Main.models.add(model);								// Keeping track of it
		proxy.registerWeaponRenderer(weapon, (byte) Main.models.indexOf(model));	// And registering its renderer
	}
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:19,代码来源:Main.java

示例7: addRecipes

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@Override
public void addRecipes() 
{ 
	// A bundle of ice-laced iron ingots (4), merged with a slime ball
       GameRegistry.addShapelessRecipe(new ItemStack(this),
               Items.iron_ingot,
               Items.iron_ingot,
               Items.iron_ingot,
               Items.iron_ingot,
               Blocks.ice,
               Blocks.ice,
               Blocks.ice,
               Blocks.ice,
               Items.slime_ball
       );
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:17,代码来源:ColdIronClip.java

示例8: addRecipes

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@Override
public void addRecipes() 
{ 
	// A box of flint dust (4 dust per flint, meaning 32 per box), merged with wooden planks
       GameRegistry.addShapelessRecipe(new ItemStack(this),
               Items.flint,
               Items.flint,
               Items.flint,
               Items.flint,
               Items.flint,
               Items.flint,
               Items.flint,
               Items.flint,
               Blocks.planks
       ); 
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:17,代码来源:BoxOfFlintDust.java

示例9: addRecipes

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One redstone sprayer (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "zxz", "zbz", "cya",
				'x', Blocks.piston,
				'y', Blocks.tripwire_hook,
				'z', Blocks.obsidian,
				'a', Items.repeater,
				'b', Blocks.sticky_piston,
				'c', Items.flint_and_steel
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	Helper.registerAmmoRecipe(LargeNetherrackMagazine.class, this);
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:20,代码来源:NetherBellows.java

示例10: addRecipes

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Sugar Gatling (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "b b", "b b", " m ",
				'b', Helper.getAmmoStack(Part_GatlingBarrel.class, 0),
				'm', Helper.getAmmoStack(Part_GatlingBody.class, 0)
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Reloading with gatling ammo, setting its clip metadata as ours (Need to be empty for that)
	Helper.registerAmmoRecipe(GatlingAmmo.class, this);
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:17,代码来源:SugarEngine.java

示例11: addRecipes

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One auto-crossbow (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "iii", "scs", " i ",
				'i', Items.iron_ingot,
				's', Blocks.sticky_piston,
				'c', Helper.getWeaponStackByClass(Crossbow_Auto.class, true)
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	ItemStack ammo = Helper.getAmmoStack(ArrowBundle.class, 0);

	// Fill what can be filled. One arrow bundle for 8 shots, for up to 2 bundles
	Helper.makeAmmoRecipe(ammo, 1, 8, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(ammo, 2, 16, this.getMaxDamage(), this);
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:21,代码来源:Crossbow_AutoImp.java

示例12: init

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event) {
	GameRegistry.registerWorldGenerator(new ProspectingWorldGen(), 1000);

	GameRegistry.addRecipe(new ItemStack(ProspectingItems.prospecting_pan), new Object[] {"s s", " s ", 's', Blocks.stone_slab});
	GameRegistry.addRecipe(new ItemStack(ProspectingItems.prospecting_pick), new Object[] {"iis", "  s", 'i', Items.iron_ingot, 's', Items.stick});
	GameRegistry.addRecipe(new ItemStack(ProspectingItems.sifting_pan), new Object[] {"s s", "s#s", "s#s", 's', Items.stick, '#', Items.string});
}
 
开发者ID:azacock,项目名称:Prospecting,代码行数:9,代码来源:Prospecting.java

示例13: addRecipes

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Obsidian Splinter
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), " io", "ipi", "oft",
				'o', Blocks.obsidian,
				'i', Items.iron_ingot,
				'p', Blocks.piston,
				'f', Items.flint_and_steel,
				't', Blocks.tripwire_hook
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Reloading with obsidian magazine, setting its ammo metadata as ours (Need to be empty for that)
	Helper.registerAmmoRecipe(ObsidianMagazine.class, this);
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:20,代码来源:OSP.java

示例14: addRecipes

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Firework Rocket Launcher (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "x  ", "yx ", "zyx",
				'x', Blocks.planks,
				'y', Items.iron_ingot,
				'z', Items.flint_and_steel
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Fill the RPG with 1 rocket
	GameRegistry.addRecipe(new ItemStack(this), " ab", "zya", " x ",
			'x', new ItemStack(this, 1 , this.getMaxDamage()),
			'y', Blocks.tnt,
			'z', Blocks.planks,
			'a', Items.paper,
			'b', Items.string
			);
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:24,代码来源:RPG.java

示例15: addRecipes

import cpw.mods.fml.common.registry.GameRegistry; //导入依赖的package包/类
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One wither rifle (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "odo", "owo", "oso",
				'o', Blocks.obsidian,
				'd', Items.diamond,
				's', Items.nether_star,
				'w', Helper.getWeaponStackByClass(OSR.class, true)
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Reloading with obsidian magazine, setting its ammo metadata as ours (Need to be empty for that)
	Helper.registerAmmoRecipe(ObsidianMagazine.class, this);
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:19,代码来源:OWR.java


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