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


Java RenderingRegistry类代码示例

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


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

示例1: init

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
@Override
public void init() {
    for (Fluid fluid : Fluids.FLUIDS) {
        ModelLoader.setBucketModelDefinition(Fluids.getBucket(fluid));
    }

    ThirdPartyManager.instance().clientInit();

    RenderingRegistry.registerEntityRenderingHandler(EntityRing.class, RenderEntityRing.FACTORY);
    EntityRegistry.registerModEntity(RL("ring"), EntityRing.class, Names.MOD_ID + ".ring", 100, PneumaticCraftRepressurized.instance, 80, 1, true);

    registerModuleRenderers();

    Blockss.setupColorHandlers();
    BlockColorHandler.registerColorHandlers();
    ItemColorHandler.registerColorHandlers();

    super.init();
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:20,代码来源:ClientProxy.java

示例2: preInit

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
@Override
public void preInit() {

    super.preInit();
    GuiWirelessSniffer.loadColours(SaveManager.config().getTag("addon"));
    TextureUtils.addIconRegister(new RenderWireless());
    TextureUtils.addIconRegister(new RemoteTexManager());
    TextureUtils.addIconRegister(new TriangTexManager());
    PacketCustom.assignHandler(NET_CHANNEL, new WRClientPH());

    MapRenderRegistry.registerMapRenderer(ModItems.itemWirelessMap, new WirelessMapRenderer());

    RenderingRegistry.registerEntityRenderingHandler(EntityREP.class, manager -> new RenderSnowball<>(manager, itemRep, Minecraft.getMinecraft().getRenderItem()));
    RenderingRegistry.registerEntityRenderingHandler(EntityWirelessTracker.class, RenderTracker::new);
    registerModels();
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:17,代码来源:ProxyClient.java

示例3: preInitMod

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
@Override
public void preInitMod()
{
    super.preInitMod();

    iChunUtil.proxy.registerMinecraftKeyBind(Minecraft.getMinecraft().gameSettings.keyBindUseItem);

    Torched.eventHandlerClient = new EventHandlerClient();
    MinecraftForge.EVENT_BUS.register(Torched.eventHandlerClient);

    RenderingRegistry.registerEntityRenderingHandler(EntityTorch.class, new RenderTorch.RenderFactory());
    RenderingRegistry.registerEntityRenderingHandler(EntityTorchFirework.class, new RenderTorchFirework.RenderFactory());
}
 
开发者ID:iChun,项目名称:Torched,代码行数:14,代码来源:ProxyClient.java

示例4: registerModels

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
public void registerModels()
{
    ItemModels.register();
    //BlockModels.register();

    ModelLoader.setCustomStateMapper(ModBlocks.thorns,new StateMap.Builder().ignore(BlockThorns.FACING).build());
    ModelLoader.setCustomStateMapper(ModBlocks.brine, new BrineStateMapper());
    ModelLoader.setCustomStateMapper(ModBlocks.aqueductWater, new StateMapperBase() {
        @Override
        protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
            return aqueductWaterLocation;
        }
    });

    RenderingRegistry.registerEntityRenderingHandler(EntityGreatarrow.class, RenderGreatarrow.GREATARROW_RENDER);
    RenderingRegistry.registerEntityRenderingHandler(EntityYa.class, RenderYa.YA_RENDER);
    RenderingRegistry.registerEntityRenderingHandler(EntitySpirit.class, manager -> new RenderSpirit(manager));
    RenderingRegistry.registerEntityRenderingHandler(EntityAncestryBottle.class, manager -> new RenderSnowball<>(manager,ModItems.ancestryBottle,Minecraft.getMinecraft().getRenderItem()));
    RenderingRegistry.registerEntityRenderingHandler(EntityArtifactFrame.class, RenderArtifactFrame.ARTIFACEFRAME_RENDER);
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAlchDragon.class, new RenderAlchDragon());
}
 
开发者ID:DaedalusGame,项目名称:BetterWithAddons,代码行数:22,代码来源:ClientProxy.java

