Fog reduction hack!
53 replies [Last post]
triddin's picture
triddin
WoM Developer
WoM Admins
Joined: 08/09/2009
Last seen: 5 weeks 4 days ago
Points: 4857
0 votes

Are you like me and have a really powerful computer and want to see everything in crystal clarity, but even at maximum view distance, the fog is still annoyingly close (especially when you want to take high rez screenshots!)

Well, if you feel up to extracting and repacking your minecraft.jar, I have a solution for you.

To extract your minecraft.jar:

cd lib
md jar
cd jar
jar xvf ..\minecraft.jar

v.30 Update! When you extract you minecraft.jar, fire up a hex editor on the com\mojang\minecraft\l.class file. (Yes it has moved to a different class file)

Search for this piece of code:
11 02 00 19

-Skip gray section-

Old way for archive purposes:
When you extract you minecraft.jar, fire up a hex editor on the com\mojang\minecraft\k.class file.

At around byte 0x48b0, you'll see a sequence of bytes:
3a 09 11 02 00 19 09

The particular part that we're interested in is the 11 02 00
In java, this means:
(0x11) sipush (0x0200) 512

In this particular instance, 512 represents the maximum fog distance.

If we edit this and change the 02 to 14 (making the code read 11 14 00) the code will now read:
(0x11) sipush (0x1400) 5120

All of your fog distances will increase by 10 times. This means that the standard distances of 512, 128, 32 and 8 become now: 5120, 1280, 320 and 80.

You can also grab a calculator and work out your own new maximum distance and put its hex codes in place of the 0200 yourself to create a custom fog distance.

Repack the modified k.java into your minecraft.jar (make sure you don't include any signatures in the META-INF folder) the command line to do this would be:

del META-INF\*.DSA
del META-INF\*.SF
jar cvf ..\minecraft-new.jar *

EDIT: If you don't have the Java JDK installed, you won't have the jar utility. I have been informed that you can make do with winrar if you have it.

Have fun!

n/a
H4X's picture
H4X
WoM Founder
WoM Admins
Joined: 07/30/2009
Last seen: 3 days 11 hours ago
Points: 1399
triddin delivers again!

The game is so much clearer, never would have thought minecraft could have be so nice.

n/a
Daedal's picture
Daedal
WoM Member
Members
Joined: 08/16/2009
Last seen: 1 year 1 week ago
Points: 13
This

Combined with my skin is AMAZING. (my edited skin, which will be upped super soon!)

oredds's picture
oredds
WoM Member
Contributor
Joined: 09/12/2009
Last seen: 1 year 26 weeks ago
Points: 0
I've

just tried it out with Daedal's skins and it is epicer than epic. It is awesome. Do it Do it Do it!

oredds

sportsracer49's picture
sportsracer49
WoM Member
Members
Joined: 09/13/2009
Last seen: 1 year 18 weeks ago
Points: 0
How on earth did you discover

How on earth did you discover this?

triddin's picture
triddin
WoM Developer
WoM Admins
Joined: 08/09/2009
Last seen: 5 weeks 4 days ago
Points: 4857
About 18 hours of decoding

About 18 hours of staring at and interpreting java byte code.

n/a
Towel's picture
Towel
WoM Member
Members
Joined: 08/18/2009
Last seen: 1 year 46 weeks ago
Points: 0
subject line get

Try to talk to Notch about implementing this as an option. Tell him the code and everything, because it'd be nice to see this as official.

stewbug's picture
stewbug
WoM Member
Members
Joined: 10/13/2009
Last seen: 1 year 35 weeks ago
Points: 3
hex editor

What type of hex editor did you use?

calcakes's picture
calcakes
WoM Member
Members
Joined: 08/09/2009
Last seen: 5 days 15 hours ago
Points: 116
excellent

 this is fantastic! well done triddin :)

crepes

skaterBH's picture
skaterBH
WoM Member
Members
Joined: 08/25/2009
Last seen: 30 weeks 5 days ago
Points: 0
Hex Editor

