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


Java MinecraftForgeClient类代码示例

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


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

示例1: init

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
@Override
public void init(FMLInitializationEvent event)
{
    super.init(event);
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockCapacitor), new ItemRendererCapacitor());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockDiode), new ItemRendererDiode());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockResistor), new ItemRendererResistor());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockSwitch), new ItemRendererSwitch());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockInvisTess), new ItemRendererInvisTess());
    //MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockRFMeter), new ItemRendererRFMeter());
    MinecraftForgeClient.registerItemRenderer(RFUContent.itemMaterialTess, new ItemRendererMaterialTess());
    //MinecraftForgeClient.registerItemRenderer(RFUContent.itemMaterialDisplay, new ItemRendererMaterialDisplay());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockTransistor), new ItemRendererTransistor());
    FMLCommonHandler.instance().bus().register(new KeyInputHandler());
    KeyBindings.init();
}
 
开发者ID:XFactHD,项目名称:RFUtilities,代码行数:17,代码来源:ClientProxy.java

示例2: getQuads

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
@Override
protected List<BakedQuad> getQuads(IBlockState state) {
	List<BakedQuad> quads = new ArrayList<>();
	switch(MinecraftForgeClient.getRenderLayer()) {
		case SOLID:
			//Base
			quads.addAll(QuadBuilder.withFormat(format)
					.setFrom(0, 0, 0)
					.setTo(16, 16, 16)
					.addAll(base)
					.bake()
			);
			break;
		case CUTOUT_MIPPED:
			//Overlay
			quads.addAll(QuadBuilder.withFormat(format)
					.setFrom(0, 0, 0)
					.setTo(16, 16, 16)
					.setHasBrightness(true)
					.addAll(overlay)
					.bake()
			);
			break;
	}
	return quads;
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:27,代码来源:BakedHyperConductor.java

示例3: getQuads

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
@Override
protected List<BakedQuad> getQuads(IBlockState state) {
	EnumFacing face = state.getValue(BlockDirectional.FACING);
	List<BakedQuad> quads = new ArrayList<>();
	switch(MinecraftForgeClient.getRenderLayer()) {
		case SOLID:
			//Base
			addCube(quads, face, base, base, base, false);
			break;
		case CUTOUT_MIPPED:
			//Overlay
			addCube(quads, face, overlay[0], overlay[1], overlay[2], true);
			break;
	}
	return quads;
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:17,代码来源:BakedGravityHopper.java

示例4: getQuads

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
@Override
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{
    IBakedModel model;
    BlockRenderLayer layer = MinecraftForgeClient.getRenderLayer();
    if(layer == null)
    {
        return quads.get(Optional.fromNullable(side));
    }
    else if(!models.containsKey(Optional.of(layer)))
    {
        model = missing;
    }
    else
    {
        model = models.get(Optional.of(layer));
    }
    // assumes that child model will handle this state properly. FIXME?
    return model.getQuads(state, side, rand);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:21,代码来源:MultiLayerModel.java

示例5: init

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
@Override
public void init(final @Nonnull FMLInitializationEvent event) {
	super.init(event);

	// Replace Sign Renderer
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySign.class, Client.renderer);
	MinecraftForgeClient.registerItemRenderer(Items.sign, new CustomItemSignRenderer());

	// Event Register
	Client.handler.init();
	ClientCommandHandler.instance.registerCommand(Client.rootCommand);
}
 
开发者ID:Team-Fruit,项目名称:SignPicture,代码行数:13,代码来源:ClientProxy.java

示例6: getQuads

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
private void getQuads(ModelHolder holder, List<BakedQuad> quads)
{
    if (holder.actualState.getRenderType() == EnumBlockRenderType.MODEL/* ||
        holder.actualState.getRenderType() == EnumBlockRenderType.LIQUID*/)
    {
        BlockRenderLayer originalLayer = MinecraftForgeClient.getRenderLayer();

        for (BlockRenderLayer layer : BlockRenderLayer.values())
        {
            if (holder.actualState.getBlock().canRenderInLayer(holder.actualState, layer))
            {
                ForgeHooksClient.setRenderLayer(layer);

                for (final EnumFacing facing : EnumFacing.values())
                {
                    quads.addAll(holder.model.getQuads(holder.extendedState, facing, 0));
                }

                quads.addAll(holder.model.getQuads(holder.extendedState, null, 0));
            }
        }

        ForgeHooksClient.setRenderLayer(originalLayer);
    }
}
 
开发者ID:maruohon,项目名称:placementpreview,代码行数:26,代码来源:RenderEventHandler.java

示例7: initRenders

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
@Override
	public void initRenders()
	{
		RenderIds.campfire = RenderingRegistry.getNextAvailableRenderId();
		ClientRegistry.bindTileEntitySpecialRenderer(TileCampfire.class, new TileRenderCampfire());
		ClientRegistry.bindTileEntitySpecialRenderer(TileHardJug.class, new TileRenderJug());

		MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.hardjug), new ItemRenderJug());
		MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.campfire), new ItemRenderCampfire());

