Monday, December 12, 2011

MC Modding 101: Part 2: Setting up Eclipse (WINDOWS)

Welcome back to MC Modding & Hacking 101: Part 2!

NOTE: This is not a tutorial for making mods with ModLoader, if you would like me to make one for that, make a comment about it, and I may consider doing it.

Today, I'll be showing you how to setup Eclipse for MCP. I'm going off the assumption that you have read the first part, so you have all your MCP set up and all. Now, you will only need one more thing for this tutorial, Eclipse, so head over to eclipse.org/downloads/ to and download Eclipse IDE for Java EE Developers, you don't HAVE to use Eclipse, however, I do highly recommend it, and it's what I will be using.

Once you've installed/extracted Eclipse, open up eclipse.exe (or the IDE you are using.)


The text field will start off at a different workspace, so just click the "Browse" button and direct it to your mcp__/eclipse/ folder, then hit "OK". (The good thing about MCP is that they have the workspace setup already for you, so you don't have to manually add packages, etc.)

Now, you'll see a screen pop up with "Package Explorer" on it, and 2 folders that say "Client" and "Server", if you don't want to make a server mod, you can just delete that folder. For a client mod, just click the drop down arrow on "Client", then on "src" and finally on "net.minecraft.src", and you'll see this large list of .java files.



This is the Minecraft source code (De-compiled to the best of our current ability.) You can edit and these files by double clicking on one, and then you can edit anything in the file. Another great thing about Eclipse, is these 2 buttons.


The one on the left is for debugging, and the one on the right is just play. This way, you can play with your mod, and edit things without having to recompile yet, in case you make any mistakes. With debug mode, you can actually make changes, that will occur instantly, with no need to restart the game, so you can for instance, add a block to the creative mode inventory, and then open your inventory, and it will be there without having restarted the game. Very useful buttons.

Next part, I'll show you how to actually edit the game (such as add a block or something.) and then recompile and re-obfuscate.

Thursday, December 8, 2011

MC Modding 101: Part 1: Setting up MCP (WINDOWS)

Welcome to MC Modding/Hacking 101: Setting Up MCP for Windows.
I'll teach you everything you need to know in order to start hacking and modding Minecraft.

You will also need to have Java installed, as well as JDK for your appropriate Java version. Finally, set up your System Path Variables, using this tutorial, or any other you may find. Now you are ready to go!

First off, you'll want to head over to Ocean-Labs.de and download the latest version of MCP.
This will decompile Minecraft, making it much easier to read and edit.

Next, navigate to the folder you downloaded MCP to, in my case, Downloads.












Next, using Winrar or 7Zip, extract the MCP archive.












This will create a new folder, name mcp__, of course, the blanks will be numbers. But that will vary depending on the version of Minecraft/MCP you're using.

Now, navigate to your .minecraft folder, if you've never done this before, you can find it by opening "Run" from the Windows button, and typing %appdata%.













You will now see a folder called .minecraft, open it, and Ctrl+Click the two folders named "bin" and "resources", and then copy them.
















Now, you'll want to navigate back to your MCP folder, and open the "jars" folder. Next, paste the bin and resources folders into the jars folder.



Once that is all done, you are almost ready. All you need to do is run the decompile.bat in your main MCP folder. If all goes well, you should end up with a cmd window that looks identical to this.


Now you've got your code decompiled, next thing I will teach you is how to set up MCP with Eclipse, and make a basic mod.

Thursday, November 10, 2011

How-To: Notepad, Simple "Journal" Trick

So, you want to keep a diary, (or the more manly version, a Journal or Chronicle...). Or maybe you just want to jot down notes, or thought of the day, and have them labeled with the date you took them.

Well, here is a fun, neat little trick, and all you need is Notepad.

First of we need to open Notepad.
Start > Programs > Accessories > Notepad


Next Type .LOG at the top, (in all caps), save the file, and close it.

Once you reopen it, you will see the time and date are now added to the second line.


Also, notice, that the cursor is ready on the next line.

Every time you write something new, and save it, it will automatically add the time and date to the next line.


Congrats! You may now start a digital journal on your own computer!


Monday, November 7, 2011

How-To: Screenshot Active Window

A couple of my viewers had asked me, "How do you take a screenshot of just a single window, as opposed to the whole screen..."

It is quite simple actually, and does not require any fancy programs, just a keyboard and Paint...

First, you must have the window active in the foreground, (just click on it to make it active).

Now, rather than just hitting the "Print Screen" key, located just to the right of "F12" and above "Insert", (which would take a screenshot of the whole screen), Hold down the "Alt" key and press "Print Screen".

Now to bring your screenshot to Paint.

Click Start > Programs > Accessories > Paint.


Now press "Ctrl" + "V" to paste it.

Now save the image, and there you go.  A screenshot of just the active window.

Additional Info:
-You may also Paste the screenshot into most E-mails (Depending on your application), or any other application which supports "pasting", (Microsoft Word, Photoshop, etc.)

L2Java: Java Tutorials #1; Setting Up Eclipse

So you want to learn Java? Well, You have come to the right place.  This is the first installment of L2Java, My easy to follow Step by Step guide to Java basics.

Before you begin, you will need to download Eclipse ;

For Ubuntu;

Once you have downloaded and opened it you will see a folder in it called "eclipse".


All you need to do, to extract it is, Click and drag that folder where ever you would like it (I would recommend the desktop).

Now open the folder which you had just extracted and locate the Icon which looks like this;


It will now ask for a workspace;
-Click Browse.
-Click on Desktop.
-Click Make New Folder.
-Call it Tutorials.
-Hit Enter, then hit OK.


And you are now ready to make you first program, "Hello World".

How-To: Install Eclipse - Ubuntu

Open up the "Ubuntu Software Center".

Search "Eclipse" in the quick search bar.

Click more info(Generally recommended before installing, to check ratings and reviews), then click Install
(You may be asked to enter your password).

Wait for it to complete installing, and that's all.


You may now access Eclipse, and begin working with Java.

Download and install.

Get eclipse from its official website and extract it to any directory and make it executable using chmod command.


Now extract it to the directory "/home/your_username" and make the eclipse.sh file executable using the command.
sudo chmod +x eclipse.sh

Tuesday, October 25, 2011

How-To: Ventrilo Normalization

Are peoples' volumes bothering you?  Some too loud, others not loud enough? Don't worry, we've all been there, Luckily for you there is a way to make everyone roughly the same volume, and here is how.

First off, you will need to open Ventrilo so we may set up the "normalization".

Once you have Ventrilo opened, Click on "Setup".


Next click "SFX".


Next, Make sure "Sound effects" is selected at the top, then Highlight "Compressor", and click "<-Add".


Next you will see a window with a few sliders, and values. Do not be alarmed I shall guide you through this!
(You may also scroll down to the bottom of this list if you just want the values)

-Gain: 15,
-Attack: 0.01,
-Release: 500,
-Threshold: -30,
-Ratio: 100,
-Pre-Delay: 4,



If people are still too loud, or not loud enough, all you need to do is adjust the gain to your liking.

Now all you need to do is click "OK" a few times.

And there you go, Ventrilo Normalization.