示例5: register

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
public static <ENTITY extends Entity> void register(Class<ENTITY> classes, final Class<? extends Render<ENTITY>> render)
{
	RenderingRegistry.registerEntityRenderingHandler(classes, new IRenderFactory<ENTITY>() {

		@Override
		public Render<ENTITY> createRenderFor(RenderManager manager) 
		{
			try
			{
				return render.getConstructor(RenderManager.class).newInstance(manager);
			}
			catch (Exception e)
			{
				e.printStackTrace();
			}

			return null;
		}
	});
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:21,代码来源:AetherEntityRenderingRegistry.java

示例6: preInit

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
@Override
public void preInit(FMLPreInitializationEvent event) {
	super.preInit(event);

	OBJLoader.INSTANCE.addDomain(Constants.MOD_ID);
	LaserRenderer.INSTANCE.getClass();
	ScrewdriverOverlay.INSTANCE.getClass();
	GunOverlay.INSTANCE.getClass();
	EventHandlerClient.INSTANCE.getClass(); // ditto
	ModBlocks.initModels();
	ModItems.initModels();

	RenderingRegistry.registerEntityRenderingHandler(EntityLaserPointer.class, RenderLaserPoint::new);
	RenderingRegistry.registerEntityRenderingHandler(EntityPlasma.class, RenderPlasma::new);
	RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, manager -> new RenderGrenade(manager, ModItems.GRENADE, Minecraft.getMinecraft().getRenderItem()));
}
 
开发者ID:TeamWizardry,项目名称:TMT-Refraction,代码行数:17,代码来源:ClientProxy.java

示例7: preInit

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
@Override
public void preInit(FMLPreInitializationEvent evt) {
    MCDoom.instance.getGoreProperty().setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);
    MCDoom.instance.getMaxGoreParticles().setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);

    MinecraftForge.EVENT_BUS.register(screenEventHandler);
    MinecraftForge.EVENT_BUS.register(soundEventsHandler);
    registerItems();

    RenderingRegistry.registerEntityRenderingHandler(PlasmaBallEntity.class, new IRenderFactory<PlasmaBallEntity>() {
        @Override
        public Render<? super PlasmaBallEntity> createRenderFor(RenderManager manager) {
            return new RenderPlasmaBall(manager);
        }
    });

    loadWeaponRenderers();
}
 
开发者ID:jglrxavpok,项目名称:MCDoom,代码行数:19,代码来源:MCDoomClientProxy.java

示例8: registerRendering

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public static void registerRendering() {
	
	// living
	RenderingRegistry.registerEntityRenderingHandler(EntityLCZombie.class, RenderLCZombie.FACTORY);
	RenderingRegistry.registerEntityRenderingHandler(EntityDemonSoldier.class, RenderDemonSoldier.FACTORY);
	RenderingRegistry.registerEntityRenderingHandler(EntityUnderworldSlime.class, RenderUnderworldSlime.FACTORY);
	RenderingRegistry.registerEntityRenderingHandler(EntityUnderworldSkeleton.class, RenderUnderworldSkeleton.FACTORY);
	RenderingRegistry.registerEntityRenderingHandler(EntityUnderworldSilverfish.class, RenderUnderworldSilverfish.FACTORY);
	RenderingRegistry.registerEntityRenderingHandler(EntityUnderworldGhast.class, RenderUnderworldGhast.FACTORY);
	RenderingRegistry.registerEntityRenderingHandler(EntityUnderworldCreeper.class, RenderUnderworldCreeper.FACTORY);
	
	// non-living
	RenderingRegistry.registerEntityRenderingHandler(EntityLCTNTPrimed.class, RenderLCTNTPrimed.FACTORY);
	RenderingRegistry.registerEntityRenderingHandler(EntityLCElectricAttack.class, RenderLCElectricAttack.FACTORY);
}
 
开发者ID:sblectric,项目名称:LightningCraft,代码行数:17,代码来源:LCEntities.java

