當前位置: 首頁>>代碼示例>>Java>>正文


Java GameRegistry類代碼示例

本文整理匯總了Java中net.minecraftforge.fml.common.registry.GameRegistry的典型用法代碼示例。如果您正苦於以下問題:Java GameRegistry類的具體用法?Java GameRegistry怎麽用?Java GameRegistry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


GameRegistry類屬於net.minecraftforge.fml.common.registry包,在下文中一共展示了GameRegistry類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: registerItemRecipes

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
private void registerItemRecipes()
{
	this.registerLeaderRecipes(new ItemStack(this.claimOrder), Items.PAPER, Items.ARROW);
	this.registerLeaderRecipes(new ItemStack(this.paymentOrder), Items.PAPER, Items.BOWL);
	this.registerLeaderRecipes(new ItemStack(this.renameOrder), Items.PAPER, Items.BLAZE_POWDER);
	this.registerLeaderRecipes(new ItemStack(this.inheritanceDeed), Items.PAPER, Items.GOLD_INGOT);
	this.registerLeaderRecipes(new ItemStack(this.factionLedger), Items.PAPER, Items.BOOK);
	this.registerLeaderRecipes(new ItemStack(this.returnOrder), Items.PAPER, Items.MAP);

	GameRegistry.addShapelessRecipe(new ItemStack(this.playerIDCard), new ItemStack(Items.PAPER), new ItemStack(Items.PAPER), new ItemStack(Items.WOODEN_SWORD));

	GameRegistry.addRecipe(new ItemStack(this.territoryMap), " o ", "oco", " o ",
               'o', new ItemStack(this.claimOrder),
               'c', Items.COMPASS
       );
}
 
開發者ID:Domochevsky,項目名稱:minecraft-territorialdealings,代碼行數:17,代碼來源:Main.java

示例2: registerBlocks

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
@SubscribeEvent
public static void registerBlocks (RegistryEvent.Register<Block> event) {
    IForgeRegistry<Block> registry = event.getRegistry();

    registry.registerAll(
        new BlockStoneMaterial("stone_block", makeName("stone_block")),
        new BlockMetalMaterial("metal_block", makeName("metal_block")),
        new BlockBloomeryFurnace("bloomery_furnace", makeName("bloomery_furnace")),
        new BlockFence("metal_fence", makeName("metal_fence")),
        new BlockLattice("metal_lattice", makeName("metal_lattice")),
        new BlockCandelabra("candelabra", makeName("candelabra")),
        new BlockCandelilla("candelilla", makeName("candelilla"))
    );

    GameRegistry.registerTileEntity(TileBloomeryFurnace.class, makeName("bloomery_furnace"));
    GameRegistry.registerTileEntity(TileCandelabra.class, makeName("candelabra"));
    GameRegistry.registerTileEntity(TileLattice.class, makeName("metal_lattice"));
}
 
開發者ID:jaquadro,項目名稱:GardenStuff,代碼行數:19,代碼來源:ModBlocks.java

示例3: init

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
public void init(FMLInitializationEvent e){
	//tile entity
	GameRegistry.registerTileEntity(TileActivePile.class, Constants.MODID+"active_pile");
	GameRegistry.registerTileEntity(TileCreosoteCollector.class, Constants.MODID+"creosote_collector");
	GameRegistry.registerTileEntity(TilePotteryKiln.class, Constants.MODID+"pottery_kiln");
	
	GameRegistry.registerFuelHandler(new FuelRegistry());
	MinecraftForge.EVENT_BUS.register(new PileIgnitr());
	MinecraftForge.EVENT_BUS.register(new PotionRegistry());
	
	PotionRegistry.initPotions();
	ItemsRegistry.initOreDict();
	
	if(!Config.DisableDefaultPottery)
		PotteryKilnRecipe.initRecipes();
	PotteryKilnRecipe.initCustomRecipes(Config.PotteryRecipes);
	if(Config.RegisterRecipes)
		Crafting.registerRecipes();
}
 
開發者ID:EnderiumSmith,項目名稱:CharcoalPit,代碼行數:20,代碼來源:CommonProxy.java

示例4: register

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
public static void register() {
	
	//Misc + crafting
	//Jello
	GameRegistry.register(itemliquidmeat);
	GameRegistry.register(itemfilterpart);
	GameRegistry.register(itemfilter);
	GameRegistry.register(itemgelatinewet);
	GameRegistry.register(itemgelatine);
	GameRegistry.register(itemjellomix);
	GameRegistry.register(itemjellohot);
	//Cat Hair
	GameRegistry.register(itemcathair);
	
	//Foods
	//Ramen
	GameRegistry.register(foodpeppers);
	GameRegistry.register(foodramencold);
	GameRegistry.register(foodramencooked);
	//Bologna
	GameRegistry.register(foodbologna);
	//Jello
	GameRegistry.register(foodjello);
	
}
 
