當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。