David Sowder
2ce12c23b3
pyflakes helped fixes: cachefunc.py: resolve function redefinition
2012-03-04 16:44:47 -06:00
David Sowder
2900d1d0b8
pyflakes helped fixes: tests.py: don't assign clearly unused variables
2012-03-04 10:23:55 -06:00
David Sowder
b0560e9e7d
__init__.py: adjust mclevel imports to import appropriately from mclevelbase instead so that 'import pymclevel' works as expected
2012-03-04 10:17:26 -06:00
David Sowder
32c827da6e
pyflakes helped fixes: mclevelbase.py: unravel import all of entity, faces, materials, nbt and numpy modules, none of which were actually used directly
2012-03-04 10:09:35 -06:00
David Sowder
29859b71ee
pyflakes helped fixes: schematic.py: unravel import all of indev, infiniteworld, java, level, mclevelbase, pocket and schematic modules
2012-03-04 09:53:13 -06:00
David Sowder
3f81306c89
pyflakes helped fixes: schematic.py: unravel import all of mclevelbase module
2012-03-04 09:41:10 -06:00
David Sowder
8dc12e418e
pyflakes helped fixes: pocket.py: unravel import all of mclevelbase module
2012-03-04 09:29:21 -06:00
David Sowder
f3648cadcd
pyflakes helped fixes: tests.py: unravel import all of numpy and pymclevel modules
2012-03-04 09:20:06 -06:00
David Sowder
fb6b4aa05a
pyflakes helped fixes: level.py, tests.py: unravel import all of mclevelbase module in level.py and fix a few unravel related issues with tests.py
2012-03-04 09:04:53 -06:00
David Sowder
3aac456cf5
pyflakes helped fixes: java.py: unravel import all of mclevelbase module
2012-03-04 08:45:07 -06:00
David Sowder
b43979c12c
Fix the missing itertools imports after the itertools import was removed from mclevelbase.py, which is import all'ed in a lot of other files
2012-03-04 08:18:27 -06:00
David Sowder
5d24b96138
Merge branch 'master' of github.com:zothar/pymclevel into pyflakes
2012-03-04 08:14:25 -06:00
Tyler Kennedy
a2581a31c7
Merge pull request #77 from mathuin/master
...
Changed nbt.py to use logging module instead of print
2012-02-29 12:39:08 -08:00
Jack Twilley
b883010e4e
Changed nbt.py to use logging module instead of print
...
The accelerated NBT module information best serves the user when
it can be prioritized appropriately. By using the logging module,
the user can be informed of the state of the module while debugging
their code but not bothered with it when log levels are set higher.
2012-02-29 11:04:45 -08:00
David Sowder
4ae04dbaeb
pyflakes helped fixes: infiniteworld.py: unravel import all of mclevelbase module
2012-02-27 19:04:50 -06:00
David Sowder
9cb13d4f22
pyflakes helped fixes: indev.py: unravel import all of mclevelbase module
2012-02-27 18:25:02 -06:00
David Sowder
6d6f6ca3e9
materials.py: explicitly import the items needed from the faces module
2012-02-27 18:07:51 -06:00
David Sowder
c4e98d7384
explicitly import getLogger from the logging module, which in some places was relying on the import of all of the mclevelbase module into the local namespace
2012-02-27 17:17:20 -06:00
David Sowder
0b146ea4ad
entity.py: remove import all of the nbt module in favor of using the already imported nbt module namespace
2012-02-27 16:56:56 -06:00
Tyler Kennedy
d6a5a9a105
Merge pull request #76 from zothar/master
...
PEP8 compliance changes, some initial pyflakes fixes and gitignore the ENV directory
2012-02-26 19:40:25 -08:00
David Sowder
a2364dc3c0
pyflakes result fix: local variable is assigned to but never used
2012-02-26 16:31:14 -06:00
David Sowder
150e6f9485
Both add imports and fix a wrong PEP8 edit identified by running 'python tests.py'
2012-02-26 15:46:49 -06:00
David Sowder
1a2ecc5c41
pyflakes result fix: imported but unused
2012-02-26 15:06:41 -06:00
David Sowder
c681391335
pep8 compliance changes missed because I forgot I was looking at a subset of the hits earlier
2012-02-26 14:41:17 -06:00
David Sowder
4270a929d7
pep8 compliance changes and gitignore the ENV directory
2012-02-26 13:47:58 -06:00
David Vierra
d0784287b8
Create new Anvil chunks with a TAG_Int_Array for the HeightMap array
2012-02-19 16:39:56 -10:00
David Vierra
06c2168eed
pynbt: Catch and ignore both zlib.errors and IOErrors which may be thrown when trying to decompress data.
2012-02-18 21:25:06 -10:00
David Vierra
710d078bd5
Added Jungle Leaves
2012-02-18 19:26:14 -10:00
David Vierra
303c604c49
Anvil format support (as it appears in 12w07)
...
A height of 256 is hard-coded for Anvil worlds (version == 19133). The AnvilChunk class emulates an old extended height chunk by swapping axes and stacking the chunk sections vertically.
The chunk compress/decompress thing really got in the way here. Compressed (unsaved) chunks should be stored separately instead of as a state of InfdevChunk.
2012-02-18 19:25:59 -10:00
David Vierra
f66254c71c
_nbt.pyx supports the TAG_Int_Array type now. testAnvilChunk tests the int array by modifying a single Anvil chunk's HeightMap.
2012-02-17 15:14:02 -10:00
David Vierra
da517f5e88
Add a simple test case for Anvil worlds
2012-02-16 17:37:53 -10:00
David Vierra
8d9660d297
Add the new TAG_Int_Array to _nbt.pyx
2012-02-16 17:36:43 -10:00
David Vierra
1da12872af
Formally depend on pyyaml instead of pasting it in. This way pyyaml gets linked to libyaml if present, speeding it up.
2012-02-13 14:44:51 -10:00
David Vierra
ddd59bacbd
don't load user's levels in tests, load the temp level instead
2012-01-16 22:17:51 -10:00
David Vierra
f0d1eec483
testRecompress now checks its work more thoroughly
2012-01-16 01:55:09 -10:00
David Vierra
79913eee7d
some code from activestate, might be cool later
2012-01-15 04:36:12 -10:00
David Vierra
b135d7693f
rename chunkFilename arguments, move chunkFilenameAt nearby
2012-01-12 15:40:43 -10:00
David Vierra
745d1c41c0
remove 725 unnecessary semicolons
2012-01-12 15:27:44 -10:00
David Vierra
8fac69ebbb
remove redundant parentheses
2012-01-09 21:32:26 -10:00
David Vierra
62c4fc43a8
extractHeights now returns a uint16 type array to avoid overflow problems
2012-01-07 16:15:10 -10:00
David Vierra
0bf8f1f74b
PocketWorld.getChunk raises ChunkNotPresent for chunks outside of PE's current bounds (instead of returning the same chunks modulo 32)
2012-01-06 21:59:16 -10:00
David Vierra
639f32b8e5
Move chunkChanged and genFastLights to a new class, LightedChunk. PocketChunk now inherits from LightedChunk. ChunkBase now has dirty and needsLighting flags. PocketWorld respects dirty flags on its chunks.
2012-01-06 21:59:09 -10:00
David Vierra
448de43e64
move dirty and needsLighting to ChunkBase so PocketChunk inherits them
2012-01-06 14:23:09 -10:00
David Vierra
751f190274
Import error messages now explain that NBT acceleration is not available, and gives tips on how to enable it by getting pyximport working.
2012-01-03 12:18:40 -10:00
David Vierra
167f7e960c
Pass numpy's include dir to pyximport.install() to fix "error: numpy/arrayobject.h: No such file or directory".
2012-01-03 12:05:24 -10:00
David Vierra
5687de8f36
Tell distutils to add numpy's include dir to the list of include paths.
2011-12-27 17:09:47 -10:00
David Vierra
ab070934e1
changing a chunk's TerrainPopulated bit now marks the chunk dirty
2011-12-25 08:38:19 -10:00
David Vierra
26aacd8265
create a ChunkBase class with attrs common to FakeChunk, InfdevChunk, and PocketChunk
2011-12-24 07:18:32 -10:00
David Vierra
de8dd71ee2
extractHeights always returns a heightmap without its axes swapped. Instead, computeChunkHeightMap swaps the axes and handles filling in a chunk's existing HeightMap array.
2011-12-23 11:07:58 -10:00
David Vierra
3e1520ee02
Import level classes where they're needed instead of in mclevelbase.py. This lets us run each file individually, e.g. for doctests.
2011-12-22 11:55:49 -10:00