開發者ID:Bedrockbreaker,項目名稱:rtap,代碼行數:26,代碼來源:ModItems.java

示例5: register

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
public static void register() {
	
	//Misc + decor
	registerBlock(blockflint);
	//Cat Hair
	registerBlock(blockcathair);
	//Bologna
	registerBlock(blockbologna);
	//Ramen
	registerBlock(blockramen);
	//Jello
	registerBlock(blockjello);
	
	//Crops
	GameRegistry.register(croppeppers);
	
}
 
開發者ID:Bedrockbreaker,項目名稱:rtap,代碼行數:18,代碼來源:ModBlocks.java

示例6: preInit

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
@Subscribe
public void preInit(FMLPreInitializationEvent evt)
{
    CapabilityItemHandler.register();
    CapabilityFluidHandler.register();
    CapabilityAnimation.register();
    CapabilityEnergy.register();
    MinecraftForge.EVENT_BUS.register(MinecraftForge.INTERNAL_HANDLER);
    ForgeChunkManager.captureConfig(evt.getModConfigurationDirectory());
    MinecraftForge.EVENT_BUS.register(this);

    if (!ForgeModContainer.disableVersionCheck)
    {
        ForgeVersion.startVersionCheck();
    }

    // Add and register the forge universal bucket, if it's enabled
    if(FluidRegistry.isUniversalBucketEnabled())
    {
        universalBucket = new UniversalBucket();
        universalBucket.setUnlocalizedName("forge.bucketFilled");
        GameRegistry.registerItem(universalBucket, "bucketFilled");
        MinecraftForge.EVENT_BUS.register(universalBucket);
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:26,代碼來源:ForgeModContainer.java

示例7: init

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
@CustomRegistry
public static void init() {
	Biome.BiomeProperties properties = new Biome.BiomeProperties("Rubber Plantation");
	properties.setTemperature(0.95F);
	properties.setRainfall(0.95F);
	properties.setBaseHeight(0.45F);
	properties.setHeightVariation(0.4F);

	rubberPlantationBiome = new RubberPlantationBiome(properties);
	rubberPlantationBiome.setRegistryName(new ResourceLocation(TRConstants.MOD_ID, "rubberPlantation"));

	GameRegistry.register(rubberPlantationBiome);

	BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(rubberPlantationBiome, 20));
	BiomeManager.addSpawnBiome(rubberPlantationBiome);
	BiomeProvider.allowedBiomes.add(rubberPlantationBiome);
}
 
開發者ID:TechReborn,項目名稱:TechReborn3,代碼行數:18,代碼來源:TechRebornWorld.java

示例8: preInit

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event){
    config = new Configuration(event.getSuggestedConfigurationFile());
    config.load();
    COMPASSX_PROPERTY = config.get("hidden", ConfigValues.COMPASSX_NAME, ConfigValues.COMPASSX_DEFAULT, I18n.format(ConfigValues.COMPASSX_NAME+".tooltip"));
    COMPASSY_PROPERTY = config.get("hidden", ConfigValues.COMPASSY_NAME, ConfigValues.COMPASSY_DEFAULT, I18n.format(ConfigValues.COMPASSY_NAME+".tooltip"));
    TARGETX_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.TARGETX_NAME, ConfigValues.TARGETX_DEFAULT, I18n.format(ConfigValues.TARGETX_NAME+".tooltip"));
    TARGETZ_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.TARGETZ_NAME, ConfigValues.TARGETZ_DEFAULT, I18n.format(ConfigValues.TARGETZ_NAME+".tooltip"));
    XALIGNMENT_PROPERTY = config.get("hidden", ConfigValues.XALIGNMENT_NAME, ConfigValues.XALIGNMENT_DEFAULT.name(), I18n.format(ConfigValues.XALIGNMENT_NAME+".tooltip"));
    YALIGNMENT_PROPERTY = config.get("hidden", ConfigValues.YALIGNMENT_NAME, ConfigValues.YALIGNMENT_DEFAULT.name(), I18n.format(ConfigValues.YALIGNMENT_NAME+".tooltip"));
    syncConfig();

    GameRegistry.register(uhccompass);
    ModelLoader.setCustomModelResourceLocation(uhccompass, 0, new ModelResourceLocation(MODID+":uhccompass", "inventory"));

    MinecraftForge.EVENT_BUS.register(new ClientEvents());
    MinecraftForge.EVENT_BUS.register(new RenderEvents());
    MinecraftForge.EVENT_BUS.register(keyHandler = new KeyHandler());
}
 
開發者ID:The-Fireplace-Minecraft-Mods,項目名稱:UHC-Compass,代碼行數:20,代碼來源:UHCCompass.java

