Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class InGameOverlay extends Gui
- {
- private final Minecraft mc = Minecraft.getMinecraft();
- private final ResourceLocation rivenOverlay = new ResourceLocation(RivenMod.MODID + ":textures/gui/rivengui.png");
- private final FontRenderer fontRendererObj = mc.fontRendererObj;
- private ArrayList<ISkill> skillListInstance;
- private int zCooldownTicks;
- private boolean isZUseable;
- public InGameOverlay() {
- skillListInstance = RivenMod.skillList;
- zCooldownTicks = 0;
- isZUseable = true;
- }
- @SubscribeEvent
- public void renderGameOverlay(RenderGameOverlayEvent.Post event) {
- if(event.isCancelable() || event.type != ElementType.EXPERIENCE)
- return;
- ScaledResolution sr = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
- int width = sr.getScaledWidth();
- int height = sr.getScaledHeight();
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GL11.glDisable(GL11.GL_LIGHTING);
- GL11.glPushMatrix();
- mc.renderEngine.bindTexture(rivenOverlay);
- drawTexturedModalRect(0, height / 2 - 61, 0, 0, 30, 74); //Skill Icon Holder
- for(int i = 0; i < skillListInstance.size(); i++) {
- drawTexturedModalRect(2, height / 2 - 61 + 2 + (18 * i), 16 + (16 * i), 74, 16, 16);
- }
- if(zCooldownTicks > 0) drawCenteredString(this.fontRendererObj, "" + (zCooldownTicks / 20), 10, 10, 0xFFFFFFFF);
- GL11.glPopMatrix();
- }
- .....
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement