Jump to content

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

Chunks Removal tool [command line]


  • Please log in to reply
25 replies to this topic

#1

Yogoda
    Yogoda

    Zombie Killer

  • Members
  • 192 posts

Posted 13 October 2010 - 10:03 PM

This tool allows you to remove all chunks outside a circle, very useful when your map has been heavily explored, making your world file size explode. Only a circle shape is supported for now, but you can move the center. You can also choose to remove only what is inside the circle.

It is in java with command line, so unlike most other programs you can execute it directly on your Linux server. Works very nicely with BIG maps, as it doesn't load the map in memory.

It also works with Windows.

Make a copy of your map before trying it ! Use at your own risks !
Download : http://dl.dropbox.co...unksRemoval.jar

Put it in your world folder, et execute it from here in command line (cd to change directory)

Parameters :

Mincraft chunk removal : remove chunks inside or outside a circle
-s : statistics only (no removal)
-r [radius] : specify radius in blocks
-o [x block coord] [z block coord] : optional, center of the circle
-i : invert (remove chunks inside the circle)


Before : my map has been explore griefed
Posted Image

Output with statistics
Posted Image

After use of ChunksRemoval, only the area inside the circle remains
Posted Image

Gain : from 151mb to 70mb :)

After using it, it would be wise to install the borderland plungin for Hey0 :D (if you are using Hey0's mod)
http://forum.hey0.ne...opic.php?id=260

Credits to BeeTLe BeTHLeHeM for part of the code (chunk names conversions) : viewtopic.php?f=25&t=26068

keywords : remove chunk, remove chunks, chunk delete, chunks delete

Register or log in to remove.

#2

Yogoda
    Yogoda

    Zombie Killer

  • Members
  • 192 posts

Posted 14 October 2010 - 07:52 AM

My players report empty chests, could it be a result of the chunks removal ?

Edit* All is fine ...

#3

sturmeh
    sturmeh

    Forum/Wiki Sponsor

  • Curse Premium
  • 264 posts

Posted 14 October 2010 - 07:54 AM

This works very will with borderlands plug-in for Hey0's mod!

http://forum.hey0.ne...opic.php?id=260

Use the same radius and set it to use radius only.
Using Hey0's Server Mod (Plug-in List) w/ WorldGuard.
Please consider donating if you appreciate my work! :D

#4

Yogoda
    Yogoda

    Zombie Killer

  • Members
  • 192 posts

Posted 14 October 2010 - 08:05 AM

sturmeh said:

This works very will with borderlands plug-in for Hey0's mod!

http://forum.hey0.ne...opic.php?id=260

Use the same radius and set it to use radius only.

Thanks but not everyone use Hey0 mod. I did create my own borderlands plug-in with smp api that works very well, players are not allowed to exit the circle.

The problem is to remove all the chunks created before a plugin is installed ;) That's what my tool do.

#5

Yogoda
    Yogoda

    Zombie Killer

  • Members
  • 192 posts

Posted 15 October 2010 - 01:34 PM

sturmeh said:

This works very will with borderlands plug-in for Hey0's mod!

http://forum.hey0.ne...opic.php?id=260

Use the same radius and set it to use radius only.

Sorry, I first thought you were telling my tool is useless as you can prevent expansion with your plugin. Yes, both tools work very well together :Glass:

Btw switching soon to Hey0 so I will use your plugin too :Glass:

#6

sturmeh
    sturmeh

    Forum/Wiki Sponsor

  • Curse Premium
  • 264 posts

Posted 15 October 2010 - 02:51 PM

Hehe, yeah I have a lot of players who wanted something like this, especially because it's just wasted data outside the border. :P
Using Hey0's Server Mod (Plug-in List) w/ WorldGuard.
Please consider donating if you appreciate my work! :D

#7

Yogoda
    Yogoda

    Zombie Killer

  • Members
  • 192 posts

Posted 15 October 2010 - 04:18 PM

Hey, you could integrate it into your plugin and add a special command :P Feel free to decompile it, or ask me for the code :GoldBar:

