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


Java ItemCameraTransforms.TransformType方法代码示例

本文整理汇总了Java中net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType方法的典型用法代码示例。如果您正苦于以下问题:Java ItemCameraTransforms.TransformType方法的具体用法?Java ItemCameraTransforms.TransformType怎么用?Java ItemCameraTransforms.TransformType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.renderer.block.model.ItemCameraTransforms的用法示例。


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

示例1: renderItemModel

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
protected void renderItemModel(ItemStack stack, IBakedModel bakedmodel, ItemCameraTransforms.TransformType transform, boolean leftHanded)
{
    if (stack.getItem() != null)
    {
        this.textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        this.textureManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.enableRescaleNormal();
        GlStateManager.alphaFunc(516, 0.1F);
        GlStateManager.enableBlend();
        GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        GlStateManager.pushMatrix();
        // TODO: check if negative scale is a thing
        bakedmodel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(bakedmodel, transform, leftHanded);

        this.renderItem(stack, bakedmodel);
        GlStateManager.cullFace(GlStateManager.CullFace.BACK);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
        GlStateManager.disableBlend();
        this.textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        this.textureManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:25,代码来源:RenderItem.java

示例2: renderItemModelTransform

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
protected void renderItemModelTransform(ItemStack stack, IBakedModel model, ItemCameraTransforms.TransformType cameraTransformType)
{
    this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
    this.textureManager.getTexture(TextureMap.locationBlocksTexture).setBlurMipmap(false, false);
    this.preTransform(stack);
    GlStateManager.enableRescaleNormal();
    GlStateManager.alphaFunc(516, 0.1F);
    GlStateManager.enableBlend();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    GlStateManager.pushMatrix();
    ItemCameraTransforms itemcameratransforms = model.getItemCameraTransforms();
    itemcameratransforms.applyTransform(cameraTransformType);

    if (this.func_183005_a(itemcameratransforms.getTransform(cameraTransformType)))
    {
        GlStateManager.cullFace(1028);
    }

    this.renderItem(stack, model);
    GlStateManager.cullFace(1029);
    GlStateManager.popMatrix();
    GlStateManager.disableRescaleNormal();
    GlStateManager.disableBlend();
    this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
    this.textureManager.getTexture(TextureMap.locationBlocksTexture).restoreLastBlurMipmap();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:27,代码来源:RenderItem.java

示例3: BakedAxeModel

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
public BakedAxeModel(AxeModel parent, ImmutableList<BakedQuad> quads, VertexFormat format,
		ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> transforms,
		Map<String, IBakedModel> cache) {
	this.quads = quads;
	this.format = format;
	this.parent = parent;
	this.transforms = itemTransforms();
	this.cache = cache;
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:10,代码来源:AxeModel.java

示例4: BakedToolHeadModel

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
public BakedToolHeadModel(ToolHeadModel parent, ImmutableList<BakedQuad> quads, VertexFormat format,
		ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> transforms,
		Map<String, IBakedModel> cache) {
	this.quads = quads;
	this.format = format;
	this.parent = parent;
	this.transforms = itemTransforms();
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:9,代码来源:ToolHeadModel.java

示例5: renderItem

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
public void renderItem(ItemStack stack, ItemCameraTransforms.TransformType cameraTransformType)
{
    if (stack != null)
    {
        IBakedModel ibakedmodel = this.getItemModelWithOverrides(stack, (World)null, (EntityLivingBase)null);
        this.renderItemModel(stack, ibakedmodel, cameraTransformType, false);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:9,代码来源:RenderItem.java

示例6: func_181564_a

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
public void func_181564_a(ItemStack p_181564_1_, ItemCameraTransforms.TransformType p_181564_2_)
{
    if (p_181564_1_ != null)
    {
        IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(p_181564_1_);
        this.renderItemModelTransform(p_181564_1_, ibakedmodel, p_181564_2_);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:9,代码来源:RenderItem.java

示例7: renderItem

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
public void renderItem(EntityLivingBase entityIn, ItemStack heldStack, ItemCameraTransforms.TransformType transform)
{
    if (heldStack != null)
    {
        Item item = heldStack.getItem();
        Block block = Block.getBlockFromItem(item);
        GlStateManager.pushMatrix();

        if (this.itemRenderer.shouldRenderItemIn3D(heldStack))
        {
            GlStateManager.scale(2.0F, 2.0F, 2.0F);

            if (this.isBlockTranslucent(block))
            {
                GlStateManager.depthMask(false);
            }
        }

        this.itemRenderer.renderItemModelForEntity(heldStack, entityIn, transform);

        if (this.isBlockTranslucent(block))
        {
            GlStateManager.depthMask(true);
        }

        GlStateManager.popMatrix();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:29,代码来源:ItemRenderer.java

示例8: handleCameraTransforms

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public static IBakedModel handleCameraTransforms(IBakedModel model, ItemCameraTransforms.TransformType cameraTransformType, boolean leftHandHackery)
{
    if(model instanceof IPerspectiveAwareModel)
    {
        Pair<? extends IBakedModel, Matrix4f> pair = ((IPerspectiveAwareModel)model).handlePerspective(cameraTransformType);

        if(pair.getRight() != null)
        {
            Matrix4f matrix = new Matrix4f(pair.getRight());
            if(leftHandHackery)
            {
                matrix.mul(flipX, matrix);
                matrix.mul(matrix, flipX);
            }
            multiplyCurrentGlMatrix(matrix);
        }
        return pair.getLeft();
    }
    else
    {
        //if(leftHandHackery) GlStateManager.scale(-1, 1, 1);
        ItemCameraTransforms.applyTransformSide(model.getItemCameraTransforms().getTransform(cameraTransformType), leftHandHackery);
        //if(leftHandHackery) GlStateManager.scale(-1, 1, 1);
    }
    return model;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:28,代码来源:ForgeHooksClient.java

示例9: handlePerspective

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType)
{
    switch (cameraTransformType)
    {
        case GUI:
            return Pair.of(this, mat_gui);
    }
    return Pair.of(this, mat);
}
 
开发者ID:PearXTeam,项目名称:PurificatiMagicae,代码行数:11,代码来源:StandardModels.java

示例10: handlePerspective

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType, Pair<? extends IBakedModel, Matrix4f> pair)
{
    return pair;
}
 
开发者ID:iChun,项目名称:Torched,代码行数:6,代码来源:ItemRenderTorchLauncher.java

示例11: BakedMaceModel

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
public BakedMaceModel(MaceModel parent, ImmutableList<BakedQuad> quads, VertexFormat format,
		ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> transforms,
		Map<String, IBakedModel> cache) {
	super(parent, quads, format, transforms, cache);
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:6,代码来源:MaceModel.java

示例12: handlePerspective

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) {
	return MapWrapper.handlePerspective(this, DankNullDockTransforms.block().getTransforms(), cameraTransformType);
}
 
开发者ID:p455w0rd,项目名称:DankNull,代码行数:5,代码来源:TESRDankNullDock.java

示例13: handlePerspective

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) {
	isGUI = cameraTransformType == TransformType.GUI;
	return MapWrapper.handlePerspective(this, TransformUtils.DEFAULT_BLOCK.getTransforms(), cameraTransformType);
}
 
开发者ID:p455w0rd,项目名称:DankNull,代码行数:6,代码来源:DankNullRenderer.java

示例14: BakedDaggerModel

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
public BakedDaggerModel(DaggerModel parent, ImmutableList<BakedQuad> quads, VertexFormat format,
		ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> transforms,
		Map<String, IBakedModel> cache) {
	super(parent, quads, format, transforms, cache);
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:6,代码来源:DaggerModel.java

示例15: BakedShovelModel

import net.minecraft.client.renderer.block.model.ItemCameraTransforms; //导入方法依赖的package包/类
public BakedShovelModel(ShovelModel parent, ImmutableList<BakedQuad> quads, VertexFormat format,
		ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> transforms,
		Map<String, IBakedModel> cache) {
	super(parent, quads, format, transforms, cache);
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:6,代码来源:ShovelModel.java


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