本文整理汇总了Java中net.minecraft.client.renderer.texture.TextureAtlasSprite.getIndexInMap方法的典型用法代码示例。如果您正苦于以下问题:Java TextureAtlasSprite.getIndexInMap方法的具体用法?Java TextureAtlasSprite.getIndexInMap怎么用?Java TextureAtlasSprite.getIndexInMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.texture.TextureAtlasSprite
的用法示例。
在下文中一共展示了TextureAtlasSprite.getIndexInMap方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNaturalProperties
import net.minecraft.client.renderer.texture.TextureAtlasSprite; //导入方法依赖的package包/类
public static NaturalProperties getNaturalProperties(TextureAtlasSprite p_getNaturalProperties_0_)
{
if (!(p_getNaturalProperties_0_ instanceof TextureAtlasSprite))
{
return null;
}
else
{
int i = p_getNaturalProperties_0_.getIndexInMap();
if (i >= 0 && i < propertiesByIndex.length)
{
NaturalProperties naturalproperties = propertiesByIndex[i];
return naturalproperties;
}
else
{
return null;
}
}
}
示例2: addToTileList
import net.minecraft.client.renderer.texture.TextureAtlasSprite; //导入方法依赖的package包/类
private static void addToTileList(ConnectedProperties p_addToTileList_0_, List p_addToTileList_1_)
{
if (p_addToTileList_0_.matchTileIcons != null)
{
for (int i = 0; i < p_addToTileList_0_.matchTileIcons.length; ++i)
{
TextureAtlasSprite textureatlassprite = p_addToTileList_0_.matchTileIcons[i];
if (!(textureatlassprite instanceof TextureAtlasSprite))
{
Config.warn("TextureAtlasSprite is not TextureAtlasSprite: " + textureatlassprite + ", name: " + textureatlassprite.getIconName());
}
else
{
int j = textureatlassprite.getIndexInMap();
if (j < 0)
{
Config.warn("Invalid tile ID: " + j + ", icon: " + textureatlassprite.getIconName());
}
else
{
addToList(p_addToTileList_0_, p_addToTileList_1_, j);
}
}
}
}
}
示例3: setIconProperties
import net.minecraft.client.renderer.texture.TextureAtlasSprite; //导入方法依赖的package包/类
private static void setIconProperties(List p_setIconProperties_0_, String p_setIconProperties_1_, String p_setIconProperties_2_)
{
TextureMap texturemap = TextureUtils.getTextureMapBlocks();
TextureAtlasSprite textureatlassprite = texturemap.getSpriteSafe("minecraft:blocks/" + p_setIconProperties_1_);
if (textureatlassprite == null)
{
Config.warn("*** NaturalProperties: Icon not found: " + p_setIconProperties_1_ + " ***");
}
else if (!(textureatlassprite instanceof TextureAtlasSprite))
{
Config.warn("*** NaturalProperties: Icon is not IconStitched: " + p_setIconProperties_1_ + ": " + textureatlassprite.getClass().getName() + " ***");
}
else
{
int i = textureatlassprite.getIndexInMap();
if (i < 0)
{
Config.warn("*** NaturalProperties: Invalid index for icon: " + p_setIconProperties_1_ + ": " + i + " ***");
}
else if (Config.isFromDefaultResourcePack(new ResourceLocation("textures/blocks/" + p_setIconProperties_1_ + ".png")))
{
while (i >= p_setIconProperties_0_.size())
{
p_setIconProperties_0_.add(null);
}
NaturalProperties naturalproperties = new NaturalProperties(p_setIconProperties_2_);
p_setIconProperties_0_.set(i, naturalproperties);
Config.dbg("NaturalTextures: " + p_setIconProperties_1_ + " = " + p_setIconProperties_2_);
}
}
}
示例4: getConnectedTextureSingle
import net.minecraft.client.renderer.texture.TextureAtlasSprite; //导入方法依赖的package包/类
public static TextureAtlasSprite getConnectedTextureSingle(IBlockAccess p_getConnectedTextureSingle_0_, IBlockState p_getConnectedTextureSingle_1_, BlockPos p_getConnectedTextureSingle_2_, EnumFacing p_getConnectedTextureSingle_3_, TextureAtlasSprite p_getConnectedTextureSingle_4_, boolean p_getConnectedTextureSingle_5_, RenderEnv p_getConnectedTextureSingle_6_)
{
Block block = p_getConnectedTextureSingle_1_.getBlock();
if (!(p_getConnectedTextureSingle_1_ instanceof BlockStateBase))
{
return p_getConnectedTextureSingle_4_;
}
else
{
BlockStateBase blockstatebase = (BlockStateBase)p_getConnectedTextureSingle_1_;
if (tileProperties != null)
{
int i = p_getConnectedTextureSingle_4_.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()))
{
TextureAtlasSprite textureatlassprite = getConnectedTexture(connectedproperties, p_getConnectedTextureSingle_0_, blockstatebase, p_getConnectedTextureSingle_2_, j, p_getConnectedTextureSingle_4_, p_getConnectedTextureSingle_6_);
if (textureatlassprite != null)
{
return textureatlassprite;
}
}
}
}
}
}
if (blockProperties != null && p_getConnectedTextureSingle_5_)
{
int l = p_getConnectedTextureSingle_6_.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(p_getConnectedTextureSingle_4_))
{
TextureAtlasSprite textureatlassprite1 = getConnectedTexture(connectedproperties1, p_getConnectedTextureSingle_0_, blockstatebase, p_getConnectedTextureSingle_2_, i1, p_getConnectedTextureSingle_4_, p_getConnectedTextureSingle_6_);
if (textureatlassprite1 != null)
{
return textureatlassprite1;
}
}
}
}
}
}
return p_getConnectedTextureSingle_4_;
}
}
示例5: drawMultiTexture
import net.minecraft.client.renderer.texture.TextureAtlasSprite; //导入方法依赖的package包/类
public void drawMultiTexture()
{
if (this.quadSprites != null)
{
int i = Config.getMinecraft().getTextureMapBlocks().getCountRegisteredSprites();
if (this.drawnIcons.length <= i)
{
this.drawnIcons = new boolean[i + 1];
}
Arrays.fill(this.drawnIcons, false);
int j = 0;
int k = -1;
int l = this.vertexCount / 4;
for (int i1 = 0; i1 < l; ++i1)
{
TextureAtlasSprite textureatlassprite = this.quadSprites[i1];
if (textureatlassprite != null)
{
int j1 = textureatlassprite.getIndexInMap();
if (!this.drawnIcons[j1])
{
if (textureatlassprite == TextureUtils.iconGrassSideOverlay)
{
if (k < 0)
{
k = i1;
}
}
else
{
i1 = this.drawForIcon(textureatlassprite, i1) - 1;
++j;
if (this.blockLayer != EnumWorldBlockLayer.TRANSLUCENT)
{
this.drawnIcons[j1] = true;
}
}
}
}
}
if (k >= 0)
{
this.drawForIcon(TextureUtils.iconGrassSideOverlay, k);
++j;
}
if (j > 0)
{
;
}
}
}
示例6: getConnectedTextureSingle
import net.minecraft.client.renderer.texture.TextureAtlasSprite; //导入方法依赖的package包/类
public static TextureAtlasSprite getConnectedTextureSingle(IBlockAccess p_getConnectedTextureSingle_0_, IBlockState p_getConnectedTextureSingle_1_, BlockPos p_getConnectedTextureSingle_2_, EnumFacing p_getConnectedTextureSingle_3_, TextureAtlasSprite p_getConnectedTextureSingle_4_, boolean p_getConnectedTextureSingle_5_, RenderEnv p_getConnectedTextureSingle_6_)
{
Block block = p_getConnectedTextureSingle_1_.getBlock();
if (tileProperties != null)
{
int i = p_getConnectedTextureSingle_4_.getIndexInMap();
if (i >= 0 && i < tileProperties.length)
{
ConnectedProperties[] aconnectedproperties = tileProperties[i];
if (aconnectedproperties != null)
{
int j = p_getConnectedTextureSingle_6_.getMetadata();
int k = getSide(p_getConnectedTextureSingle_3_);
for (int l = 0; l < aconnectedproperties.length; ++l)
{
ConnectedProperties connectedproperties = aconnectedproperties[l];
if (connectedproperties != null)
{
int i1 = p_getConnectedTextureSingle_6_.getBlockId();
if (connectedproperties.matchesBlock(i1))
{
TextureAtlasSprite textureatlassprite = getConnectedTexture(connectedproperties, p_getConnectedTextureSingle_0_, p_getConnectedTextureSingle_1_, p_getConnectedTextureSingle_2_, k, p_getConnectedTextureSingle_4_, j, p_getConnectedTextureSingle_6_);
if (textureatlassprite != null)
{
return textureatlassprite;
}
}
}
}
}
}
}
if (blockProperties != null && p_getConnectedTextureSingle_5_)
{
int j1 = p_getConnectedTextureSingle_6_.getBlockId();
if (j1 >= 0 && j1 < blockProperties.length)
{
ConnectedProperties[] aconnectedproperties1 = blockProperties[j1];
if (aconnectedproperties1 != null)
{
int k1 = p_getConnectedTextureSingle_6_.getMetadata();
int l1 = getSide(p_getConnectedTextureSingle_3_);
for (int i2 = 0; i2 < aconnectedproperties1.length; ++i2)
{
ConnectedProperties connectedproperties1 = aconnectedproperties1[i2];
if (connectedproperties1 != null && connectedproperties1.matchesIcon(p_getConnectedTextureSingle_4_))
{
TextureAtlasSprite textureatlassprite1 = getConnectedTexture(connectedproperties1, p_getConnectedTextureSingle_0_, p_getConnectedTextureSingle_1_, p_getConnectedTextureSingle_2_, l1, p_getConnectedTextureSingle_4_, k1, p_getConnectedTextureSingle_6_);
if (textureatlassprite1 != null)
{
return textureatlassprite1;
}
}
}
}
}
}
return p_getConnectedTextureSingle_4_;
}
示例7: drawMultiTexture
import net.minecraft.client.renderer.texture.TextureAtlasSprite; //导入方法依赖的package包/类
public void drawMultiTexture()
{
if (this.quadSprites != null)
{
int i = Config.getMinecraft().getTextureMapBlocks().getCountRegisteredSprites();
if (this.drawnIcons.length <= i)
{
this.drawnIcons = new boolean[i + 1];
}
Arrays.fill(this.drawnIcons, false);
int j = 0;
int k = -1;
int l = this.vertexCount / 4;
for (int i1 = 0; i1 < l; ++i1)
{
TextureAtlasSprite textureatlassprite = this.quadSprites[i1];
if (textureatlassprite != null)
{
int j1 = textureatlassprite.getIndexInMap();
if (!this.drawnIcons[j1])
{
if (textureatlassprite == TextureUtils.iconGrassSideOverlay)
{
if (k < 0)
{
k = i1;
}
}
else
{
i1 = this.drawForIcon(textureatlassprite, i1) - 1;
++j;
if (this.blockLayer != BlockRenderLayer.TRANSLUCENT)
{
this.drawnIcons[j1] = true;
}
}
}
}
}
if (k >= 0)
{
this.drawForIcon(TextureUtils.iconGrassSideOverlay, k);
++j;
}
if (j > 0)
{
;
}
}
}
示例8: getConnectedTextureSingle
import net.minecraft.client.renderer.texture.TextureAtlasSprite; //导入方法依赖的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_);
}
}