#8

soji
    soji

    Stone Miner

  • Members
  • 73 posts

Posted 15 October 2010 - 10:48 PM

where's the default middle of circle? /spawn from hey0 mod?

#9

Yogoda
    Yogoda

    Zombie Killer

  • Members
  • 192 posts

Posted 16 October 2010 - 11:31 AM

No, it is the coordinate (0,0) so it is when you spawn the first time you enter the world.

If you moved the spawn point with /setspawn, then you have to move the origin with -o

#10

Keii
    Keii

    Tree Puncher

  • Members
  • 33 posts
  • Location: Singapore
  • Minecraft: Keii

Posted 16 October 2010 - 04:21 PM

Very useful tool. Definitely bookmarking this for future reference, for when my own server map grows beyond my limit of upkeep. :D

#11

Shadowdane

Posted 21 October 2010 - 01:12 AM

Thank you soo much for this...    worked great on my world that had grown to 350MB recently.

#12

Shocks
    Shocks

    Tree Puncher

  • Members
  • 32 posts
  • Location: Cincinnati, OH

Posted 25 October 2010 - 05:51 PM

I am having an issue with my map EXPLODING from 60-70 megs to 1.53 gigs... This will help a immensely with trimming it down and figuring out if there is a greater issue with the map instead of just wiping the whole thing.

#13

Kainzo
    Kainzo

    Glowstone Miner

  • Curse Premium
  • Curse Premium
  • 3864 posts
  • Minecraft: Kainzo

Posted 04 November 2010 - 04:28 PM

Thanks for this link Joeyy! appreciated it.

#14

Shadowdane

Posted 05 November 2010 - 08:24 PM

Wanted to just post a pic...  yah this worked great on my server after the boo updated.   Everyone went out looking for Biomes and made the world files insanely large.  Which was causing some problems with doing server renders & regular backups.

The tool worked great and is easy to use!   Here is a pic of my world after being cropped:
Posted Image

#15

Yogoda
    Yogoda

    Zombie Killer

  • Members
  • 192 posts

Posted 12 November 2010 - 01:32 PM

Great to see the tool is useful :)

I plan to merge it with my BackupArea plugin for hey0, so we can define the area(s) ingame !

#16

Unclean009

Posted 17 November 2010 - 03:03 AM

When I try and run this I get
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2 
at chunksremoval.Chunks.chunkCoordsFromFileName(Chunks.java:56)
at chunksremoval.Main.main(Main.java:116)


#17

Yogoda
    Yogoda

    Zombie Killer

  • Members
  • 192 posts

Posted 17 November 2010 - 10:03 AM

Unclean009 said:

When I try and run this I get
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2 
at chunksremoval.Chunks.chunkCoordsFromFileName(Chunks.java:56)
at chunksremoval.Main.main(Main.java:116)

It seems you have files in your world chunks directories that are not chunk files. I will add an exception handling for those.

#18

GmK
    GmK

    Carpenter

  • Members
  • 53 posts
  • Minecraft: GmK

Posted 17 November 2010 - 10:45 AM

You are a legend!

All the last two weeks I was wondering if there is any way to make a circled map, and I didn't find any possibility.

And now, thanks to the bumps, I discovered this. Will try it out later. Thank you for this!

#19

dillseed

Posted 20 November 2010 - 03:16 PM

i'm trying to run this on my server and i seem to be having a bit of an issue

i copy the jar into the 'world' folder (mines named nomnom because of the server apparently). I then execute the following

java ChunksRemoval.jar -s -r 500 -o 134.5 118.5

and it says

Exception in thread "main" java.lang.NoClassDefFoundError: ChunksRemoval/jar
Caused by: java.lang.ClassNotFoundException: ChunksRemoval.jar
        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:319)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)

any ideas?

#20

dillseed

Posted 21 November 2010 - 02:21 PM

I found the solution

i had to change the command like to say

"java -jar blahblahblah"

all set, thanks =)