本文整理汇总了Java中net.minecraft.client.renderer.block.model.IBakedModel.isGui3d方法的典型用法代码示例。如果您正苦于以下问题:Java IBakedModel.isGui3d方法的具体用法?Java IBakedModel.isGui3d怎么用?Java IBakedModel.isGui3d使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.block.model.IBakedModel
的用法示例。
在下文中一共展示了IBakedModel.isGui3d方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: duplicateModel
import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
public static IBakedModel duplicateModel(IBakedModel p_duplicateModel_0_)
{
List list = duplicateQuadList(p_duplicateModel_0_.getQuads((IBlockState)null, (EnumFacing)null, 0L));
EnumFacing[] aenumfacing = EnumFacing.VALUES;
Map<EnumFacing, List<BakedQuad>> map = new HashMap();
for (int i = 0; i < aenumfacing.length; ++i)
{
EnumFacing enumfacing = aenumfacing[i];
List list1 = p_duplicateModel_0_.getQuads((IBlockState)null, enumfacing, 0L);
List list2 = duplicateQuadList(list1);
map.put(enumfacing, list2);
}
SimpleBakedModel simplebakedmodel = new SimpleBakedModel(list, map, p_duplicateModel_0_.isAmbientOcclusion(), p_duplicateModel_0_.isGui3d(), p_duplicateModel_0_.getParticleTexture(), p_duplicateModel_0_.getItemCameraTransforms(), p_duplicateModel_0_.getOverrides());
return simplebakedmodel;
}
示例2: getCustomItemModel
import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
public static IBakedModel getCustomItemModel(ItemStack p_getCustomItemModel_0_, IBakedModel p_getCustomItemModel_1_, ResourceLocation p_getCustomItemModel_2_)
{
if (p_getCustomItemModel_1_.isGui3d())
{
return p_getCustomItemModel_1_;
}
else if (itemProperties == null)
{
return p_getCustomItemModel_1_;
}
else
{
CustomItemProperties customitemproperties = getCustomItemProperties(p_getCustomItemModel_0_, 1);
return customitemproperties == null ? p_getCustomItemModel_1_ : customitemproperties.getModel(p_getCustomItemModel_2_);
}
}
示例3: renderItemModelIntoGUI
import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
private static void renderItemModelIntoGUI(ItemStack stack, double x, double y, IBakedModel bakedmodel, double scale)
{
GlStateManager.pushMatrix();
MC.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
MC.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false);
GlStateManager.enableRescaleNormal();
GlStateManager.enableAlpha();
GlStateManager.alphaFunc(516, 0.1F);
GlStateManager.enableBlend();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.translate(x, y, 100.0F + MC.getRenderItem().zLevel);
GlStateManager.translate(8.0F, 8.0F, 0.0F);
GlStateManager.scale(1.0F, -1.0F, 1.0F);
GlStateManager.scale(scale, scale, scale);
if (bakedmodel.isGui3d())
GlStateManager.enableLighting();
else
GlStateManager.disableLighting();
bakedmodel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(bakedmodel, ItemCameraTransforms.TransformType.GUI, false);
MC.getRenderItem().renderItem(stack, bakedmodel);
GlStateManager.disableAlpha();
GlStateManager.disableRescaleNormal();
GlStateManager.disableLighting();
GlStateManager.popMatrix();
MC.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
MC.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
}
示例4: preTransform
import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
private static void preTransform(RenderItem renderItem, ItemStack stack) {
IBakedModel ibakedmodel = renderItem.getItemModelMesher().getItemModel(stack);
Item item = stack.getItem();
if (item != null) {
boolean flag = ibakedmodel.isGui3d();
if (!flag) {
GlStateManager.scale(2.0F, 2.0F, 2.0F);
}
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
}
}
示例5: transformModelCount
import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
private int transformModelCount(EntityItem itemIn, double p_177077_2_, double p_177077_4_, double p_177077_6_, float p_177077_8_, IBakedModel p_177077_9_)
{
ItemStack itemstack = itemIn.getEntityItem();
Item item = itemstack.getItem();
if (item == null)
{
return 0;
}
else
{
boolean flag = p_177077_9_.isGui3d();
int i = this.getModelCount(itemstack);
float f = 0.25F;
float f1 = MathHelper.sin(((float)itemIn.getAge() + p_177077_8_) / 10.0F + itemIn.hoverStart) * 0.1F + 0.1F;
float f2 = p_177077_9_.getItemCameraTransforms().getTransform(ItemCameraTransforms.TransformType.GROUND).scale.y;
GlStateManager.translate((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F * f2, (float)p_177077_6_);
if (flag || this.renderManager.options != null)
{
float f3 = (((float)itemIn.getAge() + p_177077_8_) / 20.0F + itemIn.hoverStart) * (180F / (float)Math.PI);
GlStateManager.rotate(f3, 0.0F, 1.0F, 0.0F);
}
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
return i;
}
}
示例6: transformModelCount
import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
private int transformModelCount(EntityItem itemIn, double p_177077_2_, double p_177077_4_, double p_177077_6_, float p_177077_8_, IBakedModel p_177077_9_)
{
ItemStack itemstack = itemIn.getEntityItem();
Item item = itemstack.getItem();
if (item == null)
{
return 0;
}
else
{
boolean flag = p_177077_9_.isGui3d();
int i = this.getModelCount(itemstack);
float f = 0.25F;
float f1 = shouldBob() ? MathHelper.sin(((float)itemIn.getAge() + p_177077_8_) / 10.0F + itemIn.hoverStart) * 0.1F + 0.1F : 0;
float f2 = p_177077_9_.getItemCameraTransforms().getTransform(ItemCameraTransforms.TransformType.GROUND).scale.y;
GlStateManager.translate((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F * f2, (float)p_177077_6_);
if (flag || this.renderManager.options != null)
{
float f3 = (((float)itemIn.getAge() + p_177077_8_) / 20.0F + itemIn.hoverStart) * (180F / (float)Math.PI);
GlStateManager.rotate(f3, 0.0F, 1.0F, 0.0F);
}
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
return i;
}
}
示例7: renderItemIntoGUI
import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public static void renderItemIntoGUI(ItemStack stack, int x, int y, int gl) {
GlStateManager.pushMatrix();
RenderHelper.enableGUIStandardItemLighting();
RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false);
GlStateManager.enableRescaleNormal();
GlStateManager.enableAlpha();
GlStateManager.alphaFunc(516, 0.1F);
GlStateManager.enableBlend();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
IBakedModel bakedmodel = renderItem.getItemModelWithOverrides(stack, null, null);
GlStateManager.translate((float) x, (float) y, 100.0F + renderItem.zLevel);
GlStateManager.translate(8.0F, 8.0F, 0.0F);
GlStateManager.scale(1.0F, -1.0F, 1.0F);
GlStateManager.scale(16.0F, 16.0F, 16.0F);
if (bakedmodel.isGui3d()) {
GlStateManager.enableLighting();
} else {
GlStateManager.disableLighting();
}
bakedmodel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(bakedmodel, ItemCameraTransforms.TransformType.GUI, false);
if (!stack.isEmpty()) {
GlStateManager.pushMatrix();
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
if (bakedmodel.isBuiltInRenderer()) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.enableRescaleNormal();
TileEntityItemStackRenderer.instance.renderByItem(stack);
} else {
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder vertexbuffer = tessellator.getBuffer();
vertexbuffer.begin(gl, DefaultVertexFormats.ITEM);
for (EnumFacing enumfacing : EnumFacing.values()) {
renderQuads(vertexbuffer, bakedmodel.getQuads(null, enumfacing, 0L), -1, stack);
}
renderQuads(vertexbuffer, bakedmodel.getQuads(null, null, 0L), -1, stack);
tessellator.draw();
}
GlStateManager.popMatrix();
}
GlStateManager.disableAlpha();
GlStateManager.disableRescaleNormal();
GlStateManager.disableLighting();
GlStateManager.popMatrix();
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
}
示例8: shouldRenderItemIn3D
import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
public boolean shouldRenderItemIn3D(ItemStack stack)
{
IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(stack);
return ibakedmodel == null ? false : ibakedmodel.isGui3d();
}