示例9: registerEntities

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
private void registerEntities() {
  //minecarts
  //http://wiki.mcjty.eu/modding/index.php/Mobs-1.9
  RenderingRegistry.registerEntityRenderingHandler(EntityGoldMinecart.class, RenderCyclicMinecart.FACTORY_GOLD);
  RenderingRegistry.registerEntityRenderingHandler(EntityGoldFurnaceMinecart.class, RenderCyclicMinecart.FACTORY_GOLD_FURNACE);
  RenderingRegistry.registerEntityRenderingHandler(EntityStoneMinecart.class, RenderCyclicMinecart.FACTORY_STONE_FURNACE);
  RenderingRegistry.registerEntityRenderingHandler(EntityMinecartTurret.class, RenderCyclicMinecart.FACTORY_TURRET);
  //the projectiles too
  RenderingRegistry.registerEntityRenderingHandler(EntityLightningballBolt.class, new FactoryLightning());
  RenderingRegistry.registerEntityRenderingHandler(EntitySnowballBolt.class, new FactorySnow());
  RenderingRegistry.registerEntityRenderingHandler(EntityTorchBolt.class, new FactoryTorch());
  RenderingRegistry.registerEntityRenderingHandler(EntityFishingBolt.class, new FactoryFish());
  RenderingRegistry.registerEntityRenderingHandler(EntityShearingBolt.class, new FactoryShear());
  RenderingRegistry.registerEntityRenderingHandler(EntityDungeonEye.class, new FactoryDungeon());
  RenderingRegistry.registerEntityRenderingHandler(EntityDynamite.class, new FactoryDyn());
  RenderingRegistry.registerEntityRenderingHandler(EntityBlazeBolt.class, new FactoryFire());
  RenderingRegistry.registerEntityRenderingHandler(EntityDynamiteMining.class, new FactoryDynMining());
  RenderingRegistry.registerEntityRenderingHandler(EntityDynamiteBlockSafe.class, new FactoryDynSafe());
  RenderingRegistry.registerEntityRenderingHandler(EntityMagicNetFull.class, new FactoryBall());
  RenderingRegistry.registerEntityRenderingHandler(EntityMagicNetEmpty.class, new FactoryBallEmpty());
  RenderingRegistry.registerEntityRenderingHandler(EntityHomingProjectile.class, new FactoryMissile());
  RenderingRegistry.registerEntityRenderingHandler(EntityEnderEyeUnbreakable.class, new EntityEnderEyeUnbreakable.FactoryMissile());
}
 
开发者ID:PrinceOfAmber,项目名称:Cyclic,代码行数:24,代码来源:ClientProxy.java

示例10: init

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
public static void init()
{
	RenderingRegistry.registerEntityRenderingHandler(EntityDodoEgg.class,
			new RenderSnowball(Minecraft.getMinecraft().getRenderManager(),
					ARKCraftItems.dodo_egg, Minecraft.getMinecraft()
							.getRenderItem()));
	RenderingRegistry.registerEntityRenderingHandler(EntityRaptor.class,
			new RenderRaptor(new ModelRaptor(), 0.5F));
	RenderingRegistry.registerEntityRenderingHandler(
			EntitySabertooth.class, new RenderSabertooth(
					new ModelSabertooth(), 0.5F));
	RenderingRegistry.registerEntityRenderingHandler(EntityDodo.class,
			new RenderDodo(new ModelDodo(), 0.3F));
	RenderingRegistry.registerEntityRenderingHandler(
			EntityBrontosaurus.class, new RenderBrontosaurus(
					new ModelBrontosaurus(), 0.5f));
}
 
开发者ID:Archiving,项目名称:ARKCraft-Code,代码行数:18,代码来源:Models.java

