Jump to content

Taylantz

Members
  • Posts

    5
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Taylantz's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello everyone, I'm trying to create an overlay mod. I'm pretty much at the beginning of it and I'm trying to understand how rendering and gui-classes works. My goal is a pretty simple overlay that shows a current state of an item i already created. (goal -> somewhat like the energy level of the ultimate lappack from the GraviChestPlate MOD) I'm trying to render a string onto the screen with the FontRenderer - drawString method. I pretty much copied it together from the GuiIngame class. GUI class @SideOnly(Side.CLIENT) public class GuiMasterWrench extends Gui { private final Minecraft mc; public GuiMasterWrench(Minecraft minecraft) { this.mc = minecraft; } public void renderWrenchState() { FontRenderer fontRender = this.mc.fontRenderer; ScaledResolution sclRes = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight); //GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); fontRender.drawStringWithShadow("This is the test string!", 1, 1, 0xffffffff); } } In the item class I'm trying to call the overlay with the onItemUseFirst method. When i try to right-click my item ingame, i get the following error. Error - Stack Trace I would appreciate any kind of help.
  2. Hello everyone, I'm trying to create an overlay mod. I'm pretty much at the beginning of it and I'm trying to understand how rendering and gui-classes works. My goal is a pretty simple overlay that shows a current state of an item i already created. (goal -> somewhat like the energy level of the ultimate lappack from the GraviChestPlate MOD) I'm trying to render a string onto the screen with the FontRenderer - drawString method. I pretty much copied it together from the GuiIngame class. GUI class @SideOnly(Side.CLIENT) public class GuiMasterWrench extends Gui { private final Minecraft mc; public GuiMasterWrench(Minecraft minecraft) { this.mc = minecraft; } public void renderWrenchState() { FontRenderer fontRender = this.mc.fontRenderer; ScaledResolution sclRes = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight); //GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); fontRender.drawStringWithShadow("This is the test string!", 1, 1, 0xffffffff); } } In the item class I'm trying to call the overlay with the onItemUseFirst method. I would appreciate any kind of help.
  3. Ok, last question. Is there any mod that could serve as an example? (Preferably written with Forge) Even the smallest example could help
  4. Hope someone still reads this. Is there any possibility to write server-side-only Forge-Mods or does there always have to be a client-sided mod?
  5. Hello there everyone, i just wanted to ask if there is any SMP-Mod for Forge that contains functions to protect certain areas (like for example: faction does), maybe even with the possibility to create groups. I know that Forge is hook-based but since it has its own Multiplayer-Modloader (and does not work with the "old" MPLoader). Maybe someone has an idea on how to protect certain areas. Thanks in advance for any answers.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.