示例9: registerBlocks

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
@SubscribeEvent
public static void registerBlocks(RegistryEvent.Register<Block> event) {
	
	event.getRegistry().register(new BlockLodestoneOre());
	event.getRegistry().register(new BlockBase("celestial_stone").setHardness(5F).setResistance(1000.0F));
	event.getRegistry().register(new BlockRift("rift"));
	event.getRegistry().register(new BlockPipe("pipe"));
	event.getRegistry().register(new BlockStabilityProjector());
	
	event.getRegistry().register(new BlockCreativeTank());
	event.getRegistry().register(new BlockTestTank());
	
	GameRegistry.registerTileEntity(TileEntityRift.class, Etheric.MODID + ":rift");
	GameRegistry.registerTileEntity(TileEntityPipe.class, Etheric.MODID + ":pipe");
	GameRegistry.registerTileEntity(TileEntityStabilityProjector.class, Etheric.MODID + ":stability_projector");
	
	GameRegistry.registerTileEntity(TileEntityCreativeTank.class, Etheric.MODID + ":creative_tank");
	GameRegistry.registerTileEntity(TileEntityTestTank.class, Etheric.MODID + ":test_tank");
	
}
 
開發者ID:the-realest-stu,項目名稱:Etheric,代碼行數:21,代碼來源:RegistryManager.java

示例10: register

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
public static void register(){
    GameRegistry.register(test_block);
    GameRegistry.register(ibTest_Block, test_block.getRegistryName());

    GameRegistry.register(shard_ore_orange);
    GameRegistry.register(ibshard_ore_orange, shard_ore_orange.getRegistryName());
    GameRegistry.register(shard_ore_green);
    GameRegistry.register(ibshard_ore_green, shard_ore_green.getRegistryName());
    GameRegistry.register(shard_ore_white);
    GameRegistry.register(ibshard_ore_white, shard_ore_white.getRegistryName());
    GameRegistry.register(shard_ore_purple);
    GameRegistry.register(ibshard_ore_purple, shard_ore_purple.getRegistryName());


    GameRegistry.register(trinket_maker);
    GameRegistry.register(ibtrinket_maker, trinket_maker.getRegistryName());
}
 
開發者ID:inifire201,項目名稱:MagicWinds,代碼行數:18,代碼來源:BlockHandler.java

示例11: init

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event) {
	proxy.init(event);

	NetworkRegistry.INSTANCE.registerGuiHandler(Currency.INSTANCE, new GuiHandler());

	AccountCapability.register();
	CartCapability.register();

	PacketDispatcher.registerPackets();

	FMLInterModComms.sendMessage("waila", "register", "com.zundrel.currency.common.compat.waila.CurrencyWailaProvider.callbackRegister");

	GameRegistry.registerTileEntity(TileEntityShopController.class, ModInfo.MODID + ":" + "shop_controller");
	GameRegistry.registerTileEntity(TileEntityDisplay.class, ModInfo.MODID + ":" + "display");
	GameRegistry.registerTileEntity(TileEntityStockCrate.class, ModInfo.MODID + ":" + "stock_crate");
}
 
開發者ID:Zundrel,項目名稱:Never-Enough-Currency,代碼行數:18,代碼來源:Currency.java

示例12: preInit

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	ModMetadata meta = event.getModMetadata();

	meta.authorList = Arrays.asList(new String[]{"bl4ckscor3"});
	meta.autogenerated = false;
	meta.description = "Adds a fast way to store XP and share it with your friends!";
	meta.modId = MOD_ID;
	meta.name = NAME;
	meta.version = VERSION;
	MinecraftForge.EVENT_BUS.register(new bl4ckscor3.mod.globalxp.handlers.EventHandler());
	config = new Config(event.getSuggestedConfigurationFile());
	network = NetworkRegistry.INSTANCE.newSimpleChannel(MOD_ID);
	network.registerMessage(new SPacketUpdateXPBlock.Handler(), SPacketUpdateXPBlock.class, 0, Side.CLIENT);
	network.registerMessage(new CPacketRequestXPBlockUpdate.Handler(), CPacketRequestXPBlockUpdate.class, 1, Side.SERVER);
	xp_block = new XPBlock(Material.IRON);
	GameData.register_impl(xp_block);
	GameData.register_impl(new ItemBlock(xp_block).setRegistryName(xp_block.getRegistryName().toString()));
	GameRegistry.registerTileEntity(TileEntityXPBlock.class, xp_block.getRegistryName().toString());
	serverProxy.loadModels();
	serverProxy.registerRenderers();
}
 
開發者ID:bl4ckscor3,項目名稱:GlobalXP,代碼行數:24,代碼來源:GlobalXP.java

