本文整理汇总了Java中net.minecraft.client.renderer.block.model.BakedQuad.getSprite方法的典型用法代码示例。如果您正苦于以下问题:Java BakedQuad.getSprite方法的具体用法?Java BakedQuad.getSprite怎么用?Java BakedQuad.getSprite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.block.model.BakedQuad
的用法示例。
在下文中一共展示了BakedQuad.getSprite方法的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: replaceTexture
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private static void replaceTexture(List<BakedQuad> p_replaceTexture_0_, TextureAtlasSprite p_replaceTexture_1_, TextureAtlasSprite p_replaceTexture_2_)
{
List<BakedQuad> list = new ArrayList();
for (BakedQuad bakedquad : p_replaceTexture_0_)
{
if (bakedquad.getSprite() != p_replaceTexture_1_)
{
list.add(bakedquad);
break;
}
BakedQuad bakedquad1 = new BakedQuadRetextured(bakedquad, p_replaceTexture_2_);
list.add(bakedquad1);
}
p_replaceTexture_0_.clear();
p_replaceTexture_0_.addAll(list);
}
示例4: 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;
}
}
}
示例5: isFullSprite
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private boolean isFullSprite(BakedQuad p_isFullSprite_1_)
{
TextureAtlasSprite textureatlassprite = p_isFullSprite_1_.getSprite();
float f = textureatlassprite.getMinU();
float f1 = textureatlassprite.getMaxU();
float f2 = f1 - f;
float f3 = f2 / 256.0F;
float f4 = textureatlassprite.getMinV();
float f5 = textureatlassprite.getMaxV();
float f6 = f5 - f4;
float f7 = f6 / 256.0F;
int[] aint = p_isFullSprite_1_.getVertexData();
int i = aint.length / 4;
for (int j = 0; j < 4; ++j)
{
int k = j * i;
float f8 = Float.intBitsToFloat(aint[k + 4]);
float f9 = Float.intBitsToFloat(aint[k + 4 + 1]);
if (!this.equalsDelta(f8, f, f3) && !this.equalsDelta(f8, f1, f3))
{
return false;
}
if (!this.equalsDelta(f9, f4, f7) && !this.equalsDelta(f9, f5, f7))
{
return false;
}
}
return true;
}
示例6: 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_);
}
}
示例7: 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;
}
示例8: 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;
}
}
}
示例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: getNaturalTexture
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
public static BakedQuad getNaturalTexture(BlockPos p_getNaturalTexture_0_, BakedQuad p_getNaturalTexture_1_)
{
TextureAtlasSprite textureatlassprite = p_getNaturalTexture_1_.getSprite();
if (textureatlassprite == null)
{
return p_getNaturalTexture_1_;
}
else
{
NaturalProperties naturalproperties = getNaturalProperties(textureatlassprite);
if (naturalproperties == null)
{
return p_getNaturalTexture_1_;
}
else
{
int i = ConnectedTextures.getSide(p_getNaturalTexture_1_.getFace());
int j = Config.getRandom(p_getNaturalTexture_0_, i);
int k = 0;
boolean flag = false;
if (naturalproperties.rotation > 1)
{
k = j & 3;
}
if (naturalproperties.rotation == 2)
{
k = k / 2 * 2;
}
if (naturalproperties.flip)
{
flag = (j & 4) != 0;
}
return naturalproperties.getQuad(p_getNaturalTexture_1_, k, flag);
}
}
}
示例12: 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;
}
}
示例13: getConnectedTextureSingle
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
public static BakedQuad[] getConnectedTextureSingle(IBlockAccess p_getConnectedTextureSingle_0_, IBlockState p_getConnectedTextureSingle_1_, BlockPos p_getConnectedTextureSingle_2_, EnumFacing p_getConnectedTextureSingle_3_, BakedQuad p_getConnectedTextureSingle_4_, boolean p_getConnectedTextureSingle_5_, int p_getConnectedTextureSingle_6_, RenderEnv p_getConnectedTextureSingle_7_)
{
Block block = p_getConnectedTextureSingle_1_.getBlock();
if (!(p_getConnectedTextureSingle_1_ instanceof BlockStateBase))
{
return p_getConnectedTextureSingle_7_.getArrayQuadsCtm(p_getConnectedTextureSingle_4_);
}
else
{
BlockStateBase blockstatebase = (BlockStateBase)p_getConnectedTextureSingle_1_;
TextureAtlasSprite textureatlassprite = p_getConnectedTextureSingle_4_.getSprite();
if (tileProperties != null)
{
int i = textureatlassprite.getIndexInMap();
if (i >= 0 && i < tileProperties.length)
{
ConnectedProperties[] aconnectedproperties = tileProperties[i];
if (aconnectedproperties != null)
{
int j = getSide(p_getConnectedTextureSingle_3_);
for (int k = 0; k < aconnectedproperties.length; ++k)
{
ConnectedProperties connectedproperties = aconnectedproperties[k];
if (connectedproperties != null && connectedproperties.matchesBlockId(blockstatebase.getBlockId()))
{
BakedQuad[] abakedquad = getConnectedTexture(connectedproperties, p_getConnectedTextureSingle_0_, blockstatebase, p_getConnectedTextureSingle_2_, j, p_getConnectedTextureSingle_4_, p_getConnectedTextureSingle_6_, p_getConnectedTextureSingle_7_);
if (abakedquad != null)
{
return abakedquad;
}
}
}
}
}
}
if (blockProperties != null && p_getConnectedTextureSingle_5_)
{
int l = p_getConnectedTextureSingle_7_.getBlockId();
if (l >= 0 && l < blockProperties.length)
{
ConnectedProperties[] aconnectedproperties1 = blockProperties[l];
if (aconnectedproperties1 != null)
{
int i1 = getSide(p_getConnectedTextureSingle_3_);
for (int j1 = 0; j1 < aconnectedproperties1.length; ++j1)
{
ConnectedProperties connectedproperties1 = aconnectedproperties1[j1];
if (connectedproperties1 != null && connectedproperties1.matchesIcon(textureatlassprite))
{
BakedQuad[] abakedquad1 = getConnectedTexture(connectedproperties1, p_getConnectedTextureSingle_0_, blockstatebase, p_getConnectedTextureSingle_2_, i1, p_getConnectedTextureSingle_4_, p_getConnectedTextureSingle_6_, p_getConnectedTextureSingle_7_);
if (abakedquad1 != null)
{
return abakedquad1;
}
}
}
}
}
}
return p_getConnectedTextureSingle_7_.getArrayQuadsCtm(p_getConnectedTextureSingle_4_);
}
}
示例14: getConnectedTextureCtmCompact
import net.minecraft.client.renderer.block.model.BakedQuad; //导入方法依赖的package包/类
private static BakedQuad[] getConnectedTextureCtmCompact(ConnectedProperties p_getConnectedTextureCtmCompact_0_, IBlockAccess p_getConnectedTextureCtmCompact_1_, IBlockState p_getConnectedTextureCtmCompact_2_, BlockPos p_getConnectedTextureCtmCompact_3_, int p_getConnectedTextureCtmCompact_4_, int p_getConnectedTextureCtmCompact_5_, BakedQuad p_getConnectedTextureCtmCompact_6_, int p_getConnectedTextureCtmCompact_7_, RenderEnv p_getConnectedTextureCtmCompact_8_)
{
TextureAtlasSprite textureatlassprite = p_getConnectedTextureCtmCompact_6_.getSprite();
int i = getConnectedTextureCtmIndex(p_getConnectedTextureCtmCompact_0_, p_getConnectedTextureCtmCompact_1_, p_getConnectedTextureCtmCompact_2_, p_getConnectedTextureCtmCompact_3_, p_getConnectedTextureCtmCompact_4_, p_getConnectedTextureCtmCompact_5_, textureatlassprite, p_getConnectedTextureCtmCompact_7_, p_getConnectedTextureCtmCompact_8_);
return ConnectedTexturesCompact.getConnectedTextureCtmCompact(i, p_getConnectedTextureCtmCompact_0_, p_getConnectedTextureCtmCompact_5_, p_getConnectedTextureCtmCompact_6_, p_getConnectedTextureCtmCompact_8_);
}