Can someone tell me how to do this with winrar?

Casting Kai's picture
Casting Kai
WoM Member
Members
Joined: 08/30/2009
Last seen: 12 weeks 6 days ago
Points: 0
Okay...

Can somebody tell me how to do this with the new version?

betasword's picture
betasword
WoM Member
Members
Joined: 08/17/2009
Last seen: 1 year 17 weeks ago
Points: 0
I second this, as for

I second this, as for whatever reason, the values described in the first post are non-existent in the newest versions of Minecraft, and, in fact, haven't existed for several versions now.

Shorty's picture
Shorty
WoM Member
Members
Joined: 10/10/2009
Last seen: 17 weeks 6 days ago
Points: 0
Rain

Would there be a way to do the same thing for rain distance?

Daedal's picture
Daedal
WoM Member
Members
Joined: 08/16/2009
Last seen: 1 year 1 week ago
Points: 13
I'm sure its possible, but

I'm sure its possible, but would increase lag

H4X's picture
H4X
WoM Founder
WoM Admins
Joined: 07/30/2009
Last seen: 3 days 11 hours ago
Points: 1399
Updated!

Updated!

n/a
AoM_AJER's picture
AoM_AJER
WoM Member
Members
Joined: 08/28/2009
Last seen: 1 year 27 weeks ago
Points: 0
Thanks

Thanks a ton for the update, trying to get it to work with InvisiblePerson just now, the kind soul.

BLACKxBIRD's picture
BLACKxBIRD
WoM Member
Members
Joined: 08/15/2009
Last seen: 31 weeks 3 days ago
Points: 3
I increased the distance by

I increased the distance by 10 but it's too much now i only get 30-80 fps how would i increase it 5x, what would i put in in place of 02 because i don't understand why changing it to 14 increases fog distance 10x.

Pavelo's picture
Pavelo
WoM Member
Members
Joined: 09/08/2009
Last seen: 44 weeks 6 days ago
Points: 3
Could...

Could it have something to do with binary? I really don't know; twas just a guess.

BLACKxBIRD's picture
BLACKxBIRD
WoM Member
Members
Joined: 08/15/2009
Last seen: 31 weeks 3 days ago
Points: 3
Nevermind

Thanks for trying but i found a hexadecimal to decimal converter online. http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html  theres the link if anyone needs it.

cheezychicken's picture
cheezychicken
WoM Member
Members
Joined: 09/01/2009
Last seen: 3 weeks 6 days ago
Points: 8
hex is short for hexidecimal

hex is short for hexidecimal so instead of 1-10 we have 1-16, but instead of 11,12,13,14,15 we have 10,a b c d e f for the numbers... i think.... so erm 8 would be centre?

andrei's picture
andrei
WoM Member
Members
Joined: 10/18/2009
Last seen: 13 weeks 6 days ago
Points: 0
I don't understand

Sorry Triddin,but I can't understand.I extracted minecraft.jar and those four files are missing.I don't understand

lukis101's picture
lukis101
WoM Member
Members
Joined: 10/16/2009
Last seen: 1 year 5 weeks ago
Points: 0
Dont understand too...

Well im not famillar to java and stuff.. so can anyone just upload or sth the all done file? : )

Superduper's picture
Superduper
WoM Member
Members
Joined: 02/13/2010
Last seen: 42 weeks 2 days ago
Points: 0
Nope

Your not allowed to release the minecraft.jar file

I am a ninja

SoRaGu18's picture
SoRaGu18
WoM Member
Members
Joined: 05/11/2010
Last seen: 1 year 38 weeks ago
Points: 0
Same here

Same here

Calyster Solaris's picture
Calyster Solaris
WoM Member
Members
Joined: 05/11/2010
Last seen: 40 weeks 3 days ago
Points: 9
could you sned me the file

could you sned me the file already rescripted ause i dont understand how to do it and im gonna build somethin that is high of 828 block so i would like to see where im going -_-

thx for you help

