• 0

    posted a message on [1.0.0]Better Main Menu [v1]
    Quote from Libraryaddict

    Nice!

    However could you have the movement fluid?
    Its rather jerky :sad.gif:

    Hmm that's odd, it's smooth on my computer. I'll try fix that :biggrin.gif:
    Posted in: Minecraft Mods
  • 1

    posted a message on [1.0.0]Better Main Menu [v1]
    Main Information:
    Recently I have been experimenting with lwjgl because I was bored and found a way to make the main menu animation follow your mouse! It makes a pretty cool effect when in your main menu and has managed to entertain me for about 3 hours now using different texture packs :biggrin.gif:

    If anyone could make a video I would be very grateful because my computer is really laggy :sad.gif:

    I allow anyone to use this in their modpacks because I don't really care if this is spread around. Just please give credits and don't gain money off this :biggrin.gif:
    Pictures:
    Showing pictures wouldn't really prove that it works but it's against the rules not to so here(Sorry if they are big)

    Here is a side view!


    Here is an upwards view!


    Here is a downwards view!


    How it works(And source code)

    To make this mod I researched some mouse stuff with lwjgl with the javadoc found here http://lwjgl.org/javadoc/org/lwjgl/input/Mouse.htmls and found how to get the X and U coords of your mouse, these methods
    Mouse.getX();
    and Mouse.getY();
    I then found where the movement of the screen was held in GuiMainMenu.java. It was on around line 170. I just commented it out. Next I made a few variables and made them equal to said methods. Now I had to replicate the old animation and put in the new variables.

    If this made no sense, which it did, here is the source code with comments do you know what things do. WARNING BIG!

    // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3) braces deadcode fieldsfirst 
    
    package net.minecraft.src;
    
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.nio.charset.Charset;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.List;
    import java.util.Random;
    import net.minecraft.client.Minecraft;
    import org.lwjgl.opengl.GL11;
    import org.lwjgl.util.glu.GLU;
    import org.lwjgl.input.Mouse;
    
    // Referenced classes of package net.minecraft.src:
    //            GuiScreen, RenderEngine, StringTranslate, GuiButton, 
    //            GuiOptions, GuiSelectWorld, GuiMultiplayer, GuiTexturePacks, 
    //            Tessellator, MathHelper, FontRenderer
    
    public class GuiMainMenu extends GuiScreen
    {
    
        private static final Random rand = new Random();
        private float updateCounter;
        private String splashText;
        private GuiButton multiplayerButton;
        private int field_35357_f;
        private int viewportTexture;
    	
    	private float mouseXPos; //This controls the x movement
    	private float mouseYPos; //This controls the y movement
    	public static int ms1; //Another variable
    	public static int ms2; //Another variable
    	public static float fms; //Another variable
    
        public GuiMainMenu()
        {
            updateCounter = 0.0F;
            field_35357_f = 0;
            splashText = "missingno";
            try
            {
                ArrayList arraylist = new ArrayList();
                BufferedReader bufferedreader = new BufferedReader(new InputStreamReader((net.minecraft.src.GuiMainMenu.class).getResourceAsStream("/title/splashes.txt"), Charset.forName("UTF-8")));
                String s = "";
                do
                {
                    String s1;
                    if((s1 = bufferedreader.readLine()) == null)
                    {
                        break;
                    }
                    s1 = s1.trim();
                    if(s1.length() > 0)
                    {
                        arraylist.add(s1);
                    }
                } while(true);
                do
                {
                    splashText = (String)arraylist.get(rand.nextInt(arraylist.size()));
                } while(splashText.hashCode() == 0x77f432f);
            }
            catch(Exception exception) { }
            updateCounter = rand.nextFloat();
        }
    
        public void updateScreen()
        {
            field_35357_f++;
        }
    
        public boolean doesGuiPauseGame()
        {
            return false;
        }
    
        protected void keyTyped(char c, int i)
        {
        }
    
        public void initGui()
        {
            viewportTexture = mc.renderEngine.allocateAndSetupTexture(new java.awt.image.BufferedImage(256, 256, 2));
            Calendar calendar = Calendar.getInstance();
            calendar.setTime(new Date());
            if(calendar.get(2) + 1 == 11 && calendar.get(5) == 9)
            {
                splashText = "Happy birthday, ez!";
            } else
            if(calendar.get(2) + 1 == 6 && calendar.get(5) == 1)
            {
                splashText = "Happy birthday, Notch!";
            } else
            if(calendar.get(2) + 1 == 12 && calendar.get(5) == 24)
            {
                splashText = "Merry X-mas!";
            } else
            if(calendar.get(2) + 1 == 1 && calendar.get(5) == 1)
            {
                splashText = "Happy new year!";
            }
            StringTranslate stringtranslate = StringTranslate.getInstance();
            int i = height / 4 + 48;
            controlList.add(new GuiButton(1, width / 2 - 100, i, stringtranslate.translateKey("menu.singleplayer")));
            controlList.add(multiplayerButton = new GuiButton(2, width / 2 - 100, i + 24, stringtranslate.translateKey("menu.multiplayer")));
            controlList.add(new GuiButton(3, width / 2 - 100, i + 48, stringtranslate.translateKey("menu.mods")));
            if(mc.hideQuitButton)
            {
                controlList.add(new GuiButton(0, width / 2 - 100, i + 72, stringtranslate.translateKey("menu.options")));
            } else
            {
                controlList.add(new GuiButton(0, width / 2 - 100, i + 72 + 12, 98, 20, stringtranslate.translateKey("menu.options")));
                controlList.add(new GuiButton(4, width / 2 + 2, i + 72 + 12, 98, 20, stringtranslate.translateKey("menu.quit")));
            }
            if(mc.session == null)
            {
                multiplayerButton.enabled = false;
            }
        }
    
        protected void actionPerformed(GuiButton guibutton)
        {
            if(guibutton.id == 0)
            {
                mc.displayGuiScreen(new GuiOptions(this, mc.gameSettings));
            }
            if(guibutton.id == 1)
            {
                mc.displayGuiScreen(new GuiSelectWorld(this));
            }
            if(guibutton.id == 2)
            {
                mc.displayGuiScreen(new GuiMultiplayer(this));
            }
            if(guibutton.id == 3)
            {
                mc.displayGuiScreen(new GuiTexturePacks(this));
            }
            if(guibutton.id == 4)
            {
                mc.shutdown();
            }
        }
    	
    	private void MouseSpinner(int ms1, int ms2, float fms) { //This method sets the variables mouseXPos and mouseYPos to Mouse.getX() and Mouse.getY()
    		mouseXPos = ms1 - Mouse.getX();
    		mouseYPos = ms2 - Mouse.getY();
    	}
    
        private void func_35355_b(int i, int j, float f)
        {
            Tessellator tessellator = Tessellator.instance;
            GL11.glMatrixMode(5889 /*GL_PROJECTION*/);
            GL11.glPushMatrix();
            GL11.glLoadIdentity();
            GLU.gluPerspective(120F, 1.0F, 0.05F, 10F);
            GL11.glMatrixMode(5888 /*GL_MODELVIEW0_ARB*/);
            GL11.glPushMatrix();
            GL11.glLoadIdentity();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
            GL11.glEnable(3042 /*GL_BLEND*/);
            GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
            GL11.glDisable(2884 /*GL_CULL_FACE*/);
            GL11.glDepthMask(false);
            GL11.glBlendFunc(770, 771);
            int k = 8;
            for(int l = 0; l < k * k; l++)
            {	
    			MouseSpinner(ms1, ms2, fms); //Declaring the MouseSpinner method, allowing for screen movement
                GL11.glPushMatrix();
                float f1 = ((float)(l % k) / (float)k - 0.5F) / 64F;
                float f2 = ((float)(l / k) / (float)k - 0.5F) / 64F;
                float f3 = 0.0F;
                GL11.glTranslatef(f1, f2, f3);
    			GL11.glRotatef(mouseYPos * 1.5F, 1.0F, 0.0F, 0.0F); //This is what controls the screen movement of the Y coordinates
    			GL11.glRotatef(mouseXPos * 1.5F, 0.0F, 1.0F, 0.0F); //This is what controls the screen movement of the X coordinates
                for(int i1 = 0; i1 < 6; i1++)
                {
                    GL11.glPushMatrix();
                    if(i1 == 1)
                    {
                        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
                    }
                    if(i1 == 2)
                    {
                        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
                    }
                    if(i1 == 3)
                    {
                        GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
                    }
                    if(i1 == 4)
                    {
                        GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
                    }
                    if(i1 == 5)
                    {
                        GL11.glRotatef(-90F, 1.0F, 0.0F, 0.0F);
                    }
                    GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture((new StringBuilder()).append("/title/bg/panorama").append(i1).append(".png").toString()));
                    tessellator.startDrawingQuads();
                    tessellator.setColorRGBA_I(0xffffff, 255 / (l + 1));
                    float f4 = 0.0F;
                    tessellator.addVertexWithUV(-1D, -1D, 1.0D, 0.0F + f4, 0.0F + f4);
                    tessellator.addVertexWithUV(1.0D, -1D, 1.0D, 1.0F - f4, 0.0F + f4);
                    tessellator.addVertexWithUV(1.0D, 1.0D, 1.0D, 1.0F - f4, 1.0F - f4);
                    tessellator.addVertexWithUV(-1D, 1.0D, 1.0D, 0.0F + f4, 1.0F - f4);
                    tessellator.draw();
                    GL11.glPopMatrix();
                }
    
                GL11.glPopMatrix();
                GL11.glColorMask(true, true, true, false);
            }
    
            tessellator.setTranslationD(0.0D, 0.0D, 0.0D);
            GL11.glColorMask(true, true, true, true);
            GL11.glMatrixMode(5889 /*GL_PROJECTION*/);
            GL11.glPopMatrix();
            GL11.glMatrixMode(5888 /*GL_MODELVIEW0_ARB*/);
            GL11.glPopMatrix();
            GL11.glDepthMask(true);
            GL11.glEnable(2884 /*GL_CULL_FACE*/);
            GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
            GL11.glEnable(2929 /*GL_DEPTH_TEST*/);
        }
    
        private void rotateAndBlurSkybox(float f)
        {
            GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, viewportTexture);
            GL11.glCopyTexSubImage2D(3553 /*GL_TEXTURE_2D*/, 0, 0, 0, 0, 0, 256, 256);
            GL11.glEnable(3042 /*GL_BLEND*/);
            GL11.glBlendFunc(770, 771);
            GL11.glColorMask(true, true, true, false);
            Tessellator tessellator = Tessellator.instance;
            tessellator.startDrawingQuads();
            byte byte0 = 3;
            for(int i = 0; i < byte0; i++)
            {
                tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F / (float)(i + 1));
                int j = width;
                int k = height;
                float f1 = (float)(i - byte0 / 2) / 256F;
                tessellator.addVertexWithUV(j, k, zLevel, 0.0F + f1, 0.0D);
                tessellator.addVertexWithUV(j, 0.0D, zLevel, 1.0F + f1, 0.0D);
                tessellator.addVertexWithUV(0.0D, 0.0D, zLevel, 1.0F + f1, 1.0D);
                tessellator.addVertexWithUV(0.0D, k, zLevel, 0.0F + f1, 1.0D);
            }
    
            tessellator.draw();
            GL11.glColorMask(true, true, true, true);
        }
    
        private void renderSkybox(int i, int j, float f)
        {
            GL11.glViewport(0, 0, 256, 256);
            func_35355_b(i, j, f);
            GL11.glDisable(3553 /*GL_TEXTURE_2D*/);
            GL11.glEnable(3553 /*GL_TEXTURE_2D*/);
            rotateAndBlurSkybox(f);
            rotateAndBlurSkybox(f);
            rotateAndBlurSkybox(f);
            rotateAndBlurSkybox(f);
            rotateAndBlurSkybox(f);
            rotateAndBlurSkybox(f);
            rotateAndBlurSkybox(f);
            rotateAndBlurSkybox(f);
            GL11.glViewport(0, 0, mc.displayWidth, mc.displayHeight);
            Tessellator tessellator = Tessellator.instance;
            tessellator.startDrawingQuads();
            float f1 = width <= height ? 120F / (float)height : 120F / (float)width;
            float f2 = ((float)height * f1) / 256F;
            float f3 = ((float)width * f1) / 256F;
            GL11.glTexParameteri(3553 /*GL_TEXTURE_2D*/, 10241 /*GL_TEXTURE_MIN_FILTER*/, 9729 /*GL_LINEAR*/);
            GL11.glTexParameteri(3553 /*GL_TEXTURE_2D*/, 10240 /*GL_TEXTURE_MAG_FILTER*/, 9729 /*GL_LINEAR*/);
            tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F);
            int k = width;
            int l = height;
            tessellator.addVertexWithUV(0.0D, l, zLevel, 0.5F - f2, 0.5F + f3);
            tessellator.addVertexWithUV(k, l, zLevel, 0.5F - f2, 0.5F - f3);
            tessellator.addVertexWithUV(k, 0.0D, zLevel, 0.5F + f2, 0.5F - f3);
            tessellator.addVertexWithUV(0.0D, 0.0D, zLevel, 0.5F + f2, 0.5F + f3);
            tessellator.draw();
        }
    
        public void drawScreen(int i, int j, float f)
        {
            renderSkybox(i, j, f);
            Tessellator tessellator = Tessellator.instance;
            char c = '\u0112';
            int k = width / 2 - c / 2;
            byte byte0 = 30;
            drawGradientRect(0, 0, width, height, 0x80ffffff, 0xffffff);
            drawGradientRect(0, 0, width, height, 0, 0x80000000);
            GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/mclogo.png"));
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            if((double)updateCounter < 0.0001D)
            {
                drawTexturedModalRect(k + 0, byte0 + 0, 0, 0, 99, 44);
                drawTexturedModalRect(k + 99, byte0 + 0, 129, 0, 27, 44);
                drawTexturedModalRect(k + 99 + 26, byte0 + 0, 126, 0, 3, 44);
                drawTexturedModalRect(k + 99 + 26 + 3, byte0 + 0, 99, 0, 26, 44);
                drawTexturedModalRect(k + 155, byte0 + 0, 0, 45, 155, 44);
            } else
            {
                drawTexturedModalRect(k + 0, byte0 + 0, 0, 0, 155, 44);
                drawTexturedModalRect(k + 155, byte0 + 0, 0, 45, 155, 44);
            }
            tessellator.setColorOpaque_I(0xffffff);
            GL11.glPushMatrix();
            GL11.glTranslatef(width / 2 + 90, 70F, 0.0F);
            GL11.glRotatef(-20F, 0.0F, 0.0F, 1.0F);
            float f1 = 1.8F - MathHelper.abs(MathHelper.sin(((float)(System.currentTimeMillis() % 1000L) / 1000F) * 3.141593F * 2.0F) * 0.1F);
            f1 = (f1 * 100F) / (float)(fontRenderer.getStringWidth(splashText) + 32);
            GL11.glScalef(f1, f1, f1);
            drawCenteredString(fontRenderer, splashText, 0, -8, 0xffff00);
            GL11.glPopMatrix();
            drawString(fontRenderer, "Minecraft 1.0.0", 2, height - 10, 0xffffff);
            String s = "Copyright Mojang AB. Do not distribute!";
            drawString(fontRenderer, s, width - fontRenderer.getStringWidth(s) - 2, height - 10, 0xffffff);
            super.drawScreen(i, j, f);
        }
    
    }


    Download:
    Here is the download for the mod. It does not require modloader!
    http://www.mediafire.com/?7a1w339w2mcw2jd
    Posted in: Minecraft Mods
  • 1

    posted a message on What Are These Things??!!!!
    Yeah I hate those sperm things. Got me pregnant!
    Posted in: Discussion
  • 0

    posted a message on Need Mod Requests
    Make a fully functional replica of Single Player Commands. It's quite fun to do, only took me 6 weeks :biggrin.gif:
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on Post your CTRL-V
    if(s.startsWith("lookup")) {
    try {
    String as[] = s.split(" ");
    String as1 = as[1];
    int key = Keyboard.getKeyIndex(as1.toUpperCase());
    System.out.println("" + key);
    } catch (Exception e) {
    System.out.println("Something went wrong?");
    }
    }


    I was playing with lwjgl.
    Posted in: Forum Games
  • 0

    posted a message on How do I not edit EnumToolMaterial??
    Quote from Kmcpeek7

    Ok, but now i get an error that says this too!!



    You obviously don't know java. Learn how to read errors then come back.
    Posted in: Modification Development
  • 1

    posted a message on [Moding] Simple fly mod tutorial [1.1]
    Quote from madcrazydrumma

    Please dude; give credits to hack forums... Im not stupid -.-

    Hackforums is the most low quality site in the world. Most people probably get the code from this.
    Posted in: Tutorials
  • 0

    posted a message on Is hotmail down?
    Works for me. Try hotfemale though. Much better in my opinion.
    Posted in: General Off Topic
  • 2

    posted a message on Your Theme Song!
    This is my theme song:
    Posted in: Culture, Media & Arts
  • 0

    posted a message on Mean People
    I hate people that throw tantrums like a 3 year old in a shop and their mum wont buy them a chocolate bar. I like being mean to those people.
    Posted in: General Off Topic
  • 0

    posted a message on [Moding] Simple fly mod tutorial [1.1]
    Try this then, this is the complete code that I would use
    if(mc.gameSettings.showDebugInfo)
            {
                GL11.glPushMatrix();
                if(Minecraft.hasPaidCheckTime > 0L)
                {
                    GL11.glTranslatef(0.0F, 32F, 0.0F);
                }
                fontrenderer.drawStringWithShadow(mc.debugInfoRenders(), 2, 12, 0xffffff);
                fontrenderer.drawStringWithShadow(mc.func_6262_n(), 2, 22, 0xffffff);
                fontrenderer.drawStringWithShadow(mc.debugInfoEntities(), 2, 32, 0xffffff);
                fontrenderer.drawStringWithShadow(mc.func_21002_o(), 2, 42, 0xffffff);
                long l1 = Runtime.getRuntime().maxMemory();
                long l2 = Runtime.getRuntime().totalMemory();
                long l4 = Runtime.getRuntime().freeMemory();
                long l5 = l2 - l4;
                                 }else{
                    fontrenderer.drawStringWithShadow("Minecraft 1.0.0", 2, 2, 0xffffff);
                    ArrayList Modlist = new ArrayList();
            }
    Posted in: Tutorials
  • 0

    posted a message on cannot find symbol symbol : variable ModLoader [wait what?]
    Quote from TheLoneB34r

    Sorry, Posted in the wrong section of the forum.



    But shouldn't it work either way? hm. I looked at a totorial on installation. it should be fine..

    Sorry buddy but it doesn't work like that.
    Posted in: Mods Discussion
  • 0

    posted a message on cannot find symbol symbol : variable ModLoader [wait what?]
    Wait modloader is for SMP?
    Posted in: Mods Discussion
  • 0

    posted a message on [Moding] Simple fly mod tutorial [1.1]
    Quote from Sandtrooper

    == MCP v5.0 ==
    > Recompiling client...
    javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
    ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
    rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
    craft\net\minecraft\src\*.java  conf/patches/*.java failed.
    Return code : 1
    
    == ERRORS FOUND ==
    
    warning: [options] bootstrap class path not set in conjunction with -source 1.6
    src\minecraft\net\minecraft\src\GuiIngame.java:339: error: 'else' without 'if'
    else{
    ^
    
    1 error
    1 warning
    ==================
    
    > Done in 1.61 seconds
    > Recompiling server...
    !! Can not find server sources !!
    Press any key to continue . . .


    just getting that, im unsure how to fix it.

    if(mc.gameSettings.showDebugInfo)
            {
                GL11.glPushMatrix();
                if(Minecraft.hasPaidCheckTime > 0L)
                {
                    GL11.glTranslatef(0.0F, 32F, 0.0F);
                }
                fontrenderer.drawStringWithShadow(mc.debugInfoRenders(), 2, 12, 0xffffff);
                fontrenderer.drawStringWithShadow(mc.func_6262_n(), 2, 22, 0xffffff);
                fontrenderer.drawStringWithShadow(mc.debugInfoEntities(), 2, 32, 0xffffff);
                fontrenderer.drawStringWithShadow(mc.func_21002_o(), 2, 42, 0xffffff);
                long l1 = Runtime.getRuntime().maxMemory();
                long l2 = Runtime.getRuntime().totalMemory();
                long l4 = Runtime.getRuntime().freeMemory();
                long l5 = l2 - l4;
    			     else{
            	fontrenderer.drawStringWithShadow("Minecraft 1.0.0", 2, 2, 0xffffff);
            	ArrayList Modlist = new ArrayList();
    			
            	


    thats in the GuiIngame. i have stuck 100% to what you said to do.

    You put the else statement in the wrong spot. put it like this.
    } else {

    Then put an extra bracket after the declaration of the arraylist.
    Posted in: Tutorials
  • 0

    posted a message on [1.0.0] SimpleEnchant
    And this changes things how?
    Posted in: Minecraft Mods
  • To post a comment, please .