0

Merge branch 'master' into POI-Polylines

This commit is contained in:
Freakus Geekus
2013-03-15 22:37:09 +00:00
8 changed files with 601 additions and 372 deletions

View File

@@ -298,8 +298,8 @@ generate_pseudo_data(RenderState *state, unsigned char ancilData) {
above_level_data = check_adjacent_blocks(state, x, y+1, z, state->block);
} /* else above_level_data = 0 */
/* check connection with same level */
same_level_data = check_adjacent_blocks(state, x, y, z, 55);
/* check connection with same level (other redstone and trapped chests */
same_level_data = check_adjacent_blocks(state, x, y, z, 55) | check_adjacent_blocks(state, x, y, z, 146);
/* check the posibility of connection with y-1 level, check for air */
possibly_connected = check_adjacent_blocks(state, x, y, z, 0);

View File

@@ -158,8 +158,9 @@ get_lighting_color(RenderPrimitiveLighting *self, RenderState *state,
blocklevel = get_data(state, BLOCKLIGHT, x, y, z);
/* special half-step handling, stairs handling */
/* Anvil also needs to be here, blockid 145 */
if (block == 44 || block == 53 || block == 67 || block == 108 || block == 109 || block == 114 ||
block == 128 || block == 134 || block == 135 || block == 136) {
block == 128 || block == 134 || block == 135 || block == 136 || block == 145 || block == 156) {
unsigned int upper_block;
/* stairs and half-blocks take the skylevel from the upper block if it's transparent */
@@ -170,7 +171,7 @@ get_lighting_color(RenderPrimitiveLighting *self, RenderState *state,
upper_block = get_data(state, BLOCKS, x, y + upper_counter, z);
} while (upper_block == 44 || upper_block == 53 || upper_block == 67 || upper_block == 108 ||
upper_block == 109 || upper_block == 114 || upper_block == 128 || upper_block == 134 ||
upper_block == 135 || upper_block == 136);
upper_block == 135 || upper_block == 136 || upper_block == 156 );
if (is_transparent(upper_block)) {
skylevel = get_data(state, SKYLIGHT, x, y + upper_counter, z);
} else {

File diff suppressed because it is too large Load Diff

View File

@@ -21,6 +21,7 @@ import logging
import hashlib
import time
import random
import re
import numpy
@@ -116,7 +117,7 @@ class World(object):
# seem to be any set standard on what dimensions are in each world,
# just scan the directory heirarchy to find a directory with .mca
# files.
for root, dirs, files in os.walk(self.worlddir):
for root, dirs, files in os.walk(self.worlddir, followlinks=True):
# any .mcr files in this directory?
mcas = [x for x in files if x.endswith(".mca")]
if mcas:
@@ -490,16 +491,16 @@ class RegionSet(object):
Returns (regionx, regiony, filename)"""
logging.debug("regiondir is %s", self.regiondir)
logging.debug("regiondir is %s, has type %r", self.regiondir, self.type)
for path in glob(self.regiondir + "/r.*.*.mca"):
dirpath, f = os.path.split(path)
p = f.split(".")
x = int(p[1])
y = int(p[2])
if abs(x) > 500000 or abs(y) > 500000:
logging.warning("Holy shit what is up with region file %s !?" % f)
yield (x, y, path)
for f in os.listdir(self.regiondir):
if re.match(r"^r\.-?\d+\.-?\d+\.mca$", f):
p = f.split(".")
x = int(p[1])
y = int(p[2])
if abs(x) > 500000 or abs(y) > 500000:
logging.warning("Holy shit what is up with region file %s !?" % f)
yield (x, y, os.path.join(self.regiondir, f))
class RegionSetWrapper(object):
"""This is the base class for all "wrappers" of RegionSet objects. A