本文整理汇总了Java中net.minecraft.client.renderer.block.model.BakedQuad.getFace方法的典型用法代码示例。如果您正苦于以下问题:Java BakedQuad.getFace方法的具体用法?Java BakedQuad.getFace怎么用?Java BakedQuad.getFace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.block.model.BakedQuad
的用法示例。
在下文中一共展示了BakedQuad.getFace方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeQuad
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private BakedQuad makeQuad(BakedQuad p_makeQuad_1_, int p_makeQuad_2_, boolean p_makeQuad_3_)
{
int[] aint = p_makeQuad_1_.getVertexData();
int i = p_makeQuad_1_.getTintIndex();
EnumFacing enumfacing = p_makeQuad_1_.getFace();
TextureAtlasSprite textureatlassprite = p_makeQuad_1_.getSprite();
if (!this.isFullSprite(p_makeQuad_1_))
{
return p_makeQuad_1_;
}
else
{
aint = this.transformVertexData(aint, p_makeQuad_2_, p_makeQuad_3_);
BakedQuad bakedquad = new BakedQuad(aint, i, enumfacing, textureatlassprite);
return bakedquad;
}
}
示例2: makeQuad
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private BakedQuad makeQuad(BakedQuad p_makeQuad_1_, int p_makeQuad_2_, boolean p_makeQuad_3_)
{
int[] aint = p_makeQuad_1_.getVertexData();
int i = p_makeQuad_1_.getTintIndex();
EnumFacing enumfacing = p_makeQuad_1_.getFace();
TextureAtlasSprite textureatlassprite = p_makeQuad_1_.getSprite();
if (!this.isFullSprite(p_makeQuad_1_))
{
p_makeQuad_2_ = 0;
}
aint = this.transformVertexData(aint, p_makeQuad_2_, p_makeQuad_3_);
BakedQuad bakedquad = new BakedQuad(aint, i, enumfacing, textureatlassprite);
return bakedquad;
}
示例3: getConnectedTexture
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
public static synchronized BakedQuad[] getConnectedTexture(IBlockAccess p_getConnectedTexture_0_, IBlockState p_getConnectedTexture_1_, BlockPos p_getConnectedTexture_2_, BakedQuad p_getConnectedTexture_3_, RenderEnv p_getConnectedTexture_4_)
{
TextureAtlasSprite textureatlassprite = p_getConnectedTexture_3_.getSprite();
if (textureatlassprite == null)
{
return p_getConnectedTexture_4_.getArrayQuadsCtm(p_getConnectedTexture_3_);
}
else
{
Block block = p_getConnectedTexture_1_.getBlock();
if (skipConnectedTexture(p_getConnectedTexture_0_, p_getConnectedTexture_1_, p_getConnectedTexture_2_, p_getConnectedTexture_3_, p_getConnectedTexture_4_))
{
p_getConnectedTexture_3_ = getQuad(emptySprite, p_getConnectedTexture_3_);
return p_getConnectedTexture_4_.getArrayQuadsCtm(p_getConnectedTexture_3_);
}
else
{
EnumFacing enumfacing = p_getConnectedTexture_3_.getFace();
BakedQuad[] abakedquad = getConnectedTextureMultiPass(p_getConnectedTexture_0_, p_getConnectedTexture_1_, p_getConnectedTexture_2_, enumfacing, p_getConnectedTexture_3_, p_getConnectedTexture_4_);
return abakedquad;
}
}
}
示例4: BakedItemModel
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
public BakedItemModel(ImmutableList<BakedQuad> quads, TextureAtlasSprite particle, ImmutableMap<TransformType, TRSRTransformation> transforms, ItemOverrideList overrides, IBakedModel otherModel)
{
this.quads = quads;
this.particle = particle;
this.transforms = transforms;
this.overrides = overrides;
if(otherModel != null)
{
this.otherModel = otherModel;
this.isCulled = true;
}
else
{
ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
for(BakedQuad quad : quads)
{
if(quad.getFace() == EnumFacing.SOUTH)
{
builder.add(quad);
}
}
this.otherModel = new BakedItemModel(builder.build(), particle, transforms, overrides, this);
isCulled = false;
}
}
示例5: getConnectedTexture
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
public static synchronized BakedQuad getConnectedTexture(IBlockAccess p_getConnectedTexture_0_, IBlockState p_getConnectedTexture_1_, BlockPos p_getConnectedTexture_2_, BakedQuad p_getConnectedTexture_3_, RenderEnv p_getConnectedTexture_4_)
{
TextureAtlasSprite textureatlassprite = p_getConnectedTexture_3_.getSprite();
if (textureatlassprite == null)
{
return p_getConnectedTexture_3_;
}
else
{
Block block = p_getConnectedTexture_1_.getBlock();
EnumFacing enumfacing = p_getConnectedTexture_3_.getFace();
if (block instanceof BlockPane && textureatlassprite.getIconName().startsWith("minecraft:blocks/glass_pane_top"))
{
IBlockState iblockstate = p_getConnectedTexture_0_.getBlockState(p_getConnectedTexture_2_.offset(p_getConnectedTexture_3_.getFace()));
if (iblockstate == p_getConnectedTexture_1_)
{
return getQuad(emptySprite, block, p_getConnectedTexture_1_, p_getConnectedTexture_3_);
}
}
TextureAtlasSprite textureatlassprite1 = getConnectedTextureMultiPass(p_getConnectedTexture_0_, p_getConnectedTexture_1_, p_getConnectedTexture_2_, enumfacing, textureatlassprite, p_getConnectedTexture_4_);
return textureatlassprite1 == textureatlassprite ? p_getConnectedTexture_3_ : getQuad(textureatlassprite1, block, p_getConnectedTexture_1_, p_getConnectedTexture_3_);
}
}
示例6: makeSpriteQuad
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private static BakedQuad makeSpriteQuad(BakedQuad p_makeSpriteQuad_0_, TextureAtlasSprite p_makeSpriteQuad_1_)
{
int[] aint = (int[])p_makeSpriteQuad_0_.getVertexData().clone();
TextureAtlasSprite textureatlassprite = p_makeSpriteQuad_0_.getSprite();
for (int i = 0; i < 4; ++i)
{
fixVertex(aint, i, textureatlassprite, p_makeSpriteQuad_1_);
}
BakedQuad bakedquad = new BakedQuad(aint, p_makeSpriteQuad_0_.getTintIndex(), p_makeSpriteQuad_0_.getFace(), p_makeSpriteQuad_1_);
return bakedquad;
}
示例7: getNeighbourIcon
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private static TextureAtlasSprite getNeighbourIcon(IBlockAccess p_getNeighbourIcon_0_, BlockPos p_getNeighbourIcon_1_, IBlockState p_getNeighbourIcon_2_, int p_getNeighbourIcon_3_)
{
p_getNeighbourIcon_2_ = p_getNeighbourIcon_2_.getBlock().getActualState(p_getNeighbourIcon_2_, p_getNeighbourIcon_0_, p_getNeighbourIcon_1_);
IBakedModel ibakedmodel = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelForState(p_getNeighbourIcon_2_);
if (ibakedmodel == null)
{
return null;
}
else
{
EnumFacing enumfacing = getFacing(p_getNeighbourIcon_3_);
List list = ibakedmodel.getFaceQuads(enumfacing);
if (list.size() > 0)
{
BakedQuad bakedquad1 = (BakedQuad)list.get(0);
return bakedquad1.getSprite();
}
else
{
List list1 = ibakedmodel.getGeneralQuads();
for (int i = 0; i < list1.size(); ++i)
{
BakedQuad bakedquad = (BakedQuad)list1.get(i);
if (bakedquad.getFace() == enumfacing)
{
return bakedquad.getSprite();
}
}
return null;
}
}
}
示例8: makeQuad
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private BakedQuad makeQuad(BakedQuad p_makeQuad_1_, int p_makeQuad_2_, boolean p_makeQuad_3_)
{
int[] aint = p_makeQuad_1_.getVertexData();
int i = p_makeQuad_1_.getTintIndex();
EnumFacing enumfacing = p_makeQuad_1_.getFace();
TextureAtlasSprite textureatlassprite = p_makeQuad_1_.getSprite();
aint = this.fixVertexData(aint, p_makeQuad_2_, p_makeQuad_3_);
BakedQuad bakedquad = new BakedQuad(aint, i, enumfacing, textureatlassprite);
return bakedquad;
}
示例9: makeSpriteQuadCompact
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private static BakedQuad makeSpriteQuadCompact(BakedQuad p_makeSpriteQuadCompact_0_, TextureAtlasSprite p_makeSpriteQuadCompact_1_, int p_makeSpriteQuadCompact_2_, int p_makeSpriteQuadCompact_3_, int p_makeSpriteQuadCompact_4_, int p_makeSpriteQuadCompact_5_, int p_makeSpriteQuadCompact_6_)
{
int[] aint = (int[])p_makeSpriteQuadCompact_0_.getVertexData().clone();
TextureAtlasSprite textureatlassprite = p_makeSpriteQuadCompact_0_.getSprite();
for (int i = 0; i < 4; ++i)
{
fixVertexCompact(aint, i, textureatlassprite, p_makeSpriteQuadCompact_1_, p_makeSpriteQuadCompact_2_, p_makeSpriteQuadCompact_3_, p_makeSpriteQuadCompact_4_, p_makeSpriteQuadCompact_5_, p_makeSpriteQuadCompact_6_);
}
BakedQuad bakedquad = new BakedQuad(aint, p_makeSpriteQuadCompact_0_.getTintIndex(), p_makeSpriteQuadCompact_0_.getFace(), p_makeSpriteQuadCompact_1_);
return bakedquad;
}
示例10: duplicateQuad
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
public static BakedQuad duplicateQuad(BakedQuad p_duplicateQuad_0_)
{
BakedQuad bakedquad = new BakedQuad((int[])p_duplicateQuad_0_.getVertexData().clone(), p_duplicateQuad_0_.getTintIndex(), p_duplicateQuad_0_.getFace(), p_duplicateQuad_0_.getSprite());
return bakedquad;
}
示例11: getModelDoubleFace
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private static IBakedModel getModelDoubleFace(IBakedModel p_getModelDoubleFace_0_)
{
if (p_getModelDoubleFace_0_ == null)
{
return null;
}
else if (p_getModelDoubleFace_0_.getGeneralQuads().size() > 0)
{
Config.warn("SmartLeaves: Model is not cube, general quads: " + p_getModelDoubleFace_0_.getGeneralQuads().size() + ", model: " + p_getModelDoubleFace_0_);
return p_getModelDoubleFace_0_;
}
else
{
EnumFacing[] aenumfacing = EnumFacing.VALUES;
for (int i = 0; i < aenumfacing.length; ++i)
{
EnumFacing enumfacing = aenumfacing[i];
List<BakedQuad> list = p_getModelDoubleFace_0_.getFaceQuads(enumfacing);
if (list.size() != 1)
{
Config.warn("SmartLeaves: Model is not cube, side: " + enumfacing + ", quads: " + list.size() + ", model: " + p_getModelDoubleFace_0_);
return p_getModelDoubleFace_0_;
}
}
IBakedModel ibakedmodel = ModelUtils.duplicateModel(p_getModelDoubleFace_0_);
List[] alist = new List[aenumfacing.length];
for (int k = 0; k < aenumfacing.length; ++k)
{
EnumFacing enumfacing1 = aenumfacing[k];
List<BakedQuad> list1 = ibakedmodel.getFaceQuads(enumfacing1);
BakedQuad bakedquad = (BakedQuad)list1.get(0);
BakedQuad bakedquad1 = new BakedQuad((int[])bakedquad.getVertexData().clone(), bakedquad.getTintIndex(), bakedquad.getFace(), bakedquad.getSprite());
int[] aint = bakedquad1.getVertexData();
int[] aint1 = (int[])aint.clone();
int j = aint.length / 4;
System.arraycopy(aint, 0 * j, aint1, 3 * j, j);
System.arraycopy(aint, 1 * j, aint1, 2 * j, j);
System.arraycopy(aint, 2 * j, aint1, 1 * j, j);
System.arraycopy(aint, 3 * j, aint1, 0 * j, j);
System.arraycopy(aint1, 0, aint, 0, aint1.length);
list1.add(bakedquad1);
}
return ibakedmodel;
}
}
示例12: skipConnectedTexture
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private static boolean skipConnectedTexture(IBlockAccess p_skipConnectedTexture_0_, IBlockState p_skipConnectedTexture_1_, BlockPos p_skipConnectedTexture_2_, BakedQuad p_skipConnectedTexture_3_, RenderEnv p_skipConnectedTexture_4_)
{
Block block = p_skipConnectedTexture_1_.getBlock();
if (block instanceof BlockPane)
{
EnumFacing enumfacing = p_skipConnectedTexture_3_.getFace();
if (enumfacing != EnumFacing.UP && enumfacing != EnumFacing.DOWN)
{
return false;
}
if (!p_skipConnectedTexture_3_.isFaceQuad())
{
return false;
}
BlockPos blockpos = p_skipConnectedTexture_2_.offset(p_skipConnectedTexture_3_.getFace());
IBlockState iblockstate = p_skipConnectedTexture_0_.getBlockState(blockpos);
if (iblockstate.getBlock() != block)
{
return false;
}
if (block == Blocks.STAINED_GLASS_PANE && iblockstate.getValue(BlockStainedGlassPane.COLOR) != p_skipConnectedTexture_1_.getValue(BlockStainedGlassPane.COLOR))
{
return false;
}
iblockstate = iblockstate.getActualState(p_skipConnectedTexture_0_, blockpos);
double d0 = (double)p_skipConnectedTexture_3_.getMidX();
if (d0 < 0.4D)
{
if (((Boolean)iblockstate.getValue(BlockPane.WEST)).booleanValue())
{
return true;
}
}
else if (d0 > 0.6D)
{
if (((Boolean)iblockstate.getValue(BlockPane.EAST)).booleanValue())
{
return true;
}
}
else
{
double d1 = p_skipConnectedTexture_3_.getMidZ();
if (d1 < 0.4D)
{
if (((Boolean)iblockstate.getValue(BlockPane.NORTH)).booleanValue())
{
return true;
}
}
else
{
if (d1 <= 0.6D)
{
return true;
}
if (((Boolean)iblockstate.getValue(BlockPane.SOUTH)).booleanValue())
{
return true;
}
}
}
}
return false;
}
示例13: getNeighbourIcon
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private static TextureAtlasSprite getNeighbourIcon(IBlockAccess p_getNeighbourIcon_0_, IBlockState p_getNeighbourIcon_1_, BlockPos p_getNeighbourIcon_2_, IBlockState p_getNeighbourIcon_3_, int p_getNeighbourIcon_4_)
{
p_getNeighbourIcon_3_ = p_getNeighbourIcon_3_.getBlock().getActualState(p_getNeighbourIcon_3_, p_getNeighbourIcon_0_, p_getNeighbourIcon_2_);
IBakedModel ibakedmodel = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelForState(p_getNeighbourIcon_3_);
if (ibakedmodel == null)
{
return null;
}
else
{
EnumFacing enumfacing = getFacing(p_getNeighbourIcon_4_);
List list = ibakedmodel.getQuads(p_getNeighbourIcon_3_, enumfacing, 0L);
if (Config.isBetterGrass())
{
list = BetterGrass.getFaceQuads(p_getNeighbourIcon_0_, p_getNeighbourIcon_3_, p_getNeighbourIcon_2_, enumfacing, list);
}
if (list.size() > 0)
{
BakedQuad bakedquad1 = (BakedQuad)list.get(0);
return bakedquad1.getSprite();
}
else
{
List list1 = ibakedmodel.getQuads(p_getNeighbourIcon_3_, (EnumFacing)null, 0L);
for (int i = 0; i < list1.size(); ++i)
{
BakedQuad bakedquad = (BakedQuad)list1.get(i);
if (bakedquad.getFace() == enumfacing)
{
return bakedquad.getSprite();
}
}
return null;
}
}
}
示例14: getModelDoubleFace
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private static IBakedModel getModelDoubleFace(IBakedModel p_getModelDoubleFace_0_)
{
if (p_getModelDoubleFace_0_ == null)
{
return null;
}
else if (p_getModelDoubleFace_0_.getQuads((IBlockState)null, (EnumFacing)null, 0L).size() > 0)
{
Config.warn("SmartLeaves: Model is not cube, general quads: " + p_getModelDoubleFace_0_.getQuads((IBlockState)null, (EnumFacing)null, 0L).size() + ", model: " + p_getModelDoubleFace_0_);
return p_getModelDoubleFace_0_;
}
else
{
EnumFacing[] aenumfacing = EnumFacing.VALUES;
for (int i = 0; i < aenumfacing.length; ++i)
{
EnumFacing enumfacing = aenumfacing[i];
List<BakedQuad> list = p_getModelDoubleFace_0_.getQuads((IBlockState)null, enumfacing, 0L);
if (list.size() != 1)
{
Config.warn("SmartLeaves: Model is not cube, side: " + enumfacing + ", quads: " + list.size() + ", model: " + p_getModelDoubleFace_0_);
return p_getModelDoubleFace_0_;
}
}
IBakedModel ibakedmodel = ModelUtils.duplicateModel(p_getModelDoubleFace_0_);
List[] alist = new List[aenumfacing.length];
for (int k = 0; k < aenumfacing.length; ++k)
{
EnumFacing enumfacing1 = aenumfacing[k];
List<BakedQuad> list1 = ibakedmodel.getQuads((IBlockState)null, enumfacing1, 0L);
BakedQuad bakedquad = (BakedQuad)list1.get(0);
BakedQuad bakedquad1 = new BakedQuad((int[])bakedquad.getVertexData().clone(), bakedquad.getTintIndex(), bakedquad.getFace(), bakedquad.getSprite());
int[] aint = bakedquad1.getVertexData();
int[] aint1 = (int[])aint.clone();
int j = aint.length / 4;
System.arraycopy(aint, 0 * j, aint1, 3 * j, j);
System.arraycopy(aint, 1 * j, aint1, 2 * j, j);
System.arraycopy(aint, 2 * j, aint1, 1 * j, j);
System.arraycopy(aint, 3 * j, aint1, 0 * j, j);
System.arraycopy(aint1, 0, aint, 0, aint1.length);
list1.add(bakedquad1);
}
return ibakedmodel;
}
}