@SubscribeEvent(priority = EventPriority.NORMAL)
public void onRenderExperienceBar(RenderGameOverlayEvent event)
{
if (event.isCancelable() || event.type != EXPERIENCE) {
return;
}
int width = event.resolution.getScaledWidth();
int height = event.resolution.getScaledHeight();
int k2 = height - 20;
int blink = mc.thePlayer.getDataWatcher().getWatchableObjectInt(BLINK);
int i4 = width / 2 + 91;
int bar = MathHelper.ceiling_double_int((double) (blink + 2) * 10.0D
/ MAX_BLINK);
glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
glDisable(GL_LIGHTING);
mc.getTextureManager().bindTexture(icons);
drawTexturedModalRect(i4 - 281, k2 - 1, 0, 18, 83, 11);
drawTexturedModalRect(i4 - 301, k2 - 1, 83, 18, 17, 11);
for (int i = 0; i < 10; ++i) {
if (i < bar) {
drawTexturedModalRect(i4 + i * 8 - 280, k2, 100, 18, 9, 9);
}
}
}
SCPGuiBlink.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:SecureCraftProtect
作者:
评论列表
文章目录