905 Commits

Author SHA1 Message Date
David Vierra
650bf8d62d add extra tags to TileEntities in Indev levels, decoding the position from the TAG_Int "Pos" to the x,y,z used in Alpha 2011-08-15 19:02:51 -10:00
David Vierra
076956dcfe fix a bad bug in Entity.Create 2011-08-15 18:49:54 -10:00
David Vierra
e2445ba8be infinite-to-infinite block copy now uses a more sensible direct copy method instead of repeated subsection import/export; refactored some code out of the finite-to-infinite function. someday change it to only use infinite-to-infinite by using the fake chunk interface on finite levels? 2011-08-15 11:25:48 -10:00
David Vierra
2613ac7ff9 ZipSchematic now remembers its materials 2011-08-15 11:22:42 -10:00
David Vierra
28fde10d27 change this to yield the new progress indicators 2011-08-14 16:32:43 -10:00
David Vierra
b327ded803 fix a completely wrong subsection count calculation 2011-08-14 10:07:49 -10:00
David Vierra
b001be05f9 in generateLights, don't call chunkChanged on the neighbors of the requested chunks; just relight them. also slightly improve the progress estimates. 2011-08-13 11:01:40 -10:00
David Vierra
85a4eb0d19 fix the non-iterator generateLights() 2011-08-13 10:00:42 -10:00
David Vierra
e75b651304 incomplete impl of ZipSchematic.saveToFile; it only saves the already saved zipfile to another file ignoring the dirty, changed chunks in memory. 2011-08-13 09:59:31 -10:00
David Vierra
e8870e76e4 add iterator-type counterparts to extractSchematic, extractZipSchematic and copyBlocksFrom to facilitate progress bars. iterators repeatedly yield a tuple of (progress, total). extract methods finally yield the extracted schematic object. 2011-08-13 09:57:59 -10:00
David Vierra
55dc972e22 add box.chunkCount 2011-08-12 19:08:47 -10:00
David Vierra
fef958d571 add base tag structures for known tile entities 2011-08-11 16:19:15 -10:00
David Vierra
1aa7ed366a copyBlocksFrom now passes the correct entities flag to copyEntitiesFrom 2011-08-10 17:30:32 -10:00
David Vierra
5e4c57a883 refactoring. create TagProperty() to create a getter+setter that automatically creates a required tag when it is absent. extract createPlayer() out of create() and getPlayerPath out of getPlayerTag 2011-08-10 17:29:39 -10:00
David Vierra
3b80ead4a7 tweak the items.txt, don't know what the parentheses mean 2011-08-08 15:38:26 -10:00
David Vierra
6cac9bb5fa added FlipVertical to blockrotation.py, called it from MCSchematic.flipVertical 2011-08-08 12:45:10 -10:00
David Vierra
887092de05 add latest items courtesy of copyboy 2011-08-05 07:06:46 -10:00
David Vierra
aab4d07776 fix bug introduced by rearranged imports 2011-08-05 06:20:52 -10:00
David Vierra
72dc4374dd change getChunks to return an iterator 2011-08-04 05:17:07 -10:00
David Vierra
aca3bf88e7 this is actually test output, not input 2011-08-04 05:16:42 -10:00
David Vierra
cb65e25c95 also sanitize grass with dirt above it. 2011-08-01 02:49:10 -10:00
David Vierra
f865c78e8d add a test for setPlayerSpawnPosition 2011-07-30 00:51:04 -10:00
David Vierra
fc42fc4ab4 add profiling scripts 2011-07-30 00:50:13 -10:00
David Vierra
55a8505d53 add entities flag to copyBlocksFrom and extractSchematic, to avoid copying entities. TileEntities are always copied with the blocks. Paintings should probably be copied with them too. 2011-07-28 22:14:28 -10:00
David Vierra
744c782b93 add expand function to BoundingBox (needs to be immutable, maybe) 2011-07-27 04:39:14 -10:00
David Vierra
7ca143a87a generateHeightmap should just call self.load() instead of checking root_tag 2011-07-27 04:38:51 -10:00
David Vierra
19daf35a9e fix the return values of getChunkSlices so when an extra tall box is requested, the offset point and slices line up properly 2011-07-27 04:38:25 -10:00
David Vierra
bab9af4c6d entity position is a TAG_Double 2011-07-24 22:36:09 -10:00
David Vierra
b664a2bf73 refactor some entity code out to entity.py 2011-07-24 14:23:27 -10:00
David Vierra
6e7c6f0ab3 create a method getRegionFile, which automatically loads a region file if present. fixes deleteChunk not deleting from unloaded regions 2011-07-24 01:13:11 -10:00
David Vierra
d74bf07343 TAG_Compound automatically wraps lists, tuples, and strings 2011-07-24 00:21:44 -10:00
David Vierra
daf593378b put the extract methods back onto MCLevel 2011-07-23 22:21:28 -10:00
David Vierra
225f813d28 put everything through pydev's code auto-formatter 2011-07-23 21:59:18 -10:00
David Vierra
6b9e82c2e4 refactor level formats out to different files, add testing framework and test files 2011-07-23 19:58:11 -10:00
David Vierra
5b39487030 don't misuse TypeError here...this is an unexpected value 2011-07-22 22:56:18 -10:00
David Vierra
2e10c3b24a extractAllChunks now saves them with "standard" gzip compression 2011-07-22 22:55:57 -10:00
David Vierra
5c56843a76 repair the shabby unit tests 2011-07-22 20:46:47 -10:00
David Vierra
f462469424 TAG_Short_Array used by cubic chunks 2011-07-22 20:34:49 -10:00
David Vierra
a6c0da238a add pretty_string method to tags for indented output 2011-07-22 20:34:36 -10:00
David Vierra
694a5b8df7 refactoring compress methods in InfdevChunk, decompress methods in MCRegionFile, added extractAllChunks to MCRegionFile, refactored preloading code in MCInfdevOldLevel 2011-07-22 20:08:07 -10:00
David Vierra
db69f5bd98 set materials for fake chunks 2011-07-11 11:54:10 -10:00
David Vierra
0e6b3cfac9 sanitize both grass and snow layer. maybe more blocks in the future. 2011-07-06 10:03:25 -10:00
David Vierra
3087fa50d8 automatically change underground grass to dirt to avoid massive lag in minecraft. 2011-07-05 12:16:04 -10:00
David Vierra
346b0aab99 add chunkIsCompressed/Dirty, clean up chunkIsLoaded 2011-06-30 14:11:49 -10:00
David Vierra
91490dfd10 add fake chunkIsCompressed/Dirty for finite levels 2011-06-30 14:11:09 -10:00
David Vierra
c496c5f0ad add fake chunkCount for fixed size levels 2011-06-30 14:10:36 -10:00
David Vierra
2cc8db124b add blocks and rotations for the new Piston blocks 2011-06-30 13:30:13 -10:00
David Vierra
dd9fab9bac playerSpawnPosition gets the world spawn by default 2011-06-16 13:47:58 -10:00
David Vierra
a5ff751de5 don't scan for sub-dimensions of an AlphaDimension in case of a messed up world folder 2011-06-15 17:07:45 -10:00
David Vierra
0fd54a2a00 need iteritems to loop through keys and values of a dict :\ 2011-06-14 15:39:49 -10:00