本文整理汇总了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
);
}
示例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"));
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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());
}
示例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");
}
示例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());
}
示例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");
}
示例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();
}
示例13: registerRecipes
import net.minecraftforge.fml.common.registry.GameRegistry; //导入依赖的package包/类
@Override
public void registerRecipes()
{
GameRegistry.addShapelessRecipe(new ItemStack(this),
Items.PAPER,
Items.BLAZE_POWDER
);
}
示例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);
}
示例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
});
}