Fog reduction hack!
53 replies [Last post]
triddin
WoM Developer
WoM Admins
WoM Member: 16
WoM Coins: 8565

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!

H4X
WoM Founder
WoM Admins
WoM Member: 3
WoM Coins: 6963
triddin delivers again!

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

Daedal
WoM Member
Members
WoM Member: 297
WoM Coins: 49
This

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

oredds
WoM Member
Contributor
WoM Member: 2154
WoM Coins: 7
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!

sportsracer49
WoM Member
Members
WoM Member: 2243
WoM Coins: 0
How on earth did you discover

How on earth did you discover this?

triddin
WoM Developer
WoM Admins
WoM Member: 16
WoM Coins: 8565
About 18 hours of decoding

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

Towel
WoM Member
Members
WoM Member: 457
WoM Coins: 2
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
WoM Member
Members
WoM Member: 3626
WoM Coins: 5
hex editor

What type of hex editor did you use?

calcakes
WoM Member
Members
WoM Member: 9
WoM Coins: 128
excellent

 this is fantastic! well done triddin :)

skaterBH
WoM Member
Members
WoM Member: 1005
WoM Coins: 0
Hex Editor

Can someone tell me how to do this with winrar?

Casting Kai
WoM Member
Members
WoM Member: 1292
WoM Coins: 2
Okay...

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

betasword
WoM Member
Members
WoM Member: 401
WoM Coins: 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
WoM Member
Members
WoM Member: 3491
WoM Coins: 0
Rain

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

Daedal
WoM Member
Members
WoM Member: 297
WoM Coins: 49
I'm sure its possible, but

I'm sure its possible, but would increase lag

H4X
WoM Founder
WoM Admins
WoM Member: 3
WoM Coins: 6963
Updated!

Updated!

AoM_AJER
WoM Member
Members
WoM Member: 1207
WoM Coins: 0
Thanks

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

BLACKxBIRD
WoM Member
Members
WoM Member: 258
WoM Coins: 9
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
WoM Member
Members
WoM Member: 2002
WoM Coins: 1
Could...

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

BLACKxBIRD
WoM Member
Members
WoM Member: 258
WoM Coins: 9
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
WoM Member
Members
WoM Member: 1434
WoM Coins: 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
WoM Member
Members
WoM Member: 3912
WoM Coins: 3
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
WoM Member
Members
WoM Member: 3788
WoM Coins: 0
Dont understand too...

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

Superduper
WoM Member
Members
WoM Member: 13832
WoM Coins: 0
Nope

Your not allowed to release the minecraft.jar file

SoRaGu18
WoM Member
Members
WoM Member: 31870
WoM Coins: 0
Same here

Same here

Calyster Solaris
WoM Member
Members
WoM Member: 31847
WoM Coins: 8
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

Halofannr1
WoM Member
Members
WoM Member: 30999
WoM Coins: 0
O.O

Time to learn Hex......

Carocrazy132
WoM Member
Members
WoM Member: 30117
WoM Coins: 13
Anyone know how to do this in

Anyone know how to do this in the latest indev?

mallcost1
WoM Member
Members
WoM Member: 33135
WoM Coins: 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
WoM Member
Members
WoM Member: 19931
WoM Coins: 0
Is this for indev or infdev?

Is this for indev or infdev?

Pardus
WoM Member
Members
WoM Member: 27374
WoM Coins: 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.

SBPro
WoM Member
Members
WoM Member: 41864
WoM Coins: 0
??

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

ertty75
WoM Member
Members
WoM Member: 6495
WoM Coins: 1
every time i do it i just fails

ok this is what i got pls help

templar63
WoM Member
Members
WoM Member: 62237
WoM Coins: 1
same here

thats what i keep getting!!!

PLEASE HELP US!!!!!

Ziminvader
WoM Member
Members
WoM Member: 42303
WoM Coins: 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
WoM Member
Members
WoM Member: 58359
WoM Coins: 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
WoM Member
Members
WoM Member: 62344
WoM Coins: 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
WoM Member
Members
WoM Member: 62344
WoM Coins: 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
WoM Member
Members
WoM Member: 64795
WoM Coins: 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
WoM Member
Members
WoM Member: 66385
WoM Coins: 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
WoM Member
Members
WoM Member: 73099
WoM Coins: 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
WoM Member
Members
WoM Member: 46832
WoM Coins: 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
WoM Member
Members
WoM Member: 46832
WoM Coins: 0
Bump

Bump

bananamunchable
WoM Member
Members
WoM Member: 88504
WoM Coins: 0
b

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

jamesoncampus
WoM Member
Members
WoM Member: 117620
WoM Coins: 0
FAIL

Don't work with 1.20 after boo update.

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

ehek
WoM Member
Members
WoM Member: 145211
WoM Coins: 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
WoM Member
Members
WoM Member: 135879
WoM Coins: 0
Doesn't work

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

davesgrief
WoM Member
Members
WoM Member: 150819
WoM Coins: 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
WoM Member
Members
WoM Member: 31398
WoM Coins: 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
WoM Member
Members
WoM Member: 150435
WoM Coins: 0
lol..

same as ertty...

Strogie
WoM Member
Members
WoM Member: 151911
WoM Coins: 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
WoM Member
Members
WoM Member: 156576
WoM Coins: 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

sylle200
WoM Member
Members
WoM Member: 166993
WoM Coins: 0
my World of Minecraft client

... failed to run main class

Maxinova
WoM Member
Members
WoM Member: 188260
WoM Coins: 0
Beta 1.301

Does anyone know how to use this mod with the beta 1.301?

AeSix_Reficul
WoM Member
Members
WoM Member: 198837
WoM Coins: 4
Fatal Error:

Quote:
Fatal error:

Error launching World of Minecraft client:

java.lang.SecurityException: SHA1 digest error for com/mojang/minecraft/l.class

This is the error one recieves when using Notepad++ with HexEdit plugin and 7-zip to extract and re-pack the l.class file, after modification. Re-modification back to original code eases this error and allows for normal game play.

It seems mojang does not want simple hacks like this being available to those willing to break their minecraft.jar file. If there is a way to reset the SHA1 stored sum, then this would be a usable hack again.

This is beyond my limits. Perhaps someone else knows how to do so with Java?

UPDATE:
I looked at this thread http://www.worldofminecraft.com/StayFocus
and found that deleting the .SF and .DSA files in META-INF directory in minecraft.jar before re-packing the modified l.class file, works.

Steps:
1) extract l.class from minecraft.jar
2) delete .SF and .DSA files
3) modify l.class file from "11 02 00 19" to "11 14 00 19" and save
4) repack l.class into proper location
5) start World of Minecraft and play.

Again, I used 7zip for steps 1, 2 and 4; and Notepad++ with HexEdit plugin for step 3.  Both of these programs and the plugin are free, opensource, GUI programs (and for 7zip) with drag-and-drop capability.