本文整理汇总了Java中net.minecraft.tileentity.TileEntityBanner.getColorList方法的典型用法代码示例。如果您正苦于以下问题:Java TileEntityBanner.getColorList方法的具体用法?Java TileEntityBanner.getColorList怎么用?Java TileEntityBanner.getColorList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.tileentity.TileEntityBanner
的用法示例。
在下文中一共展示了TileEntityBanner.getColorList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_178463_a
import net.minecraft.tileentity.TileEntityBanner; //导入方法依赖的package包/类
private ResourceLocation func_178463_a(TileEntityBanner bannerObj)
{
String s = bannerObj.func_175116_e();
if (s.isEmpty())
{
return null;
}
else
{
TileEntityBannerRenderer.TimedBannerTexture tileentitybannerrenderer$timedbannertexture = (TileEntityBannerRenderer.TimedBannerTexture)DESIGNS.get(s);
if (tileentitybannerrenderer$timedbannertexture == null)
{
if (DESIGNS.size() >= 256)
{
long i = System.currentTimeMillis();
Iterator<String> iterator = DESIGNS.keySet().iterator();
while (iterator.hasNext())
{
String s1 = (String)iterator.next();
TileEntityBannerRenderer.TimedBannerTexture tileentitybannerrenderer$timedbannertexture1 = (TileEntityBannerRenderer.TimedBannerTexture)DESIGNS.get(s1);
if (i - tileentitybannerrenderer$timedbannertexture1.systemTime > 60000L)
{
Minecraft.getMinecraft().getTextureManager().deleteTexture(tileentitybannerrenderer$timedbannertexture1.bannerTexture);
iterator.remove();
}
}
if (DESIGNS.size() >= 256)
{
return null;
}
}
List<TileEntityBanner.EnumBannerPattern> list1 = bannerObj.getPatternList();
List<EnumDyeColor> list = bannerObj.getColorList();
List<String> list2 = Lists.<String>newArrayList();
for (TileEntityBanner.EnumBannerPattern tileentitybanner$enumbannerpattern : list1)
{
list2.add("textures/entity/banner/" + tileentitybanner$enumbannerpattern.getPatternName() + ".png");
}
tileentitybannerrenderer$timedbannertexture = new TileEntityBannerRenderer.TimedBannerTexture();
tileentitybannerrenderer$timedbannertexture.bannerTexture = new ResourceLocation(s);
Minecraft.getMinecraft().getTextureManager().loadTexture(tileentitybannerrenderer$timedbannertexture.bannerTexture, new LayeredColorMaskTexture(BANNERTEXTURES, list2, list));
DESIGNS.put(s, tileentitybannerrenderer$timedbannertexture);
}
tileentitybannerrenderer$timedbannertexture.systemTime = System.currentTimeMillis();
return tileentitybannerrenderer$timedbannertexture.bannerTexture;
}
}