diff --git a/.gitignore b/.gitignore index ffd3ba6..522c1be 100644 --- a/.gitignore +++ b/.gitignore @@ -6,11 +6,14 @@ Minecraft_Overviewer.egg-info terrain.png cachedir* +#MCPatcher HD texture files +custom_*.png + # vim swap files .*.swp -# user-provided settings file -settings.py +# user-provided settings file as well as any variations on that name +settings*.py # header files that may be copied over, if missing ImPlatform.h diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index a1142cd..ba2c9ae 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -52,6 +52,7 @@ feature. * Ryan Hitchman * Jenny * Michael Jensen + * Johan Kiviniemi * Thomas Lake * Maciej Malecki * Ryan McCue diff --git a/docs/building.rst b/docs/building.rst index 53ea71e..7509f8f 100644 --- a/docs/building.rst +++ b/docs/building.rst @@ -44,8 +44,8 @@ recommended way of building Overviewer on 64-bit Windows using free tools. If y have bought a copy of Visual Studio, you can use it for 64-bit builds. -Prerequisits -~~~~~~~~~~~~ +Prerequisites +~~~~~~~~~~~~~ You will need a copy of the `PIL sources `_. @@ -130,6 +130,17 @@ The following script (copied into your MCO source directory) should handle every # build MCO C_INCLUDE_PATH="`pwd`/Imaging-1.1.7/libImaging" python ./setup.py build +FreeBSD +------- +FreeBSD is similar to OSX and Linux, but ensure you're using Python 2.7. The port of Python 2.6 has bugs with threading under FreeBSD. +Everything else you should need is ported, in particular math/py-numpy and graphics/py-imaging. + +You may need or want to add the line:: + + PYTHON_VERSION=2.7 + +to the file /etc/make.conf, but read the ports documentation to be sure of what this might do to other Python applications on your system. + .. _centos: CentOS diff --git a/docs/design/blockrendering/cube_parts.png b/docs/design/blockrendering/cube_parts.png index d012e0e..a8a33ab 100644 Binary files a/docs/design/blockrendering/cube_parts.png and b/docs/design/blockrendering/cube_parts.png differ diff --git a/docs/design/blockrendering/cube_sides.png b/docs/design/blockrendering/cube_sides.png index d79c443..afff784 100644 Binary files a/docs/design/blockrendering/cube_sides.png and b/docs/design/blockrendering/cube_sides.png differ diff --git a/docs/design/blockrendering/cube_top.png b/docs/design/blockrendering/cube_top.png index 8e527e0..7872878 100644 Binary files a/docs/design/blockrendering/cube_top.png and b/docs/design/blockrendering/cube_top.png differ diff --git a/docs/design/blockrendering/pixelfix.png b/docs/design/blockrendering/pixelfix.png index 34ee495..a276fd7 100644 Binary files a/docs/design/blockrendering/pixelfix.png and b/docs/design/blockrendering/pixelfix.png differ diff --git a/docs/design/blockrendering/tessellation.png b/docs/design/blockrendering/tessellation.png index 0e62d07..6f00567 100644 Binary files a/docs/design/blockrendering/tessellation.png and b/docs/design/blockrendering/tessellation.png differ diff --git a/docs/design/blockrendering/texturecubing.png b/docs/design/blockrendering/texturecubing.png index 4e8f8fb..aa221aa 100644 Binary files a/docs/design/blockrendering/texturecubing.png and b/docs/design/blockrendering/texturecubing.png differ diff --git a/docs/design/blockrendering/texturesidesteps.png b/docs/design/blockrendering/texturesidesteps.png index 3658f0b..d82bdf3 100644 Binary files a/docs/design/blockrendering/texturesidesteps.png and b/docs/design/blockrendering/texturesidesteps.png differ diff --git a/docs/design/blockrendering/texturetopsteps.png b/docs/design/blockrendering/texturetopsteps.png index d7427f4..39f4751 100644 Binary files a/docs/design/blockrendering/texturetopsteps.png and b/docs/design/blockrendering/texturetopsteps.png differ diff --git a/docs/design/cubepositionimgs/chunk_coords.png b/docs/design/cubepositionimgs/chunk_coords.png index d682df3..7fb3bbf 100644 Binary files a/docs/design/cubepositionimgs/chunk_coords.png and b/docs/design/cubepositionimgs/chunk_coords.png differ diff --git a/docs/design/cubepositionimgs/cube_horizontal_offset.png b/docs/design/cubepositionimgs/cube_horizontal_offset.png index 74893d3..25ab604 100644 Binary files a/docs/design/cubepositionimgs/cube_horizontal_offset.png and b/docs/design/cubepositionimgs/cube_horizontal_offset.png differ diff --git a/docs/design/cubepositionimgs/cube_measurements.png b/docs/design/cubepositionimgs/cube_measurements.png index 973a10e..4c65d6c 100644 Binary files a/docs/design/cubepositionimgs/cube_measurements.png and b/docs/design/cubepositionimgs/cube_measurements.png differ diff --git a/docs/design/cubepositionimgs/cube_neighbors.png b/docs/design/cubepositionimgs/cube_neighbors.png index fd69adf..8b082d4 100644 Binary files a/docs/design/cubepositionimgs/cube_neighbors.png and b/docs/design/cubepositionimgs/cube_neighbors.png differ diff --git a/docs/design/cubepositionimgs/cube_stacking.png b/docs/design/cubepositionimgs/cube_stacking.png index ae0fbaa..9c7c350 100644 Binary files a/docs/design/cubepositionimgs/cube_stacking.png and b/docs/design/cubepositionimgs/cube_stacking.png differ diff --git a/docs/design/cuberenderimgs/chunk_height.png b/docs/design/cuberenderimgs/chunk_height.png index 8b4257d..a2d5ce4 100644 Binary files a/docs/design/cuberenderimgs/chunk_height.png and b/docs/design/cuberenderimgs/chunk_height.png differ diff --git a/docs/design/cuberenderimgs/chunk_perspective.png b/docs/design/cuberenderimgs/chunk_perspective.png index 8139928..04b19ad 100644 Binary files a/docs/design/cuberenderimgs/chunk_perspective.png and b/docs/design/cuberenderimgs/chunk_perspective.png differ diff --git a/docs/design/cuberenderimgs/chunk_topdown.png b/docs/design/cuberenderimgs/chunk_topdown.png index 33bb83f..a082b64 100644 Binary files a/docs/design/cuberenderimgs/chunk_topdown.png and b/docs/design/cuberenderimgs/chunk_topdown.png differ diff --git a/docs/design/cuberenderimgs/chunk_width.png b/docs/design/cuberenderimgs/chunk_width.png index e27bcc8..7fc3730 100644 Binary files a/docs/design/cuberenderimgs/chunk_width.png and b/docs/design/cuberenderimgs/chunk_width.png differ diff --git a/docs/design/cuberenderimgs/cube_stack128.png b/docs/design/cuberenderimgs/cube_stack128.png index 03c8c3a..3045075 100644 Binary files a/docs/design/cuberenderimgs/cube_stack128.png and b/docs/design/cuberenderimgs/cube_stack128.png differ diff --git a/docs/design/lighting/light-eqn.png b/docs/design/lighting/light-eqn.png index 8b8067f..5362513 100644 Binary files a/docs/design/lighting/light-eqn.png and b/docs/design/lighting/light-eqn.png differ diff --git a/docs/design/lighting/lighting-process.png b/docs/design/lighting/lighting-process.png index 0c9c299..03a829f 100644 Binary files a/docs/design/lighting/lighting-process.png and b/docs/design/lighting/lighting-process.png differ diff --git a/docs/design/lighting/smooth-average.png b/docs/design/lighting/smooth-average.png index 03dcd47..a29921d 100644 Binary files a/docs/design/lighting/smooth-average.png and b/docs/design/lighting/smooth-average.png differ diff --git a/docs/design/quadtree/depth2addresses.png b/docs/design/quadtree/depth2addresses.png index af7c7bc..f253911 100644 Binary files a/docs/design/quadtree/depth2addresses.png and b/docs/design/quadtree/depth2addresses.png differ diff --git a/docs/design/screenshot.png b/docs/design/screenshot.png index 953b50e..dc67557 100644 Binary files a/docs/design/screenshot.png and b/docs/design/screenshot.png differ diff --git a/docs/design/tilerendering/4children.png b/docs/design/tilerendering/4children.png index b21b74e..ba03c0c 100644 Binary files a/docs/design/tilerendering/4children.png and b/docs/design/tilerendering/4children.png differ diff --git a/docs/design/tilerendering/chunkgrid.png b/docs/design/tilerendering/chunkgrid.png index 53f793d..6cdd3a7 100644 Binary files a/docs/design/tilerendering/chunkgrid.png and b/docs/design/tilerendering/chunkgrid.png differ diff --git a/docs/design/tilerendering/chunkgridwithrowcol.png b/docs/design/tilerendering/chunkgridwithrowcol.png index 6f23725..d714c3a 100644 Binary files a/docs/design/tilerendering/chunkgridwithrowcol.png and b/docs/design/tilerendering/chunkgridwithrowcol.png differ diff --git a/docs/design/tilerendering/chunkpositioning.png b/docs/design/tilerendering/chunkpositioning.png index da21b39..6e1eac3 100644 Binary files a/docs/design/tilerendering/chunkpositioning.png and b/docs/design/tilerendering/chunkpositioning.png differ diff --git a/docs/design/tilerendering/chunksintile.png b/docs/design/tilerendering/chunksintile.png index 9dc9cce..7186ef7 100644 Binary files a/docs/design/tilerendering/chunksintile.png and b/docs/design/tilerendering/chunksintile.png differ diff --git a/docs/design/tilerendering/tilegrid.png b/docs/design/tilerendering/tilegrid.png index 7164016..e78832d 100644 Binary files a/docs/design/tilerendering/tilegrid.png and b/docs/design/tilerendering/tilegrid.png differ diff --git a/docs/design/tilerendering/topofchunk.png b/docs/design/tilerendering/topofchunk.png index c67978c..d1da123 100644 Binary files a/docs/design/tilerendering/topofchunk.png and b/docs/design/tilerendering/topofchunk.png differ diff --git a/docs/front_page_screenshot.png b/docs/front_page_screenshot.png index 80f27f4..7e2d08c 100644 Binary files a/docs/front_page_screenshot.png and b/docs/front_page_screenshot.png differ diff --git a/docs/installing.rst b/docs/installing.rst index aeb41cd..878f766 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -23,8 +23,9 @@ right place! Debian / Ubuntu =============== -We provide an APT repository with pre-built Overviewer packages for Debian and -Ubuntu users. To do this, add the following line to your +We provide an APT repository with pre-built Overviewer packages for +Debian and Ubuntu users. These packages should work on any system with +a ``python2.6`` package. To do this, add the following line to your ``/etc/apt/sources.list`` :: diff --git a/overviewer_core/assetmanager.py b/overviewer_core/assetmanager.py index 51eefb4..689b560 100644 --- a/overviewer_core/assetmanager.py +++ b/overviewer_core/assetmanager.py @@ -92,6 +92,7 @@ directory. dump['worlds'] = worlds dump['map'] = dict() dump['map']['debug'] = True + dump['map']['cacheTag'] = str(int(time())) dump['map']['north_direction'] = 'lower-left' # only temporary dump['map']['center'] = [-314, 67, 94] dump['map']['controls'] = { diff --git a/overviewer_core/data/web_assets/compass_lower-left.png b/overviewer_core/data/web_assets/compass_lower-left.png index 4b0c255..7be70ab 100644 Binary files a/overviewer_core/data/web_assets/compass_lower-left.png and b/overviewer_core/data/web_assets/compass_lower-left.png differ diff --git a/overviewer_core/data/web_assets/compass_lower-right.png b/overviewer_core/data/web_assets/compass_lower-right.png index 8990e7e..bf39aed 100644 Binary files a/overviewer_core/data/web_assets/compass_lower-right.png and b/overviewer_core/data/web_assets/compass_lower-right.png differ diff --git a/overviewer_core/data/web_assets/compass_upper-left.png b/overviewer_core/data/web_assets/compass_upper-left.png index 60e12d7..370083a 100644 Binary files a/overviewer_core/data/web_assets/compass_upper-left.png and b/overviewer_core/data/web_assets/compass_upper-left.png differ diff --git a/overviewer_core/data/web_assets/compass_upper-right.png b/overviewer_core/data/web_assets/compass_upper-right.png index 6291365..f9075be 100644 Binary files a/overviewer_core/data/web_assets/compass_upper-right.png and b/overviewer_core/data/web_assets/compass_upper-right.png differ diff --git a/overviewer_core/data/web_assets/control-bg-active.png b/overviewer_core/data/web_assets/control-bg-active.png index 67fb915..ea700f5 100644 Binary files a/overviewer_core/data/web_assets/control-bg-active.png and b/overviewer_core/data/web_assets/control-bg-active.png differ diff --git a/overviewer_core/data/web_assets/control-bg.png b/overviewer_core/data/web_assets/control-bg.png index b638717..595c991 100644 Binary files a/overviewer_core/data/web_assets/control-bg.png and b/overviewer_core/data/web_assets/control-bg.png differ diff --git a/overviewer_core/data/web_assets/overviewer.js b/overviewer_core/data/web_assets/overviewer.js index 82c8896..03b50fc 100644 --- a/overviewer_core/data/web_assets/overviewer.js +++ b/overviewer_core/data/web_assets/overviewer.js @@ -1431,10 +1431,8 @@ var overviewer = { } } url = url + '.' + pathExt; - if(overviewerConfig.map.cacheMinutes > 0) { - var d = new Date(); - url += '?c=' + Math.floor(d.getTime() / - (1000 * 60 * overviewerConfig.map.cacheMinutes)); + if(typeof overviewerConfig.map.cacheTag !== 'undefined') { + url += '?c=' + overviewerConfig.map.cacheTag; } return(urlBase + url); } diff --git a/overviewer_core/data/web_assets/signpost-shadow.png b/overviewer_core/data/web_assets/signpost-shadow.png index bb2948b..77f2adf 100644 Binary files a/overviewer_core/data/web_assets/signpost-shadow.png and b/overviewer_core/data/web_assets/signpost-shadow.png differ diff --git a/overviewer_core/data/web_assets/signpost.png b/overviewer_core/data/web_assets/signpost.png index b6ba35e..21fa29c 100644 Binary files a/overviewer_core/data/web_assets/signpost.png and b/overviewer_core/data/web_assets/signpost.png differ diff --git a/overviewer_core/data/web_assets/signpost_icon.png b/overviewer_core/data/web_assets/signpost_icon.png index bcc2f1c..d9fb974 100644 Binary files a/overviewer_core/data/web_assets/signpost_icon.png and b/overviewer_core/data/web_assets/signpost_icon.png differ diff --git a/overviewer_core/googlemap.py b/overviewer_core/googlemap.py index 109f8ff..c8f7782 100644 --- a/overviewer_core/googlemap.py +++ b/overviewer_core/googlemap.py @@ -17,7 +17,7 @@ import os import os.path import stat import cPickle -import Image +from PIL import Image import shutil from time import strftime, localtime import json diff --git a/overviewer_core/src/iterate.c b/overviewer_core/src/iterate.c index 1513d0d..46ef75a 100644 --- a/overviewer_core/src/iterate.c +++ b/overviewer_core/src/iterate.c @@ -28,6 +28,7 @@ static PyObject *transparent_blocks = NULL; static PyObject *solid_blocks = NULL; static PyObject *fluid_blocks = NULL; static PyObject *nospawn_blocks = NULL; +static PyObject *nodata_blocks = NULL; PyObject *init_chunk_render(void) { @@ -74,6 +75,9 @@ PyObject *init_chunk_render(void) { nospawn_blocks = PyObject_GetAttrString(textures, "nospawn_blocks"); if (!nospawn_blocks) return NULL; + nodata_blocks = PyObject_GetAttrString(textures, "nodata_blocks"); + if (!nodata_blocks) + return NULL; block_properties = calloc(max_blockid, sizeof(unsigned char)); for (i = 0; i < max_blockid; i++) { @@ -89,6 +93,8 @@ PyObject *init_chunk_render(void) { block_properties[i] |= 1 << FLUID; if (PySequence_Contains(nospawn_blocks, block)) block_properties[i] |= 1 << NOSPAWN; + if (PySequence_Contains(nodata_blocks, block)) + block_properties[i] |= 1 << NODATA; Py_DECREF(block); } @@ -502,22 +508,30 @@ chunk_render(PyObject *self, PyObject *args) { } /* everything stored here will be a borrowed ref */ - - ancilData = getArrayByte3D(state.blockdatas, state.x, state.y, state.z); - state.block_data = ancilData; - /* block that need pseudo ancildata: - * grass, water, glass, chest, restone wire, - * ice, fence, portal, iron bars, glass panes */ - if ((state.block == 2) || (state.block == 9) || - (state.block == 20) || (state.block == 54) || - (state.block == 55) || (state.block == 79) || - (state.block == 85) || (state.block == 90) || - (state.block == 101) || (state.block == 102) || - (state.block == 113)) { - ancilData = generate_pseudo_data(&state, ancilData); - state.block_pdata = ancilData; - } else { + + if (block_has_property(state.block, NODATA)) { + /* block shouldn't have data associated with it, set it to 0 */ + ancilData = 0; + state.block_data = 0; state.block_pdata = 0; + } else { + /* block has associated data, use it */ + ancilData = getArrayByte3D(state.blockdatas, state.x, state.y, state.z); + state.block_data = ancilData; + /* block that need pseudo ancildata: + * grass, water, glass, chest, restone wire, + * ice, fence, portal, iron bars, glass panes */ + if ((state.block == 2) || (state.block == 9) || + (state.block == 20) || (state.block == 54) || + (state.block == 55) || (state.block == 79) || + (state.block == 85) || (state.block == 90) || + (state.block == 101) || (state.block == 102) || + (state.block == 113)) { + ancilData = generate_pseudo_data(&state, ancilData); + state.block_pdata = ancilData; + } else { + state.block_pdata = 0; + } } /* make sure our block info is in-bounds */ @@ -526,6 +540,9 @@ chunk_render(PyObject *self, PyObject *args) { /* get the texture */ t = PyList_GET_ITEM(blockmap, max_data * state.block + ancilData); + /* if we don't get a texture, try it again with 0 data */ + if ((t == NULL || t == Py_None) && ancilData != 0) + t = PyList_GET_ITEM(blockmap, max_data * state.block); /* if we found a proper texture, render it! */ if (t != NULL && t != Py_None) diff --git a/overviewer_core/src/overviewer.h b/overviewer_core/src/overviewer.h index b935ef4..bef0316 100644 --- a/overviewer_core/src/overviewer.h +++ b/overviewer_core/src/overviewer.h @@ -26,7 +26,7 @@ // increment this value if you've made a change to the c extesion // and want to force users to rebuild -#define OVERVIEWER_EXTENSION_VERSION 16 +#define OVERVIEWER_EXTENSION_VERSION 18 /* Python PIL, and numpy headers */ #include @@ -102,6 +102,7 @@ typedef enum SOLID, FLUID, NOSPAWN, + NODATA, } BlockProperty; /* globals set in init_chunk_render, here because they're used in block_has_property */ diff --git a/overviewer_core/src/primitives/lighting.c b/overviewer_core/src/primitives/lighting.c index 7f7b478..05a10ec 100644 --- a/overviewer_core/src/primitives/lighting.c +++ b/overviewer_core/src/primitives/lighting.c @@ -246,8 +246,8 @@ get_lighting_color(RenderPrimitiveLighting *self, RenderState *state, skylevel = getArrayByte3D(skylight, local_x, local_y, local_z); blocklevel = getArrayByte3D(blocklight, local_x, local_y, local_z); - /* special half-step handling */ - if (block == 44 || block == 53 || block == 67 || block == 108 || block == 109) { + /* special half-step handling, stairs handling */ + if (block == 44 || block == 53 || block == 67 || block == 108 || block == 109 || block == 114) { unsigned int upper_block; /* stairs and half-blocks take the skylevel from the upper block if it's transparent */ diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index f6ae8c7..88af019 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -56,7 +56,7 @@ class Textures(object): def __getstate__(self): # we must get rid of the huge image lists, and other images attributes = self.__dict__.copy() - for attr in ['terrain_images', 'blockmap', 'biome_grass_texture', 'watertexture', 'lavatexture', 'lightcolor']: + for attr in ['terrain_images', 'blockmap', 'biome_grass_texture', 'watertexture', 'lavatexture', 'firetexture', 'portaltexture', 'lightcolor']: try: del attributes[attr] except KeyError: @@ -249,6 +249,40 @@ class Textures(object): self.lavatexture = lavatexture return lavatexture + def load_fire(self): + """Special-case function for loading fire, handles + MCPatcher-compliant custom animated fire.""" + firetexture = getattr(self, "firetexture", None) + if firetexture: + return firetexture + try: + # try the MCPatcher case first + firetextureNS = self.load_image("custom_fire_n_s.png") + firetextureNS = firetextureNS.crop((0, 0, firetextureNS.size[0], firetextureNS.size[0])) + firetextureEW = self.load_image("custom_fire_e_w.png") + firetextureEW = firetextureEW.crop((0, 0, firetextureEW.size[0], firetextureEW.size[0])) + firetexture = (firetextureNS,firetextureEW) + except IOError: + fire = self.load_image("fire.png") + firetexture = (fire, fire) + self.firetexture = firetexture + return firetexture + + def load_portal(self): + """Special-case function for loading portal, handles + MCPatcher-compliant custom animated portal.""" + portaltexture = getattr(self, "portaltexture", None) + if portaltexture: + return portaltexture + try: + # try the MCPatcher case first + portaltexture = self.load_image("custom_portal.png") + portaltexture = portaltexture.crop((0, 0, portaltexture.size[0], portaltexture.size[1])) + except IOError: + portaltexture = self.load_image("portal.png") + self.portaltexture = portaltexture + return portaltexture + def load_light_color(self): """Helper function to load the light color texture.""" if hasattr(self, "lightcolor"): @@ -681,11 +715,12 @@ transparent_blocks = set() solid_blocks = set() fluid_blocks = set() nospawn_blocks = set() +nodata_blocks = set() # the material registration decorator def material(blockid=[], data=[0], **kwargs): # mapping from property name to the set to store them in - properties = {"transparent" : transparent_blocks, "solid" : solid_blocks, "fluid" : fluid_blocks, "nospawn" : nospawn_blocks} + properties = {"transparent" : transparent_blocks, "solid" : solid_blocks, "fluid" : fluid_blocks, "nospawn" : nospawn_blocks, "nodata" : nodata_blocks} # make sure blockid and data are iterable try: @@ -730,9 +765,9 @@ def material(blockid=[], data=[0], **kwargs): return func_wrapper return inner_material -# shortcut function for pure blocks, default to solid +# shortcut function for pure blocks, default to solid, nodata def block(blockid=[], top_index=None, side_index=None, **kwargs): - new_kwargs = {'solid' : True} + new_kwargs = {'solid' : True, 'nodata' : True} new_kwargs.update(kwargs) if top_index is None: @@ -746,9 +781,9 @@ def block(blockid=[], top_index=None, side_index=None, **kwargs): return self.build_block(self.terrain_images[top_index], self.terrain_images[side_index]) return inner_block -# shortcut function for sprite blocks, defaults to transparent +# shortcut function for sprite blocks, defaults to transparent, nodata def sprite(blockid=[], index=None, **kwargs): - new_kwargs = {'transparent' : True} + new_kwargs = {'transparent' : True, 'nodata' : True} new_kwargs.update(kwargs) if index is None: @@ -759,9 +794,9 @@ def sprite(blockid=[], index=None, **kwargs): return self.build_sprite(self.terrain_images[index]) return inner_sprite -# shortcut function for billboard blocks, defaults to transparent +# shortcut function for billboard blocks, defaults to transparent, nodata def billboard(blockid=[], index=None, **kwargs): - new_kwargs = {'transparent' : True} + new_kwargs = {'transparent' : True, 'nodata' : True} new_kwargs.update(kwargs) if index is None: @@ -1471,9 +1506,9 @@ def torches(self, blockid, data): # fire @material(blockid=51, data=range(16), transparent=True) def fire(self, blockid, data): - firetexture = self.load_image("fire.png") - side1 = self.transform_image_side(firetexture) - side2 = self.transform_image_side(firetexture).transpose(Image.FLIP_LEFT_RIGHT) + firetextures = self.load_fire() + side1 = self.transform_image_side(firetextures[0]) + side2 = self.transform_image_side(firetextures[1]).transpose(Image.FLIP_LEFT_RIGHT) img = Image.new("RGBA", (24,24), self.bgcolor) @@ -1716,7 +1751,7 @@ block(blockid=57, top_index=24) # crafting table # needs two different sides -@material(blockid=58, solid=True) +@material(blockid=58, solid=True, nodata=True) def crafting_table(self, blockid, data): top = self.terrain_images[43] side3 = self.terrain_images[43+16] @@ -2218,7 +2253,7 @@ def buttons(self, blockid, data): return img # snow -@material(blockid=78, data=range(8), transparent=True, solid=True) +@material(blockid=78, data=range(16), transparent=True, solid=True) def snow(self, blockid, data): # still not rendered correctly: data other than 0 @@ -2350,7 +2385,7 @@ def fence(self, blockid, data): fence_small_side = ImageEnhance.Brightness(fence_small_side).enhance(0.9) fence_small_side.putalpha(sidealpha) - # Create img to compose the fence + # Create img to compose the fence img = Image.new("RGBA", (24,24), self.bgcolor) # Position of fence small sticks in img. @@ -2430,7 +2465,7 @@ block(blockid=89, top_index=105) @material(blockid=90, data=[1, 2, 4, 8], transparent=True) def portal(self, blockid, data): # no rotations, uses pseudo data - portaltexture = self.load_image("portal.png") + portaltexture = self.load_portal() img = Image.new("RGBA", (24,24), self.bgcolor) side = self.transform_image_side(portaltexture) @@ -3013,7 +3048,7 @@ def nether_wart(self, blockid, data): # enchantment table # TODO there's no book at the moment -@material(blockid=116, transparent=True) +@material(blockid=116, transparent=True, nodata=True) def enchantment_table(self, blockid, data): # no book at the moment top = self.terrain_images[166] @@ -3058,7 +3093,7 @@ def cauldron(self, blockid, data): return img # end portal -@material(blockid=119, transparent=True) +@material(blockid=119, transparent=True, nodata=True) def end_portal(self, blockid, data): img = Image.new("RGBA", (24,24), self.bgcolor) # generate a black texure with white, blue and grey dots resembling stars