示例13: registerRecipes

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
@Override
public void registerRecipes() 
{
	GameRegistry.addShapelessRecipe(new ItemStack(this), 
			Items.PAPER, 
			Items.BLAZE_POWDER
	);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-territorialdealings,代碼行數:9,代碼來源:FactionRenameOrder.java

示例14: register

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
public static void register(){
    GameRegistry.register(testItem);
    GameRegistry.register(debugItem);

    GameRegistry.register(orangeShard);
    GameRegistry.register(greenShard);
    GameRegistry.register(whiteShard);
    GameRegistry.register(purpleShard);

    GameRegistry.register(testRing);
    GameRegistry.register(redRing);

}
 
開發者ID:inifire201,項目名稱:MagicWinds,代碼行數:14,代碼來源:ItemHandler.java

示例15: registerRecipe

import net.minecraftforge.fml.common.registry.GameRegistry; //導入依賴的package包/類
private static void registerRecipe()
{
	GameRegistry.addRecipe(new ItemStack(ItemLoader.itemCamera), new Object[]{
	                "[email protected]#", "$%@", "@@@", '@', Blocks.OBSIDIAN, '!', Blocks.GLOWSTONE , '#',Blocks.STONE_BUTTON,'$',Items.ENDER_EYE,'%',Blocks.REDSTONE_BLOCK
	        });
	GameRegistry.addShapelessRecipe(new ItemStack(ItemLoader.itemCamera),ItemLoader.itemTripod);
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockLoader.pictureFrame), new Object[]{
            "!!", "@@", '!', "plankWood", '@', Blocks.WOOL
    }));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockLoader.pictureFrameMultiple), new Object[]{
            "!!!", "@@@","@@@", '!', "plankWood", '@', Blocks.WOOL
    }));
	GameRegistry.addRecipe(new ItemStack(ItemLoader.itemBattery), new Object[]{
            "!#!", "[email protected]!","[email protected]!", '!', Blocks.REDSTONE_BLOCK, '@', Blocks.OBSIDIAN,'#',Blocks.STONE_BUTTON
    });
	GameRegistry.addRecipe(new ItemStack(ItemLoader.itemFilm), new Object[]{
            "!!!", "@@@","!!!", '!', Items.ENDER_PEARL, '@', Blocks.GLASS_PANE
    });
	GameRegistry.addRecipe(new ItemStack(BlockLoader.photoprocessor), new Object[]{
            "[email protected]!", "!#!","!$!", '!', Blocks.IRON_BLOCK, '@', Items.DIAMOND,'#',Items.ENDER_PEARL,'$',Blocks.REDSTONE_BLOCK
    });
	GameRegistry.addShapelessRecipe(new ItemStack(ItemLoader.itemPhotoPaper), Items.MILK_BUCKET,Items.PAPER,Items.IRON_INGOT,Items.GOLD_INGOT);
	GameRegistry.addRecipe(new ItemStack(ItemLoader.itemCntsTempLiquid), new Object[]{
            "!!!", "@[email protected]","@#@", '!', Items.BLAZE_ROD, '@', Blocks.GLASS_PANE,'#',Items.WATER_BUCKET
    });
	GameRegistry.addRecipe(new ItemStack(ItemLoader.itemDevelopingAgent), new Object[]{
            "[email protected]#", "$%$","^&^", '!', new ItemStack(Items.DYE, 1, EnumDyeColor.RED.getDyeDamage()), '@',  new ItemStack(Items.DYE, 1, EnumDyeColor.YELLOW.getDyeDamage()),'#', new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()),'$',Items.GOLD_INGOT,'%',Items.ENDER_PEARL,'^',Blocks.GLASS_PANE,'&',Items.WATER_BUCKET
    });
	GameRegistry.addRecipe(new ItemStack(ItemLoader.itemTripod), new Object[]{
			" ! ", " @ ","@#@", '!', ItemLoader.itemCamera, '@', Blocks.IRON_BLOCK,'#',Items.ENDER_EYE
    });
	GameRegistry.addRecipe(new ItemStack(ItemLoader.itemGlassesHelmet), new Object[]{
			"!$!", "@#@","! !", '!', Items.STICK, '@', Blocks.GLASS_PANE,'#',Blocks.OBSIDIAN,'$',Items.ENDER_EYE
    });
	GameRegistry.addRecipe(new ItemStack(ItemLoader.itemPictureBook), new Object[]{
			"!!!", "[email protected]#","!##", '!', Items.PAPER, '@', Items.SLIME_BALL,'#',Items.LEATHER
    });
}
 
開發者ID:PorPit,項目名稱:MineCamera,代碼行數:39,代碼來源:CraftingLoader.java


注:本文中的net.minecraftforge.fml.common.registry.GameRegistry類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。