Minecraft 1.5 has been Released

Started by Mr. Analog, March 14, 2013, 02:20:44 PM

Previous topic - Next topic

Tom

Yeah, I was thinking of checking if there was air above them, and maybe detect longish stretches of 2 cobble. But as for widening the area around the kept chunks, I was thinking of drawing a circle of some radius around that chunk, probably two to start, then try increasing it. But it still won't keep from deleting long sections of road.
<Zapata Prime> I smell Stanley... And he smells good!!!

Mr. Analog

Kk, I just checked the wiki and it seems like in SMP the default is a 3 dimensional grid with a radius of 10 chunks is loaded around the player.

The max setting for this is 15

Roads are going to be a problem I guess, some people use cobble, some people use gravel... wacky
By Grabthar's Hammer

Tom

I'll try a few options. I do want to try seeing how hard it'd be to detect stretches of road (be they gravel or cobble). That code might not happen till tonight mind you. getting rather tired.

My sleep schedule got flipped turned upside down.... *cough* trying to straighten it out today, but I'm getting tired enough that I can't really code, and If I don't go for a nap, then I'll not get much done tonight. soooo... yeah.
<Zapata Prime> I smell Stanley... And he smells good!!!

Mr. Analog

I had to break myself out of a bad cycle by just forcing it. For a while I was going to bed at like 8 PM (or napping earlier) and getting up between 4 and 5 AM.

I'm pretty sure this was just depression but still it was getting really bad, basically I'd get up at some godless hour, surf the web, talk to some friends in weird timezones and then work, and then when I was done I was completely done, like non-functional. No games, no drawing, no nothing, just on the couch and out like a light or just actually going to bed right after dinner.

Playing D&D regularly Thursday nights forced me to be up later at least once a week and there were days where I had to brew up coffee after work just to stay awake. Then I'm not sure what happened because I gradually shifted back into normal.

I hate when that happens, it seems to happen once in a while and it makes me crazy because it feeds itself, and then my Minecraft builds suffer! :D

Speaking of which you should all visit my flying city!
By Grabthar's Hammer

Tom

Heh. Well the 3 weeks at my moms place didn't help much... I'll eventually get it sorted out.
<Zapata Prime> I smell Stanley... And he smells good!!!

Thorin

We definitely need to find a better way to recognize chunks.  Just look at my poor plane!  http://mc.tomasu.org/test/#/561/64/826/-2/0/0

What if we plant netherrack or give you a list of chunks to protect?  Either could be done by flying around...

Can you tell us the algorithm you use to determine what chunks to keep?
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

Tom

It's really basic right now. This is the first real run of the code. I don't expect it to be anywhere near useable quite yet ;)

All it does right now is look for the following blocks:

static const uint32_t keep_block_ids[] = {
BLOCK_GLASS, BLOCK_LAPIS_BLOCK, BLOCK_MUSIC, BLOCK_BED, BLOCK_POWERED_RAIL,
BLOCK_DETECTOR_RAIL, BLOCK_PISTON_STICKY_BASE, BLOCK_PISTON_BASE, BLOCK_PISTON_EXTENSION,
BLOCK_WOOL, BLOCK_PISTON_MOVING, BLOCK_GOLD_BLOCK, BLOCK_IRON_BLOCK,
BLOCK_DIAMOND_BLOCK, BLOCK_FURNACE_BURNING,
BLOCK_SIGN_POST, BLOCK_PRESSURE_PLATE_STONE, BLOCK_PRESSURE_PLATE_PLANKS,
BLOCK_REDSTONE_IDLE_TORCH, BLOCK_REDSTONE_ACTIVE_TORCH, BLOCK_PORTAL, BLOCK_REDSTONE_REPEATER_IDLE,
BLOCK_REDSTONE_REPEATER_ACTIVE, BLOCK_LOCKED_CHEST, BLOCK_FENCE_GATE,
BLOCK_ENCHANTMENT_TABLE, BLOCK_REDSTONE_LAMP_IDLE, BLOCK_REDSTONE_LAMP_ACTIVE,
BLOCK_ENDER_CHEST, BLOCK_EMERALD_BLOCK,
BLOCK_COMMAND_BLOCK, BLOCK_PRESSURE_PLATE_GOLD, BLOCK_PRESSURE_PLATE_IRON,
BLOCK_REDSTONE_COMPARATOR_IDLE, BLOCK_REDSTONE_COMPARATOR_ACTIVE, BLOCK_DAYLIGHT_SENSOR,
BLOCK_REDSTONE_BLOCK, BLOCK_HOPPER_BLOCK, BLOCK_NETHER_QUARTZ_BLOCK, BLOCK_NETHER_QUARTZ_STAIRS,
BLOCK_ACTIVATOR_RAIL
};


