Don't lose focus hack
73 replies [Last post]
triddin
WoM Developer
WoM Admins
WoM Member: 16
WoM Coins: 8565

Sometimes it can be really annoying when the client application loses focus and the mouse ungrabs, or you're typing in the chat and need to alt-tab somewhere else, but if you do all you've typed will be lost. I prefer to have to press escape to lose the focus instead of it happening automatically, so here's a quick hack to remove the code that detects focus loss from working:

(This hack uses the same procedures to unpack and repack as the nofog hack, so if you're not familiar with the process, head over there first to check it out)

v.30 Update! [World of Minecraft Client 1.7.5+]

Use a hex editor to open wom_linux/lib/minecraft/com/mojang/minecraft/l.class.

Search for this piece of code (at around offset 0005060):
19 04 b4 00 fc b6 02 1e

Replace with:
00 00 00 00 00 00 00 00

Once you have finished, save and run the game.

If you do not see the minecraft folder inside wom_linux/lib that means you haven't launched the game yet.

To see a video of this process: http://www.youtube.com/watch?v=yR836ni8WaQ

charrr
WoM Member
Members
WoM Member: 850
WoM Coins: 13
sweeeeeeeet.

sweeeeeeeet.

M4TTH3W
WoM Member
Members
WoM Member: 40378
WoM Coins: -7
HEY CAN YOU TELL ME HOW TO

HEY CAN YOU TELL ME HOW TO DOWNLOAD IT PLS

st Troops
WoM Member
Members
WoM Member: 3497
WoM Coins: 5
fly

it does not seam to work i have a zip on my folder and i downloaed winzip and it dont work wat should i do ?????????????????????????

triddin
WoM Developer
WoM Admins
WoM Member: 16
WoM Coins: 8565
Rename the file

You can rename the minecraft.jar to minecraft.zip then extract it, hex edit the files, recompress and rename back to minecraft.jar.

But honestly this is a fairly advanced procedure, if you're having problems at the unzipping stage, it's not too likely that you'll be able to do the rest of the operation.

If you have some friends that are computer savvy, it might be worthwhile outsourcing this operation.

- trids

ummwat
WoM Member
Members
WoM Member: 375
WoM Coins: 13
...

Do you know how to even extract .zip files, or are you weird or something...

SIMPLE HOW TO RUN HACKS STEP BY STEP:
1: Download
2: Extract with WinRAR or WinZIP
3: Download minecraft.jar
4: Extract, place file in lib folder
5: Run run.bat file

Daedal
WoM Member
Members
WoM Member: 297
WoM Coins: 49
Don't be condescending or i

Don't be condescending or i will Have H4X remove your posts.

With love,

GolemdX
WoM Member
Members
WoM Member: 3220
WoM Coins: 5
Uh-oh (2)

SHA1 digest error for com/mojang/minecraft/k.class
after I repack into a .zip and change it back to a .jar

Not sure if it makes a difference, but that chain of code wasn't in the exact same place, mostly because my lines were longer, I guess...

triddin
WoM Developer
WoM Admins
WoM Member: 16
WoM Coins: 8565
If you get a SHA1 digest

If you get a SHA1 digest error, then you didn't follow the instructions in the linked no-fog hack for extracting and recompressing the minecraft.jar.

As per the instructions you need to remove the signature files from the META-INF folder.

Check out the instructions for details which files to remove.

stewbug
WoM Member
Members
WoM Member: 3626
WoM Coins: 5
hex editor

Which hex editor did you use?

GolemdX
WoM Member
Members
WoM Member: 3220
WoM Coins: 5
Oops

Sorry, I confused the two hacks and thought I was reading the no-fog hack for some reason.

I used GHex.

JohnnyBeCrafty
WoM Member
Members
WoM Member: 2286
WoM Coins: 2
i went to the site and put

i went to the site and put the minecraft-server.jar in the World of Minecraft folder but it doesnt work. Where do you get the original minecraft.jar on the site. please help.

ummwat
WoM Member
Members
WoM Member: 375
WoM Coins: 13
Umm...

The file minecraft-server.jar is a different file.

Here:
http://minecraft.net/client/minecraft.jar

Mizuho-chan
WoM Member
Members
WoM Member: 4148
WoM Coins: 2
For the new version, NOP 8

For the new version, Replace x4e63 with "00 00 00 00 00 00 00 00", in com/mojang/minecraft/l.class

GolemdX
WoM Member
Members
WoM Member: 3220
WoM Coins: 5
Thanks

Thanks for that tip! The main post should be updated.

EDIT: Actually, I just tried it, I can't seem to find x4e63 in l.class... I can't play Minecraft :(.

Casting Kai
WoM Member
Members
WoM Member: 1292
WoM Coins: 2
Umm...?

My little friend Java.Lang.NullPointerException decided to drop in, why is that?  (I tried the update post suggestion and the original post, it's not working.)  The string in the first post does not exist in either l.class or k.class.  I tried the adress in the last post, and it failed.

ummwat
WoM Member
Members
WoM Member: 375
WoM Coins: 13
Time

To look at the front page.

someblackguy
WoM Member
Members
WoM Member: 1894
WoM Coins: 2
Same problem

I'm using the newest minecraft.jar and trying to apply the hack to it with GHex, and I can't seem the find either values that are stated in the starting post or Mizuho-chan's post. Am I doing something wrong or is this just something many people have trouble with?

Thanks in advance

InvisiblePerson
WoM Member
Contributor
WoM Member: 446
WoM Coins: 18
You have to change your views

You have to change your views in the program.

TehButter
WoM Member
Members
WoM Member: 836
WoM Coins: 2
Values

I can never seem to find the values you are talking about. It tells me it is out of bounds when i try to search for it. Both in the no-fog and this hack... I am using Hex Workshop. Any tips on value searching?

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

Updated!

broodjekaas
WoM Member
Members
WoM Member: 6863
WoM Coins: 3
tried this for hourswhy you

tried this for hours
why you dont just upload the edited minecraft.jar to the site?

if anyone have a working minecraft.jar with working focus please send me a message

InvisiblePerson
WoM Member
Contributor
WoM Member: 446
WoM Coins: 18
Legality issues.

Because it is illegal. Notch said not to, and by law, we can't direct link (you click and you're there) or upload.

Raidho
WoM Member
Members
WoM Member: 12856
WoM Coins: 4
But you can still post a

But you can still post a Broken link, with slash or file extension missing. Lol.

Now seriously. I tried to hack the archive and repack it. Did all properly - replaced sequence with nops and deleted signatures. After repacking into jar (with jar file format) it doesn't work. Client seems refuses to use repacked minecraft.jar, effect is the same as if there wasn't any minecraft.jar (i tested this). Repacking with no changes to l.class makes it the same, so it's obviously the Repacking Method lack. I used the linux package manager and 
jar cf minecraft.jar ./minecraft
Both gives same result: failure. Please tell me which utility did you used to repack .jar .
Такие дела. Алсо, на русском мне было бы проще общаться.

InvisiblePerson
WoM Member
Contributor
WoM Member: 446
WoM Coins: 18
Well...

If you do it here, it will get removed, and if you try again, you'll be banned. Lol.

I did it in the Archive Manager, but I saved by overriding.
Если бы я знал, я бы постарался.

Raidho
WoM Member
Members
WoM Member: 12856
WoM Coins: 4
Afraid of evil cops? Noone

Afraid of evil cops? Noone actually cares, except for you. Also, there is no ban that can stop me from posting. 

I tried with archive manager, get same result, but this time i had managed to look what's inside of reassembled archive.
Archive manager wasn't supposed to follow this behavior by design, atleast i didn't expected this, so i didn't checked previous reassembled archives. Now, know how it works, reassembled archive in correct way. Now it works fine. 
Хороший хак кстати. Алсо, раз уж я больше тут никогда не появлюсь - покедова! И да, кстате, всем похуй на копирайты и прочую хуйню, так что ты бы мог спокойно выкладывать хацки, тем более что хацк игры это фуфло в сравнении с кряками к фотошопу которые лежат везде где ни поподя. Ну ты понел.

joshuam08
WoM Member
Members
WoM Member: 2133
WoM Coins: 4
I really need this because MC

I really need this because MC stuffs up on Ubuntu, but when I search for 19 04 b4 00 fc b6 02 1e.
in l.class, no results show

InvisiblePerson
WoM Member
Contributor
WoM Member: 446
WoM Coins: 18
You're not looking in the

You're not looking in the right part then. I found it.

joshuam08
WoM Member
Members
WoM Member: 2133
WoM Coins: 4
Ok, I finally found it. It

Ok, I finally found it. It didn't show in a search. Now when I try run MC, terminal just opens then closes. I can copy what it says because it closes before I Can copy it.

Zemnmez
WoM Member
Members
WoM Member: 8776
WoM Coins: 2
Obseulete?

The new file fails some sort of hash check now. What should I do?

nikalus
WoM Member
Members
WoM Member: 12617
WoM Coins: 15
question

Can someone post what line the string of code we need to change is on?

InvisiblePerson
WoM Member
Contributor
WoM Member: 446
WoM Coins: 18
http://www.worldofminecraft.c
nikalus
WoM Member
Members
WoM Member: 12617
WoM Coins: 15
It's not the script I'm

It's not the script I'm having issues with (in fact I am using that script you posted) whenever I (try to) join a server it gives me that error I posted in my thread that you locked. My suspicion is that there is a second string that is the same as the one posted by the OP and thats the one im editing. I could be wrong though.
Also I was referring to the actual minecraft.jar that has the edited l.class file.
EDIT: My OS is Ubuntu 10.04 64-bit

Masao
WoM Member
Members
WoM Member: 2504
WoM Coins: 2
I cant seem to follow this

I cant seem to follow this one as i cant find the com folder after i unpack the jar

jio
WoM Member
Members
WoM Member: 60969
WoM Coins: 2
I searched the binary

I searched the binary throughly, but can't seem to find the pointers you mentioned. Has the binaries changed?

Here are the matches for "1904", "19 04", "04b4" and "04 b4"

InvisiblePerson
WoM Member
Contributor
WoM Member: 446
WoM Coins: 18
It hasn't changed, you're in

It hasn't changed, you're in the wrong part. Read the post.

jacobdb
WoM Member
Members
WoM Member: 58359
WoM Coins: 0
any ideas how to package this in linux?

i need some help with the repacking it into a .jar file, extracting worked, but i somehow dont know how to repack in linux.

Refresh100
WoM Member
Members
WoM Member: 63880
WoM Coins: 0
Com folder?

I opened up that .jar file and all I got was thisThere was no com folder, and that was downloaded from the official site.

Refresh100
WoM Member
Members
WoM Member: 63880
WoM Coins: 0
Com folder?

I opened up that .jar file and all I got was thisThere was no com folder, and that was downloaded from the official site.

GodofAnotherWorld
WoM Member
Members
WoM Member: 82087
WoM Coins: 0
well i cant get this to work,

well i cant get this to work, im using ubuntu 10.04. heres what happens i open the minecraft-osx.sh file as always but the terminal just flashes and it doesnt open, so i opened the terminal and opened the file from there and got this error:

Exception in thread "main" java.lang.NoClassDefFoundError: Main
Caused by: java.lang.ClassNotFoundException: Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: Main. Program will exit.
and i have no idea what to do.
EDIT: nvm i got it working, i was repacking it wrong after reading raidhos post i understood what was happening and fixed it.

kapsas
WoM Member
Members
WoM Member: 20693
WoM Coins: 0
same problem

how did you repack it?
i got it working last year but cant remember how i did it

edit: disregard that, i am a dumbass

offonoff
WoM Member
Members
WoM Member: 170603
WoM Coins: 0
fix for beta

I have beta, and the directory structure and file names do not correspond to what y'all put up here.  But the lose focus issue remains.

Is there a fix for this on beta?

thanks
elliot

mraof
WoM Member
Members
WoM Member: 141866
WoM Coins: -1
I fixed that now I get:Fatal

I fixed that now I get:
Fatal error:
Error launching World of Minecraft client:
java.lang.SecurityException: SHA1 digest error for com/mojang/minecraft/l.class

MYM00
WoM Member
Members
WoM Member: 63414
WoM Coins: 2
same

i have the same problem im running Ubuntu 10.10

riley351999
WoM Member
Members
WoM Member: 184124
WoM Coins: 1
I need to know the URL????

I need to know the URL???? how do I know it and what is it

cncwarlord
WoM Member
Members
WoM Member: 211982
WoM Coins: 0
this is frustrating.

So this is a problem with notch's .jar(or mint linux), will he himself ever address it, or is that out of the question? I'm not observant enough to find the right code unfortunately.

cncwarlord
WoM Member
Members
WoM Member: 211982
WoM Coins: 0
I think the issue is in the Client

I think the issue is in the client, because when i go on with the standard minecraft.net login, I dont have the out of focus issue. It hampers building and using the World of Minecraft client, but only when I use the World of Minecraft client.(not sure if it is concidered bad forum etiquette to reply to my own post)

ChaosDuck
WoM Member
Members
WoM Member: 244719
WoM Coins: 9
Step by Step for idiots

Okay, it is really not that hard. Actually, it's simple, and you can do it in less than 3 minutes.

For any of you who are not the sharpest at computer stuff, here is a step-by-step guide. Follow it close!

1. Go to Ubuntu Software Center, and search for GHex. In the results, there should be something called "Hex Editor". Install that.

2. When it's done installing, find your wom_linux folder (That's the default name, if you renamed it, i can't help you find it...)

3. Open the wom_linux folder, then the lib folder. Now you should see 3 jar files. Boot.jar, Minecraft.jar, and World of Minecraft.jar.

4. Right click on the minecraft.jar, and click "Open with archive manager" If you don't have an archive manager, download any of your choice.

5. Then open the folders, com>mojang>minecraft.

6. Scroll down until you find the file called l.class. (notice it's an L, not capital i or the number one)

7. Drag that file to your desktop, and keep the folder open. Delete the l.class INSIDE THE FOLDER ONLY, and i repeat, INSIDE THE FOLDER ONLY.

Now right click on the l.class you have on your desktop, and click "Open with"

8. Select the "Hex Editor"

9. You should now see ALOT of numbers, lying around. We want GHex to point out the numbers we wanna edit, so go to Edit>Find.

10. Now a new windows will appear. Click the largest white box in the new window. This will make a blue-marked zero come up. Then type in exactly the number written here; 19 04 b4 00 fc b6 02 1e (Notice the last one is the number one, and then E, not L and E)

11. Now click find next, and it shoudl find the numbers in the first window. They will be marked with blue, or another color. The first number in the marked area, will be marked with a darker color. This means it's selected, and ready to be edited. Now replace all the numbers that are marked, with 0. (One 0 per number!!!)

12. Now click File>Save. This will only save to the file on the desktop.

13. We're almost done! Go to the minecraft folder (Minecraft.jar>com>mojang>minecraft) And drag the l.class from your desktop into the folder. Now you've hacked your game to work.

14. But, if you try to just launch it now, nothing will happen. there's one small step left. Go up 3 folders until your in the Minecraft.jar again. Then go to META-INF and delete the 2 files ending with .DSA and .SF

Hope this helped you, it did work for me. ALL credit goes to triddin, only thing i did was to make it more simple for people who didn't udnerstand. Happy Minecrafting!

freedomcaller
WoM Member
Members
WoM Member: 276922
WoM Coins: 1
in my experience these

in my experience these directions are slightly wrong, unless i misunderstood them. 

in the lib folder don't edit the l.class in the minecraft.jar, edit the one in the minecraft folder. no archive manager required...

i got that from the directions in the video :)

xXBearsXx
WoM Member
Members
WoM Member: 335118
WoM Coins: 3
Dosn't work.

Dosn't work.

xXBearsXx
WoM Member
Members
WoM Member: 335118
WoM Coins: 3
Doesn't work.

Doesn't work.

erkin
WoM Member
Members
WoM Member: 216230
WoM Coins: 41
1.7.5

Does not work for 1.7.5.

lolrumad
WoM Member
Members
WoM Member: 32863
WoM Coins: 12
Indeed it does not D:

Indeed it does not D:

H4X
WoM Founder
WoM Admins
WoM Member: 3
WoM Coins: 6963
UPDATED

I have updated this again to now work with the latest World of Minecraft Clients 1.7.5+

This will be incorporated into our clients soon to avoid having to do this manually.

Basuka95
WoM Member
Members
WoM Member: 261499
WoM Coins: 6
I can't fint the numbers :(

I tried this but i can't find these numbers.. Pls help me :(

Basuka95
WoM Member
Members
WoM Member: 261499
WoM Coins: 6
Ok, found the numbers, edited

Ok, found the numbers, edited them and now it works, thank you all :)

sithrebel
Contributor
Contributor
WoM Member: 124653
WoM Coins: 875
sweet thanks

sweet thanks

OmeGa_ApocAlYpse©
WoM Member
Members
WoM Member: 178637
WoM Coins: 22
Can't press enter...

Before the fix I could press enter but not after it :( Any help?

nuclearwaffle
WoM Member
Members
WoM Member: 309979
WoM Coins: 2
Error

When I did what the video said, it gave me this error when I clicked on a server:
Exception in thread "main" java.lang.VerifyError: (class: com/mojang/minecraft/l, run signature: ()V) Illegal content pool index
at com.mojang.minecraft.MinecraftApplet.init(Unknown Source)
at com.World of Minecraft.WomApplet.init(WomApplet.java:123)
at com.World of Minecraft.Wom.run(World of Minecraft.java:392)
at com.World of Minecraft.Boot.main(Boot.java:160)

TheFogX12
WoM Member
Members
WoM Member: 329362
WoM Coins: 4
This is really helpful.

This is really helpful. Thanks!

xXBearsXx
WoM Member
Members
WoM Member: 335118
WoM Coins: 3
Can't find Hex code

I can't find the hex code you described, i searched both I and L with no luck. I'm using Bliss Hex Editor. Please help!

xdmoron
WoM Member
Members
WoM Member: 144963
WoM Coins: 3
i cant find that line of code

is it because im on the newest one?

xdmoron
WoM Member
Members
WoM Member: 144963
WoM Coins: 3
i cant find that line of code

is it because im on the newest one?

winkle
WoM Member
Members
WoM Member: 109305
WoM Coins: 2
Doesn't work.

I also confirm this does not work with v2.0.5, linux.

When you left or right click it opens the menu.

It is VERY annoying.

It worked when I did it on v1.5.x.

Somebody please fix this.

Roxy_Rox13
WoM Member
Members
WoM Member: 391795
WoM Coins: 4
Why does life have to be so

Why does life have to be so confusing?!

antagonistxx
WoM Member
Members
WoM Member: 83226
WoM Coins: 2
Works...

Just wanted to thank you and report this worked flawlessly first time on v2.0.6 on Linux Mint 12 using gHex.

Since people are having issues, I've gone ahead and uploaded the edited version for v2.0.6.

http://www.woofiles.com/dl-280002-Z8wtrgQF-l.class.tar.gz

Of course, it will go in your folder:
wom_linux/lib/minecraft/com/mojang/minecraft

Don't forget to uncompress it.

Hope that helps, thanks to the World of Minecraft team. Cheers

jhz6l
WoM Member
Members
WoM Member: 404716
WoM Coins: 5
don't lose fokus

Something is wrong with your file. It cant be opened with tar -xzvf.

This is the try:
bor@radagast:~/.minecraft$ tar xzvf l.class.tar.gz 
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
The file format is ASCII text. 
bor@radagast:~/.minecraft$ file l.class.tar.gz 
l.class.tar.gz: ASCII text

jhz6l
WoM Member
Members
WoM Member: 404716
WoM Coins: 5
Thank you triddin

I succeded following the first post (have ubuntu oneiric), thx to triddin.

antagonistxx
WoM Member
Members
WoM Member: 83226
WoM Coins: 2
My bad

Wierd, yeah looks like the file has gone corrupt. Not even sure why I tar'd it anyways. Here's another link to just the class file.

I hope it works out for you

http://www.woofiles.com/dl-281099-HiTQ2g8a-l.class

will721
WoM Member
Members
WoM Member: 391831
WoM Coins: 2
Can't seem to get it to work.

Can't seem to get it to work. I am running the current version of World of Minecraft but whether I change the file myself according to the current post or use anatagonistxx's file it gives me the same thing:

Exception in thread "main" java.lang.ClassFormatError: Incompatible magic value 1013084704 in class file com/mojang/minecraft/l
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at com.World of Minecraft.Wom.run(World of Minecraft.java:225)
    at com.World of Minecraft.Boot.main(Boot.java:160)

After that it just stops and won't boot. Can I get help on this?

will721
WoM Member
Members
WoM Member: 391831
WoM Coins: 2
Still can't get it to work

Still can't get it to work here...

Iceember
WoM Member
Members
WoM Member: 467471
WoM Coins: 4
Place in further updates

Could this patch be included in further edits of the World of Minecraft Client for linux.. It is rather annoying to have to do this all by hand and have it fail multiple times...

Lucasandness
Contributor
Contributor
WoM Member: 545386
WoM Coins: 287
it will work just try

*Subject says it all*

kor10isgreat
WoM Member
Members
WoM Member: 423965
WoM Coins: -1
tar (child):

tar (child): WoMClient-x-x-x.tar.bzip2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now\

Why isn`t it working?