Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

tf2_mandeokyi

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About tf2_mandeokyi

  • Rank
    Tree Puncher
  1. As the title says. (I've thought about mixing drawTexturedQuadFit and drawTexturedModalRect or something though, but it's actually quite not working well)
  2. Then how do I draw? [Edit] ( I got a code that can draw a line. Thankfully it doesn't crash the game, but it doesn't draw a line... Before: Tessellator t = Tessellator.getInstance(); BufferBuilder bb = t.getBuffer(); bb.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR); bb.pos(pos1.x, pos1.y, pos1.z).color(r, g, b, a).endVertex(); bb.pos(pos2.x, pos2.y, pos2.z).color(r, g, b, a).endVertex(); After: GlStateManager.glBegin(GL11.GL_LINES); GlStateManager.glVertex3f((float)pos1.x, (float)pos1.y, (float)pos1.z); GlStateManager.glVertex3f((float)pos2.x, (
  3. Ok... I changed (again) GL11 to GlStateManager. But Minecraft crashes when I use GlStateManager (when opening a map). What is the problem with this code? package com.tf2_mandeokyi.TF2Mod.events; import java.awt.Color; import org.lwjgl.opengl.GL11; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.math.Vec3d; import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraft
  4. Ok, I'll use GLStateManager. But because I don't know how to use it, can you show me some examples? because I can't find any of it about GlStateManager, but the only GL11.
  5. As you said, I added .Pre after RenderGameOverlayEvent. (but I don't get ElementType what you're going to say is.) And I found why Minecraft crashed. It's because that I separated functions at other classes. But the problem now is that function draws line at HUD, not 3D space. Any solution? (btw, GL11 also works well instead of GlStateManager (And for other peoples too), so I changed GlStateManager to GL11.) import java.awt.Color; import org.lwjgl.opengl.GL11; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.Tessellator; import
  6. Ok, so as you said, I changed GL11 to GlStateManager (There was GlStateManager, instead of GLStateManager), and placed that function at RenderGameOverlayEvent (Not at PlayerInteractEvent because I don't know how to make a loop at the inside of it). But Minecraft still crashes when I open the map. Did I miss something? import java.awt.Color; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraf
  7. I made a function that can draw a line between pos1 and pos2 when the mouse is clicked, but sometimes Minecraft crashes. or instead of crashing, it doesn't draw a line when I click the mouse. import java.awt.Color; import org.lwjgl.opengl.GL11; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.math.Vec3d; public class draw3dObjects { public static void drawLine(Vec3d pos1, Vec3d pos2, Color c, boolean smooth, float width) { // This cau
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.