Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[MOD] McRegion v5 (Optimized Saves) [1.2_02]


  • This topic is locked This topic is locked
702 replies to this topic

#1

Scaevolus

Posted 29 December 2010 - 04:49 PM

Q: What is the #1 cause of Minecraft lag?
A: Chunk updates.


This mod optimizes how chunks are stored on the disk, meaning pauses to load or save a chunk as you move around a world become much shorter and less noticeable.

The improvement is most noticeable on systems with slow disks, such as laptops. I have also had reports that it decreases memory usage of SMP servers.

Highlights:
    [*:38q1rrtm]Speed. Less jerkiness as you move around. Load, save, and delete worlds faster.
    [*:38q1rrtm]Backwards compatible. Old worlds load and are converted on-the-fly to the region format.
    [*:38q1rrtm]Backup friendly. The number of files decreases by 500-1000x, so compressing an entire world is much faster.

Download:
Client: http://mod.ifies.com...ient_1.2_01.zip
Server: http://mod.ifies.com...rver_1.2_01.zip
Conversion utility: http://mod.ifies.com.../RegionTool.jar This will let you convert your saves back to the old chunk format if an update comes out. It also lets you batch-convert a world if you have a lot of chunks and want to make sure they're all stored in region files. Normally, the conversion is done automatically in the background.
Source code: This is public domain. http://mod.ifies.com...Tool_source.zip

Back up your saves directory. I'm pretty sure it won't break anything, but you don't want to lose any of your work.

Instructions:
1) Locate your minecraft.jar file. On Windows, it's in %APPDATA%/.minecraft/bin
2) Create a backup of minecraft.jar
3) Open minecraft.jar in an archive editor (WinRar/7-Zip/etc)
4) Delete the META-INF folder.
5) Copy the files from the downloaded zip file into the jar file (overwriting nk.class).
6) Run Minecraft and test!

Server instructions: Do the same thing on minecraft_server.jar, but don't delete the META-INF folder, and use the mcregion server download.


To put all the old chunks into region files, do something like this:
java -jar RegionTool.jar pack ~/.minecraft/saves/World1

To extract all the chunks from the region files, do something like this:
java -jar RegionTool.jar unpack ~/.minecraft/saves/World1


Technical details: 90% of chunks are smaller than 4KB, and 99% are smaller than 8KB. This stores them efficiently in a single file. For a more complete description, see viewtopic.php?f=25&t=120160&p=1803041#p1803041

NOTES:
This will make a new folder "regions/" in your world directory, containing the new chunk clusters. This folder can be safely deleted if you want to revert. Any changes made to the world while using this mod will be lost, but your inventory and position will persist.

CHANGELOG:
v5 2011.01.06: Directly use Deflate streams instead of GZIP for improved speed.
v4 2011.01.02: SMP support, offline conversion utility.
v3 2010.12.30: Fix deleting worlds with regions
v2 2010.12.30:
- Fix saving and misc other bugs
- Don't use memory mapped files
- Debug output
v1 2010.12.29: First version

If you find this mod helpful, a donation towards further optimizations and my college expenses would be appreciated.
Posted Image
Optimine | McRegion (in 1.3)

Register or log in to remove.

#2

kingbdogz
    kingbdogz

    Retired Staff

  • Retired Staff
  • 781 posts

Posted 29 December 2010 - 04:50 PM

Epic fix!

Thanks man, you just made my game run 2x faster.
Posted Image

#3

Shykary
    Shykary

    Redstone Miner

  • Members
  • 595 posts
  • Location: Brazil

Posted 29 December 2010 - 05:00 PM

Thank you very much. <3
I'm gonna test it right now.

#4

KungFuHamster

Posted 29 December 2010 - 05:15 PM

Someone needs to propose this to Notch as a way to improve performance.  Unfortunately, no one with a brain is going to want to make their Minecraft maps potentially unreadable for the future in case this mod doesn't get updated quickly after every patch.

#5

Scaevolus

Posted 29 December 2010 - 05:18 PM

KungFuHamster said:

Someone needs to propose this to Notch as a way to improve performance.  Unfortunately, no one with a brain is going to want to make their Minecraft maps potentially unreadable for the future in case this mod doesn't get updated quickly after every patch.
Luckily, the format is really simple, so conversions in either direction are easy.

I'm working on a standalone utility to do conversions to address those concerns.
Optimine | McRegion (in 1.3)

#6

mooop12
    mooop12

    Stone Miner

  • Members
  • 88 posts

Posted 29 December 2010 - 05:23 PM

I got problems with sound, stuttering and all of this, but this really optimized the game. Can you fix sound?

#7

lolo500
    lolo500

    Ghast Hunter

  • Members
  • 2554 posts
  • Location: At Aramis!

Posted 29 December 2010 - 06:54 PM

DUUUUUUUUUDEEE, I LOVE YOUUUUUUU (no homo)

