本文整理匯總了Java中net.minecraft.client.renderer.texture.TextureAtlasSprite.setLocationNameCompass方法的典型用法代碼示例。如果您正苦於以下問題:Java TextureAtlasSprite.setLocationNameCompass方法的具體用法?Java TextureAtlasSprite.setLocationNameCompass怎麽用?Java TextureAtlasSprite.setLocationNameCompass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.renderer.texture.TextureAtlasSprite
的用法示例。
在下文中一共展示了TextureAtlasSprite.setLocationNameCompass方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getItemsTextureLocations
import net.minecraft.client.renderer.texture.TextureAtlasSprite; //導入方法依賴的package包/類
private Set<ResourceLocation> getItemsTextureLocations()
{
Set<ResourceLocation> set = Sets.<ResourceLocation>newHashSet();
for (ResourceLocation resourcelocation : this.itemLocations.values())
{
ModelBlock modelblock = (ModelBlock)this.models.get(resourcelocation);
if (modelblock != null)
{
set.add(new ResourceLocation(modelblock.resolveTextureName("particle")));
if (this.hasItemModel(modelblock))
{
for (String s : ItemModelGenerator.LAYERS)
{
ResourceLocation resourcelocation2 = new ResourceLocation(modelblock.resolveTextureName(s));
if (modelblock.getRootModel() == MODEL_COMPASS && !TextureMap.LOCATION_MISSING_TEXTURE.equals(resourcelocation2))
{
TextureAtlasSprite.setLocationNameCompass(resourcelocation2.toString());
}
else if (modelblock.getRootModel() == MODEL_CLOCK && !TextureMap.LOCATION_MISSING_TEXTURE.equals(resourcelocation2))
{
TextureAtlasSprite.setLocationNameClock(resourcelocation2.toString());
}
set.add(resourcelocation2);
}
}
else if (!this.isCustomRenderer(modelblock))
{
for (BlockPart blockpart : modelblock.getElements())
{
for (BlockPartFace blockpartface : blockpart.mapFaces.values())
{
ResourceLocation resourcelocation1 = new ResourceLocation(modelblock.resolveTextureName(blockpartface.texture));
set.add(resourcelocation1);
}
}
}
}
}
return set;
}