Then after its marked chunks with those blocks for keeping, it goes through the bitmap and enlarges the area to keep by 1 chunk around previously kept chunks.

The padding will be increased. And will fix /most/ if not all issues like the one you pointed out. I noticed a few others myself.

Posting this here was to get people to point out issues, and possible non hacky solutions. It would be nice to be able to run this at some point in the future without having people place down random blocks around the map.
<Zapata Prime> I smell Stanley... And he smells good!!!

Thorin

The problem is all the little single-chunk dots around the map.  I don't know why some of those are being selected, like: http://mc.tomasu.org/test/#/431/64/8095/-1/0/0.  Why was that one included?

As for blocks, how about including:
- stone brick blocks
- farmland blocks
-

JUNGLE TEMPLE http://mc.tomasu.org/test/#/2100/64/24/max/0/0.  Sorry, got distracted while trying to figure out what other blocks to include.

How long does it take to run?
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

Tom

Most of those dots are due to villages using glass panes that I never seen before... Others with no village, there has to be something underground that we can't see. I'm not sure what it is, maybe hidden portals, maybe a sign..

But yes, looking for stone bricks and tilled soil is a good idea as well. Though tilled soil will pick up villages again...

It takes about 5-10 minutes to run on the old map. But it's multi threaded, on this beast of a laptop of mine :D. While working on it the past few days, I realized quickly I had to thread it. It was crawling up over 20m at one point and just said "nope" and spent 20m or so to stick the main scanning in a worker queue setup. then earlier today I stuck the deleting/saving in a thread and that saved 5m or so.

Want fun? I tested loading up the entire map into ram with my tool, rather than selectively loading regions (a region is a 32x32 block of chunks). Turns out it takes more than 24GB ram to load our current map.

append: oh, and strongholds and such use a lot of stone brick...
<Zapata Prime> I smell Stanley... And he smells good!!!

Lazybones

Quote from: Thorin on May 10, 2013, 11:36:40 AM
The problem is all the little single-chunk dots around the map.  I don't know why some of those are being selected, like: http://mc.tomasu.org/test/#/431/64/8095/-1/0/0.  Why was that one included?


It looks like it found a generated mine, which would have wood, fence and rail track in it.

Looking at http://mc.tomasu.org/test/#/392/64/425/-2/0/0 the area I am familiar with it has taken out water which is OK however I know that I can see the edge of the short from my flooting house and see the edge of my other structures, so increasing the protect radius to player standard or player max chunk load would be a good idea.

Not sure why Thorins plain got chopped up since is it made of wood... that should be looked into.

Mr. Analog

Shouldn't wooden planks also be in the list (or am I blind)
By Grabthar's Hammer

Tom

Wood planks are used a lot by vanila minecraft in generating the world. I'm trying to pick out things that mc doesn't itself use/do.

At any rate, if you've placed a wood plank you want to keep, its pretty much guaranteed that you've placed something else thats in the list.
<Zapata Prime> I smell Stanley... And he smells good!!!

Tom

Quote from: Lazybones on May 10, 2013, 11:50:44 AM
Quote from: Thorin on May 10, 2013, 11:36:40 AM
The problem is all the little single-chunk dots around the map.  I don't know why some of those are being selected, like: http://mc.tomasu.org/test/#/431/64/8095/-1/0/0.  Why was that one included?


It looks like it found a generated mine, which would have wood, fence and rail track in it.

There's a reason I'm not looking for regular fence, wood planks or regular rail.
<Zapata Prime> I smell Stanley... And he smells good!!!

Tom

Hm, while adding in a simple filled circle algorithm, I noticed I got the bounds checking for the old single chunk padding code wrong. hah. probably wouldn't pad the top left edges properly. now to test the new circle fill code.
<Zapata Prime> I smell Stanley... And he smells good!!!

Lazybones

Things to look for:

Double Chests ( I think the game only generates singles but I could be wrong).
Double Doors
Iron doors
Buttons / Toggle switches?
Ladders?
Steps of any kind or maybe of specific materials? I guess those are used in villages... don't think they are used in any underground structures
Furnace (found in villages but also in the most basic of player homes.