本文整理汇总了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();
}
}
示例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();
}
示例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;
}
示例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();
}
示例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);
}
}
示例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_);
}
}
示例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();
}
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}