示例11: registerTileEntities

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
@Override
public void registerTileEntities() {
	super.registerTileEntities();
	
	IReloadableResourceManager IRRM = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
	IRRM.registerReloadListener(this);
	
	RenderManager rm = Minecraft.getMinecraft().getRenderManager();
	
	RenderingRegistry.registerEntityRenderingHandler(EntityStone.class, new RenderEntityStone());
	RenderingRegistry.registerEntityRenderingHandler(EntityMobHorse.class, new RenderHorse(rm, new ModelHorse(), 0.75f));		
	RenderingRegistry.registerEntityRenderingHandler(EntityForestSpider.class, new RenderForestSpider(rm));
	RenderingRegistry.registerEntityRenderingHandler(EntityCoalPoweredMinecartVC.class, new RenderMinecart(rm));
	RenderingRegistry.registerEntityRenderingHandler(EntityEmptyMinecartVC.class, new RenderMinecart(rm));
	
	RenderingRegistry.registerEntityRenderingHandler(EntityCowVC.class, new RenderCow(rm, new ModelCowVC(), 0.7F));
	RenderingRegistry.registerEntityRenderingHandler(EntitySheepVC.class, new RenderSheep(rm, new ModelSheep2(), 0.7F));
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:19,代码来源:ClientProxy.java

示例12: onPreInit

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
@Override
public void onPreInit(FMLPreInitializationEvent event) {
    super.onPreInit(event);
    
    // register dragon entity renderer
    RenderingRegistry.registerEntityRenderingHandler(
            EntityTameableDragon.class, DragonRenderer::new);
    
    // register item renderer for dragon egg block variants
    ResourceLocation eggModelItemLoc = new ResourceLocation(DragonMounts.AID, "dragon_egg");
    Item itemBlockDragonEgg = Item.REGISTRY.getObject(eggModelItemLoc);
    EnumDragonBreed.META_MAPPING.forEach((breed, meta) -> {
        ModelResourceLocation eggModelLoc = new ModelResourceLocation(DragonMounts.AID + ":dragon_egg", "breed=" + breed.getName());
        ModelLoader.setCustomModelResourceLocation(itemBlockDragonEgg, meta, eggModelLoc);
    });
}
 
开发者ID:ata4,项目名称:dragon-mounts,代码行数:17,代码来源:ClientProxy.java

示例13: registerRenders

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
@Override
public void registerRenders(){
    super.registerRenders();
    RenderingRegistry.registerEntityRenderingHandler(EntityRook.class, new RenderChessPiece(new ModelRook(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityKing.class, new RenderChessPiece(new ModelKing(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityPawn.class, new RenderChessPiece(new ModelPawn(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityKnight.class, new RenderChessPiece(new ModelKnight(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityQueen.class, new RenderChessPiece(new ModelQueen(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityBishop.class, new RenderChessPiece(new ModelBishop(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityPickyXPOrb.class, new RenderXPOrb(Minecraft.getMinecraft().getRenderManager()));
    MinecraftForge.EVENT_BUS.register(new MineChessDrawBlockHighlightHandler());

    String[] names = new String[5];
    for(int i = 0; i < 5; i++) {
        String name = "chessmod:" + new ItemStack(MineChess.itemPieceMover, 1, i).getUnlocalizedName().substring(5);
        names[i] = name;
        Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(MineChess.itemPieceMover, i, new ModelResourceLocation(name, "inventory"));
    }
    ModelBakery.addVariantName(MineChess.itemPieceMover, names);
}
 
开发者ID:MineMaarten,项目名称:MineChess,代码行数:21,代码来源:ClientProxyMineChess.java

示例14: registerEntityRenders

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public static void registerEntityRenders() {
	RenderingRegistry.registerEntityRenderingHandler(EntityMobTest.class, new IRenderFactory() {
	@Override
	public Render createRenderFor(RenderManager manager) {
		return new RenderMobTest(manager, new ModelMobTest(), 0.4F);
	}});
}
 
开发者ID:CJMinecraft01,项目名称:EntitiesTutorial,代码行数:9,代码来源:ModEntities.java

示例15: registerRenders

import net.minecraftforge.fml.client.registry.RenderingRegistry; //导入依赖的package包/类
private void registerRenders() {
	RenderingRegistry.registerEntityRenderingHandler(EntityBrew.class, BrewRenderer::new);
	RenderingRegistry.registerEntityRenderingHandler(EntityBrewLinger.class, EmptyRenderer::new);
	RenderingRegistry.registerEntityRenderingHandler(EntitySpellCarrier.class, SpellRenderer::new);

	ClientRegistry.bindTileEntitySpecialRenderer(TileCauldron.class, new TileRenderCauldron());
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:8,代码来源:ClientProxy.java


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