本文整理汇总了Java中net.minecraft.client.renderer.texture.TextureMap.getSpriteSafe方法的典型用法代码示例。如果您正苦于以下问题:Java TextureMap.getSpriteSafe方法的具体用法?Java TextureMap.getSpriteSafe怎么用?Java TextureMap.getSpriteSafe使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.texture.TextureMap
的用法示例。
在下文中一共展示了TextureMap.getSpriteSafe方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import net.minecraft.client.renderer.texture.TextureMap; //导入方法依赖的package包/类
public static void update()
{
TextureMap texturemap = getTextureMapBlocks();
if (texturemap != null)
{
String s = "minecraft:blocks/";
iconGrassTop = texturemap.getSpriteSafe(s + "grass_top");
iconGrassSide = texturemap.getSpriteSafe(s + "grass_side");
iconGrassSideOverlay = texturemap.getSpriteSafe(s + "grass_side_overlay");
iconSnow = texturemap.getSpriteSafe(s + "snow");
iconGrassSideSnowed = texturemap.getSpriteSafe(s + "grass_side_snowed");
iconMyceliumSide = texturemap.getSpriteSafe(s + "mycelium_side");
iconMyceliumTop = texturemap.getSpriteSafe(s + "mycelium_top");
iconWaterStill = texturemap.getSpriteSafe(s + "water_still");
iconWaterFlow = texturemap.getSpriteSafe(s + "water_flow");
iconLavaStill = texturemap.getSpriteSafe(s + "lava_still");
iconLavaFlow = texturemap.getSpriteSafe(s + "lava_flow");
iconFireLayer0 = texturemap.getSpriteSafe(s + "fire_layer_0");
iconFireLayer1 = texturemap.getSpriteSafe(s + "fire_layer_1");
iconPortal = texturemap.getSpriteSafe(s + "portal");
iconGlass = texturemap.getSpriteSafe(s + "glass");
iconGlassPaneTop = texturemap.getSpriteSafe(s + "glass_pane_top");
}
}
示例2: getIcon
import net.minecraft.client.renderer.texture.TextureMap; //导入方法依赖的package包/类
private static TextureAtlasSprite getIcon(String p_getIcon_0_)
{
TextureMap texturemap = Minecraft.getMinecraft().getTextureMapBlocks();
TextureAtlasSprite textureatlassprite = texturemap.getSpriteSafe(p_getIcon_0_);
if (textureatlassprite != null)
{
return textureatlassprite;
}
else
{
textureatlassprite = texturemap.getSpriteSafe("blocks/" + p_getIcon_0_);
return textureatlassprite;
}
}
示例3: update
import net.minecraft.client.renderer.texture.TextureMap; //导入方法依赖的package包/类
public static void update()
{
TextureMap texturemap = getTextureMapBlocks();
if (texturemap != null)
{
String s = "minecraft:blocks/";
iconGrassTop = texturemap.getSpriteSafe(s + "grass_top");
iconGrassSide = texturemap.getSpriteSafe(s + "grass_side");
iconGrassSideOverlay = texturemap.getSpriteSafe(s + "grass_side_overlay");
iconSnow = texturemap.getSpriteSafe(s + "snow");
iconGrassSideSnowed = texturemap.getSpriteSafe(s + "grass_side_snowed");
iconMyceliumSide = texturemap.getSpriteSafe(s + "mycelium_side");
iconMyceliumTop = texturemap.getSpriteSafe(s + "mycelium_top");
iconWaterStill = texturemap.getSpriteSafe(s + "water_still");
iconWaterFlow = texturemap.getSpriteSafe(s + "water_flow");
iconLavaStill = texturemap.getSpriteSafe(s + "lava_still");
iconLavaFlow = texturemap.getSpriteSafe(s + "lava_flow");
iconFireLayer0 = texturemap.getSpriteSafe(s + "fire_layer_0");
iconFireLayer1 = texturemap.getSpriteSafe(s + "fire_layer_1");
iconPortal = texturemap.getSpriteSafe(s + "portal");
iconGlass = texturemap.getSpriteSafe(s + "glass");
iconGlassPaneTop = texturemap.getSpriteSafe(s + "glass_pane_top");
String s1 = "minecraft:items/";
iconCompass = texturemap.getSpriteSafe(s1 + "compass");
iconClock = texturemap.getSpriteSafe(s1 + "clock");
}
}
示例4: setIconProperties
import net.minecraft.client.renderer.texture.TextureMap; //导入方法依赖的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_);
}
}
}
示例5: makeModel
import net.minecraft.client.renderer.texture.TextureMap; //导入方法依赖的package包/类
public static IBakedModel makeModel(String p_makeModel_0_, String p_makeModel_1_, String p_makeModel_2_)
{
TextureMap texturemap = Config.getMinecraft().getTextureMapBlocks();
TextureAtlasSprite textureatlassprite = texturemap.getSpriteSafe(p_makeModel_1_);
TextureAtlasSprite textureatlassprite1 = texturemap.getSpriteSafe(p_makeModel_2_);
return makeModel(p_makeModel_0_, textureatlassprite, textureatlassprite1);
}