Thanks to you i can play minecraft again, dunno why but 5 days my minecraft started to get a lot of lag (even on tiny, 15 fps when i used to have 120), NOW I HAVE 50 FPS! (on my big city) when i play new worlds i have around 130 FPS

U ROCK! just wanted to know, are you going to update this mod in the future? to make it better so we can have even get more fps and other things?

please reply and u rock

peace out :SSSS:
Posted Image

#8

tatki82
    tatki82

    Carpenter

  • Members
  • 68 posts

Posted 29 December 2010 - 07:30 PM

omg, i love you! much faster now.
Posted Image]

#9

Yggdrasil

Posted 29 December 2010 - 09:04 PM

i would like to export the new exploring and saved .region to the normal & old little .dat files. ^^

If there a new update is coming ... the save is .. useless unless u will update this extension/plugin/mod/i dont know what i could say to it. xD

But ... Hell yeah. Minecraft runs really fast now. <3
Likely alpha before the beta comes out. :D

#10

mooop12
    mooop12

    Stone Miner

  • Members
  • 88 posts

Posted 29 December 2010 - 09:06 PM

Omg... I just noticed... After 1 hour of playing... That this doesn't work! My game now doesn't save map! The only thing that gets save is inventory... Yea great...

#11

lolo500
    lolo500

    Ghast Hunter

  • Members
  • 2554 posts
  • Location: At Aramis!

Posted 29 December 2010 - 09:13 PM

i just finished playing, after 2 hours, i built amazing things, and when i go back, bang!, nothing saved, could u please fix it?

mod is great but this bug sucks
Posted Image

#12

BoredRec
    BoredRec

    Out of the Water

  • Members
  • 9 posts

Posted 29 December 2010 - 09:23 PM

FYI, Cartographer doesn't like this mod. Added it, didn't really notice a difference in speed, still getting 13 fps on my laptop. Tried cartographer, it freaks out. I removed the mod and cartographer worked again.

In retrospect, the fact that it's causing the game to not save means that creeper that snuck up on me in my mine won't leave a lasting impression. Always gotta look for the positive side...

googie2149 said:

Seriously, what is with the maturity of this forum?
It's stuck back at indev. Nobody felt like updating it.

----

Duba said:

Well, I think doing anything except standing barefisted on top of a mob spawner with no torches makes you a pussy.

#13

iKicks
    iKicks

    Carpenter

  • Members
  • 48 posts

Posted 29 December 2010 - 09:24 PM

It didn't make anything faster for me, and it didn't save D:
Posted Image
So... I herd you liek... Creepers?

#14

Scaevolus

Posted 29 December 2010 - 11:49 PM

For people where this doesn't save, what OS are you using?
Optimine | McRegion (in 1.3)

#15

Scaevolus

Posted 29 December 2010 - 11:57 PM

BoredRec said:

FYI, Cartographer doesn't like this mod. Added it, didn't really notice a difference in speed, still getting 13 fps on my laptop. Tried cartographer, it freaks out. I removed the mod and cartographer worked again.

In retrospect, the fact that it's causing the game to not save means that creeper that snuck up on me in my mine won't leave a lasting impression. Always gotta look for the positive side...

You won't notice much of a speed difference at first when you're loading a world saved in the normal way. What OS are you using? Did you exit Minecraft normally?
Optimine | McRegion (in 1.3)

#16

Yggdrasil

Posted 29 December 2010 - 11:57 PM

Scaevolus said:

For people where this doesn't save, what OS are you using?

I test it on myself .. i wont be saved -__-


--

Win 7 x64 & java x64

#17

Scaevolus

Posted 29 December 2010 - 11:59 PM

Yggdrasil said:

Scaevolus said:

For people where this doesn't save, what OS are you using?

I test it on myself .. i wont be saved -__-


--

Win 7 x64 & java x64
I have an idea on what the problem is and how to fix it.

Could you upload a region/ directory that you get as output?
Optimine | McRegion (in 1.3)

#18

lolo500
    lolo500

    Ghast Hunter

  • Members
  • 2554 posts
  • Location: At Aramis!

Posted 30 December 2010 - 12:22 AM

Scaevolus said:

For people where this doesn't save, what OS are you using?

im using windows 7
Posted Image

#19

xhayatox

Posted 30 December 2010 - 12:28 AM

So what does this mod do exactly?
Provide the game with more smoother framerate and less lag?
And wheres the download link o_O

#20

Scaevolus

Posted 30 December 2010 - 12:32 AM

xhayatox said:

So what does this mod do exactly?
Provide the game with more smoother framerate and less lag?
And wheres the download link o_O
Hopefully, although it might not be noticeable if your computer is fast already. Speedups are of course constrained by Amdahl's law.

The download link is removed until I fix a really stupid bug.
Optimine | McRegion (in 1.3)