Posted August 6, 20169 yr Hey everyone, first of all I know a lot of people will be complaining that 1.7 is ancient, but I cant update until mods I depent on do. I got an GUIOverlay that is supposed to render text to the screen. It works fince in 1.10 (with some minor adjustments to the newer version) but in 1.7 there is no text showing, and I have no idea why. The code is getting called, I see my sysout on the console @SubscribeEvent public void onRenderExperienceBar(RenderGameOverlayEvent event) { if(holder==null) holder = QuestHolder.get(); if(event.isCancelable() && (event.type==ElementType.ALL)) { mc.getTextureManager().bindTexture(texture); ScaledResolution sr = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); int i=0; int height = 30; mc.fontRenderer.drawStringWithShadow("Test", sr.getScaledWidth()/2, sr.getScaledHeight()/2, 0xFFFFFF); for (Quest quest : holder.getQuests()) { System.out.println(holder.getQuests().size()); if(!quest.isFollowed()) { mc.fontRenderer.drawString(quest.getName(), 100, height, WHITE); for(Condition condition:quest.getConditions()) { i+=1; mc.fontRenderer.drawString(condition.getDescription(), 30, height+10*i, condition.isFinished()? GREEN: RED); } i=0; height+=50; } } } }
August 6, 20169 yr Yeah, 1.7.10 is quite outdated, and projects for it should be discontinued or updated. However, I do still have this 1.7.10 project which I will be updating sometime to 1.10.2. Here, I've already checked for blocks implementing a specific interface, and then call this method, which then creates a HUD of it's name, akin to basic WAILA. https://github.com/Matryoshika/Saligia/blob/master/src/main/java/Matryoshika/mods/saligia/rendering/GUI/HUDRitual.java That's all I can do for ya'. Also previously known as eAndPi. "Pi, is there a station coming up where we can board your train of thought?" -Kronnn Published Mods: Underworld Handy links: Vic_'s Forge events Own WIP Tutorials.
August 6, 20169 yr Author Well ur code works, so I got something to work with but there is one thing u should seriously improve Integer.parseInt("FFFFFF", 16) Replace that with 0xFFFFFF .. What u are doing is slow and dirty
August 6, 20169 yr Integer.parseInt("FFFFFF", 16) Replace that with 0xFFFFFF .. What u are doing is slow and dirty I know. All that, was my first ever project for modding minecraft, with zero previous experience with Java, bar doing some C# (~80% Java) 2 years prior. It's a baaaaad project, I know, I won't deny that, but that is why it's on hold, so that I can learn everything I should. Also previously known as eAndPi. "Pi, is there a station coming up where we can board your train of thought?" -Kronnn Published Mods: Underworld Handy links: Vic_'s Forge events Own WIP Tutorials.
August 6, 20169 yr Author My mistake was the wrong ElementType for the event. ElementType.Experience works fine
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.