//		ClientRegistry.bindTileEntitySpecialRenderer(TileCampfire.class, new TileRenderCampfire());
		if(Loader.isModLoaded("NotEnoughItems"))
		{
			
		}
	}
 
开发者ID:gigabit101,项目名称:PrimitiveCraft,代码行数:17,代码来源:ClientProxy.java

示例8: registerTileEntitiesRenderers

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
@Override
public void registerTileEntitiesRenderers() {
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLargePowerLine.class, new LargePowerLineRenderer());
    MinecraftForgeClient.registerItemRenderer(
            Item.getItemFromBlock(PowerLinesMod.blocks.largePowerLine),
            new LargePowerLineItemRenderer()
        );

    ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySubStation.class, new SubStationRenderer());
    MinecraftForgeClient.registerItemRenderer(
            Item.getItemFromBlock(PowerLinesMod.blocks.subStation),
            new SubStationItemRenderer()
    );

    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMediumPowerLine.class, new MediumPowerLineRenderer());
    MinecraftForgeClient.registerItemRenderer(
            Item.getItemFromBlock(PowerLinesMod.blocks.mediumPowerLine),
            new MediumPowerLineItemRenderer()
    );
}
 
开发者ID:UntouchedWagons,项目名称:PowerLines,代码行数:21,代码来源:ClientProxy.java

示例9: allocateFrameBuffer

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
private void allocateFrameBuffer() {
	if (this.framebuffer != 0) return;

	this.framebuffer = EXTFramebufferObject.glGenFramebuffersEXT(); //Release via: EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffer);
	this.depthBuffer = EXTFramebufferObject.glGenRenderbuffersEXT(); //Release via: EXTFramebufferObject.glDeleteRenderbuffersEXT(depthBuffer);

	EXTFramebufferObject.glBindFramebufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, this.framebuffer);

	EXTFramebufferObject.glBindRenderbufferEXT(EXTFramebufferObject.GL_RENDERBUFFER_EXT, depthBuffer);
	if (MinecraftForgeClient.getStencilBits() == 0) EXTFramebufferObject.glRenderbufferStorageEXT(EXTFramebufferObject.GL_RENDERBUFFER_EXT, GL14.GL_DEPTH_COMPONENT24, width, height);
	else EXTFramebufferObject.glRenderbufferStorageEXT(EXTFramebufferObject.GL_RENDERBUFFER_EXT, org.lwjgl.opengl.EXTPackedDepthStencil.GL_DEPTH24_STENCIL8_EXT, width, height);

	EXTFramebufferObject.glFramebufferRenderbufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, EXTFramebufferObject.GL_DEPTH_ATTACHMENT_EXT, EXTFramebufferObject.GL_RENDERBUFFER_EXT, depthBuffer);
	if (MinecraftForgeClient.getStencilBits() != 0) EXTFramebufferObject.glFramebufferRenderbufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, EXTFramebufferObject.GL_STENCIL_ATTACHMENT_EXT, EXTFramebufferObject.GL_RENDERBUFFER_EXT, depthBuffer);

	this.texture = GL11.glGenTextures(); //Release via: GL11.glDeleteTextures(colorTexture);
	GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.texture);
	GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
	GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA8, width, height, 0, GL11.GL_RGBA, GL11.GL_INT, (java.nio.ByteBuffer) null);
	EXTFramebufferObject.glFramebufferTexture2DEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, EXTFramebufferObject.GL_COLOR_ATTACHMENT0_EXT, GL11.GL_TEXTURE_2D, this.texture, 0);

	EXTFramebufferObject.glBindFramebufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, 0);
}
 
开发者ID:XCompWiz,项目名称:LookingGlass,代码行数:24,代码来源:FrameBufferContainer.java

示例10: registerRenderers

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
private void registerRenderers()
{
    MinecraftForge.EVENT_BUS.register(new LineRenderer(Minecraft.getMinecraft()));

    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTransporter.class, new TransporterRenderer());

    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.transporter),
            new TransporterItemRenderer());

    MinecraftForgeClient.registerItemRenderer(ModItems.redLED,
            new UpgradeItemRenderer(ResourceLocationHelper.getResourceLocation(Names.Models.RED_LED)));
    MinecraftForgeClient.registerItemRenderer(ModItems.blueLED,
            new UpgradeItemRenderer(ResourceLocationHelper.getResourceLocation(Names.Models.BLUE_LED)));
    MinecraftForgeClient.registerItemRenderer(ModItems.greenLED,
            new UpgradeItemRenderer(ResourceLocationHelper.getResourceLocation(Names.Models.GREEN_LED)));
    MinecraftForgeClient.registerItemRenderer(ModItems.itemCore,
            new CoreItemRenderer(ResourceLocationHelper.getResourceLocation(Names.Models.ITEM_CRYSTAL)));
    MinecraftForgeClient.registerItemRenderer(ModItems.fluidCore,
            new CoreItemRenderer(ResourceLocationHelper.getResourceLocation(Names.Models.FLUID_CRYSTAL)));
}
 
开发者ID:samvbeckmann,项目名称:network,代码行数:21,代码来源:ClientProxy.java

示例11: registerItemRenderers

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
public static void registerItemRenderers()
{
    MinecraftForgeClient.registerItemRenderer(ARItems.shuttleItem, new ItemRendererShuttle(rocketModel));

    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ARBlocks.blockShuttleDock.getBlock()), new ItemRendererSpecial1());


    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ARBlocks.metaBlockMothershipEngineJet), new ItemRendererJet(
            new IModelCustom[]{engineModel, engineModelIon},
            new ResourceLocation[] {
                    new ResourceLocation(AmunRa.instance.ASSETPREFIX, "textures/model/jet.png"),
                    new ResourceLocation(AmunRa.instance.ASSETPREFIX, "textures/model/jet-ion.png")
                    }
            ));

}
 
开发者ID:katzenpapst,项目名称:amunra,代码行数:17,代码来源:ClientProxy.java

示例12: isAmbientOcclusion

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
@Override
public boolean isAmbientOcclusion()
{
 
    BlockRenderLayer layer = MinecraftForgeClient.getRenderLayer();
    if(layer == null) return true;
    
    switch(layer)
    {
    case SOLID:
        return !this.blockRenderMode.isSolidLayerFlatLighting;
        
    case TRANSLUCENT:
        return !this.blockRenderMode.isTranlucentLayerFlatLighting;
        
    default:
        return true;
    }
}
 
开发者ID:grondag,项目名称:Hard-Science,代码行数:20,代码来源:SuperDispatcher.java

示例13: renderBlock

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
protected void renderBlock(SuperTileEntity te, BufferBuilder buffer)
{
    SuperBlock block = (SuperBlock) te.getBlockType();
    if(block.blockRenderMode != BlockRenderMode.TESR) return;
    
    if(MinecraftForgeClient.getRenderPass() == 0)
    {
        ForgeHooksClient.setRenderLayer(BlockRenderLayer.SOLID);
        
        // FIXME: only do this when texture demands it and use FastTESR other times
        GlStateManager.disableAlpha();
        renderBlockInner(te, block, false, buffer);
        GlStateManager.enableAlpha();
        ForgeHooksClient.setRenderLayer(null);
    }
    else if(MinecraftForgeClient.getRenderPass() == 1)
    {
        ForgeHooksClient.setRenderLayer(BlockRenderLayer.TRANSLUCENT);
        renderBlockInner(te, block, true, buffer);
        ForgeHooksClient.setRenderLayer(null);
    }
}
 
开发者ID:grondag,项目名称:Hard-Science,代码行数:23,代码来源:SuperBlockTESR.java

示例14: initRenderingAndTextures

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
@Override
public void initRenderingAndTextures()
{
	FMLCommonHandler.instance().bus().register(new ClientTickHandler());

	RenderIds.mechanicalRoot = RenderingRegistry.getNextAvailableRenderId();
	RenderIds.rotaryShaft = RenderingRegistry.getNextAvailableRenderId();
	RenderIds.windTurbine = RenderingRegistry.getNextAvailableRenderId();

	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.mechanicalRoot), new ItemRendererMechanicalRoot());
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.rotaryShaft), new ItemRendererRotaryShaft());
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.windTurbine), new ItemRendererWindTurbine());

	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMechanicalRoot.class, new TileEntityRendererMechanicalRoot());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRotaryShaft.class, new TileEntityRendererRotaryShaft());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWindTurbine.class, new TileEntityRendererWindTurbine());
}
 
开发者ID:Tamfoolery,项目名称:Woodcraft,代码行数:18,代码来源:ClientProxy.java

示例15: registerRenderThings

import net.minecraftforge.client.MinecraftForgeClient; //导入依赖的package包/类
@Override
public void registerRenderThings() {
    RenderTEAdvancedCauldron.renderId = RenderingRegistry.getNextAvailableRenderId();
    RenderAdvancedBeacon.renderId = RenderingRegistry.getNextAvailableRenderId();

    RenderingRegistry.registerBlockHandler(new RenderTEAdvancedCauldron());
    RenderingRegistry.registerBlockHandler(new RenderAdvancedBeacon());

    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAdvancedBeacon.class, new RenderAdvancedBeacon());

    RenderingRegistry.registerEntityRenderingHandler(EntityHostilePig.class, new RenderHostilePig(new ModelPig(), new ModelPig(), 0.5f));
    RenderingRegistry.registerEntityRenderingHandler(EntityThrownCapsule.class, new RenderThrownCapsule());

    MinecraftForgeClient.registerItemRenderer(AdvancedPotions.potion, new RenderItemPotion());
    MinecraftForgeClient.registerItemRenderer(AdvancedPotions.shield, new RenderItemShield());
}
 
开发者ID:meew0,项目名称:AdvancedPotions,代码行数:17,代码来源:APClientProxy.java


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