@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
float mult = 1;
if (type == ItemRenderType.INVENTORY) {
mult = 16;
}
if (Minecraft.getMinecraft().thePlayer != null) {
rand.setSeed((int)((Minecraft.getMinecraft().thePlayer.ticksExisted+ClientProxy.timer.renderPartialTicks)*100)*item.hashCode());
}
IIcon icon = item.getIconIndex();
for (int i = 0; i < rand.nextInt(80)+30; i++) {
GL11.glPushMatrix();
GL11.glScalef(mult*rand.nextFloat(), mult*rand.nextFloat(), 0);
GL11.glTranslatef((mult*((rand.nextFloat()*4)-2)), (mult*((rand.nextFloat()*4)-2)), (mult*((rand.nextFloat()*4)-2)));
ItemRenderer.renderItemIn2D(Tessellator.instance, rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), icon.getIconWidth(), icon.getIconHeight(), rand.nextFloat());
GL11.glPopMatrix();
}
}
UndefinedItemRenderer.java 文件源码
java
阅读 13
收藏 0
点赞 0
评论 0
项目:Farrago
作者:
评论列表
文章目录