STUPID &#?&$? LOW POLY MODEL IN PDF THAT MAKE YOU REWORK ALL THE #&#%?& TOWER D:<

Halofannr1's picture
Halofannr1
WoM Member
Members
Joined: 05/06/2010
Last seen: 48 weeks 3 days ago
Points: 0
O.O

Time to learn Hex......

http://www.minerwars.com/?aid=837  --- Random link to a game ...

Carocrazy132's picture
Carocrazy132
WoM Member
Members
Joined: 05/01/2010
Last seen: 42 weeks 3 days ago
Points: 7
Anyone know how to do this in

Anyone know how to do this in the latest indev?

mallcost1's picture
mallcost1
WoM Member
Members
Joined: 05/19/2010
Last seen: 1 year 14 weeks ago
Points: 0
Wow

God Triddin, You are amazing, had I tried, i would have given up in about 2.63 seconds!(Probably because i can't read Java for the life of me)

I salute you and your efforts!

gamepunkster's picture
gamepunkster
WoM Member
Members
Joined: 03/14/2010
Last seen: 1 year 33 weeks ago
Points: 0
Is this for indev or infdev?

Is this for indev or infdev?

Pardus's picture
Pardus
WoM Member
Members
Joined: 04/17/2010
Last seen: 1 year 1 week ago
Points: 0
UHHHHHH...

Well, i am new to coding and stuph, and i do not understand AT ALL what u mean by
cd lib
md jar
cd jar
jar xvf ..\minecraft.jar

How is that an explanation? Is there a youtube video to help me?
I really need this hack, but have no idea
what you are talkin' about.

DUUUH iz meh namez!

SBPro's picture
SBPro
WoM Member
Members
Joined: 07/05/2010
Last seen: 1 year 28 weeks ago
Points: 0
??

i dont get what u mean to repack k.java?

ertty75's picture
ertty75
WoM Member
Members
Joined: 11/22/2009
Last seen: 33 weeks 11 hours ago
Points: -1
every time i do it i just fails

ok this is what i got pls help

Dah

templar63's picture
templar63
WoM Member
Members
Joined: 09/05/2010
Last seen: 20 weeks 2 days ago
Points: 1
same here

thats what i keep getting!!!

PLEASE HELP US!!!!!

Ziminvader's picture
Ziminvader
WoM Member
Members
Joined: 07/08/2010
Last seen: 1 year 26 weeks ago
Points: 0
I followed this tutorial

I followed this tutorial exactly, and packed in l.class with the string "11 00 14 19" however, it did not do anything. I even deleted those file in meta-inf.

jacobdb's picture
jacobdb
WoM Member
Members
Joined: 08/29/2010
Last seen: 1 year 21 weeks ago
Points: 0
linux

any change the packaging instructions get a linux variant, because right now, its kinda near impossible to figure out to repackage the directory into a .jar file

Loggan08's picture
Loggan08
WoM Member
Members
Joined: 09/05/2010
Last seen: 17 weeks 1 day ago
Points: 3
I did exactly as the

I did exactly as the instructions, but everytime I repackage the file i get errors when starting (using winrar)

How do you repackage it?

Loggan08's picture
Loggan08
WoM Member
Members
Joined: 09/05/2010
Last seen: 17 weeks 1 day ago
Points: 3
I MADE IT WORK

Ok for the noob!

1. download WINRAR (QUICKEST WAY)
2. Download random HEX editor
3. Unpack minecraft.jar using winrar
4. Open Hex editor and find "com\mojang\minecraft" (located in C:\Documents and Settings\[USERNAME]\Application Data\.minecraft)
5. then l.class
6. search for "11 02 00 19"
7. Replace "02" with anything (dont know exactly how this part works, but i chose 14"
8. It is now "
11 02 14 19"
9. save l.class
10. delete the two files in the "META-INF" folder except the "MANIFEST.MF"
11. Highlight all folders and use winrar and save in ZIP mode. replace minecraft.zip to minecraft.jar.
12. REPLACE FILE AND ENJOY!





Does this work with alpha?

ComKat's picture
ComKat
WoM Member
Members
Joined: 09/09/2010
Last seen: 47 weeks 6 days ago
Points: 0
6. search for "11 02 00 19"7.

6. search for "11 02 00 19"
7. Replace "02" with anything (dont know exactly how this part works, but i chose 14"
8. It is now "
11 02 14 19"

replace 02, but you replace 00..
what to replace?

Murrmel5's picture
Murrmel5
WoM Member
Members
Joined: 09/11/2010
Last seen: 1 year 21 weeks ago
Points: 0
I feel stupid

I have been here for like 1,5 hours and cant get this going

I start up a hex program but i cant find the bloody  "com\mojang\minecraft"!
Can i plz get help?

Citrusz0rz's picture
Citrusz0rz
WoM Member
Members
Joined: 09/22/2010
Last seen: 1 year 19 weeks ago
Points: 0
Gosh Darnit.

Rarararara. This is quite incomprehensible to me.
I'd love if someone else had a crack at trying to show how this works. :)

Knees's picture
Knees
WoM Member
Members
Joined: 07/29/2010
Last seen: 48 weeks 9 hours ago
Points: 0
Doesn't Work

It's not in the same .class anymore, I don't think. Does anyone know what .class its in now?

Knees's picture
Knees
WoM Member
Members
Joined: 07/29/2010
Last seen: 48 weeks 9 hours ago
Points: 0
Bump

Bump

bananamunchable's picture
bananamunchable
WoM Member
Members
Joined: 10/08/2010
Last seen: 1 year 17 weeks ago
Points: 0
b

any way to make it shorter? i love minecraft but i dont want to go through that much trouble...

jamesoncampus's picture
jamesoncampus
WoM Member
Members
Joined: 11/09/2010
Last seen: 1 year 11 weeks ago
Points: 0
FAIL

Don't work with 1.20 after boo update.

There is no 11 02 00 19 in l.class. 

ehek's picture
ehek
WoM Member
Members
Joined: 12/20/2010
Last seen: 1 year 4 weeks ago
Points: 0
New question

You who are such a pro, could you find a way to see the names of every player on a server, whatever their distance and whether the're hidden or not
please i really need this thx

Joviks's picture
Joviks
WoM Member
Members
Joined: 12/05/2010
Last seen: 1 year 6 weeks ago
Points: 0
Doesn't work

I have tried it on the latest version of the client, but it doesn't work than.

davesgrief's picture
davesgrief
WoM Member
Members
Joined: 12/28/2010
Last seen: 20 weeks 2 days ago
Points: 0
WILL IT BE BAD

if i already have it lagging when the vision is on normal will it lag really bad if i do this hack?

0m3GA ARS3NAL's picture
0m3GA ARS3NAL
WoM Member
Members
Joined: 05/08/2010
Last seen: 29 weeks 3 days ago
Points: 0
Heh

My computer isn't really that great, and I usually play with small or tiny render distance, if I use this with small or tiny, will it still work, just get rid of the fog?

(Like, I can see the edges of the rendered areas, lol)

pkpikachu's picture
pkpikachu
WoM Member
Members
Joined: 12/28/2010
Last seen: 8 weeks 6 days ago
Points: 0
lol..

same as ertty...

Strogie's picture
Strogie
WoM Member
Members
Joined: 12/30/2010
Last seen: 1 year 5 weeks ago
Points: 0
I'm running Beta and I was

I'm running Beta and I was unable to find the 11 02 00 19 code in either the l.class or k.class files. Anyone know where the code is now?

killaguy56's picture
killaguy56
WoM Member
Members
Joined: 01/07/2011
Last seen: 1 year 3 weeks ago
Points: 0
need a good free hex editor

ALL OF THE HEX EDITORS THAT I FIND WANT ME TO PAY BUT I JUST WANT AN EDITOR THAT IS FREE (FOR FULL VERSION) AND WILL LET ME EDIT