735 Commits

Author SHA1 Message Date
David Vierra
ea80eefc1b unused method 2011-08-31 11:19:50 -10:00
David Vierra
d7e1e88dc0 rename ServerJarCache to ServerJarStorage. clean up code, use readProperties and writeProperties to handle server.properties, allow generation in the Nether 2011-08-31 08:32:25 -10:00
David Vierra
05cd068104 rename ServerJarCache to ServerJarStorage, allow MCEdit to override the default ServerJarStorage.cacheDir location, check that items in the worldCacheDir are directories before using rmtree on them, set allow-nether to false in the server properties (nether support here is unfinished), MCServerChunkGenerator won't overwrite existing chunks 2011-08-25 10:30:08 -10:00
David Vierra
6f035c4aaa more work on server-based generation: use hashes instead of version numbers, clear the world cache via listdir, put readmes into the two folders, fix compatibility with older servers 2011-08-23 08:27:53 -10:00
David Vierra
675f814b78 logical error 2011-08-23 03:57:46 -10:00
David Vierra
42847692d3 luckily windows takes forward slashes xxxxx 2011-08-23 03:53:43 -10:00
David Vierra
469319feee added a daring terrain generator that calls on minecraft_server.jar, stores multiple versions of the server in an app support folder - each in a folder named with the version number (can be used to store modded servers too), and caches the results of a version/seed combo in the temp folder.
also provides a clearWorldCache method to delete the generation results and automatically moves unfoldered minecraft_server*.jar files found in the server versions folder into named folders by reading the version info from the server output
2011-08-23 03:27:22 -10:00
David Vierra
d015d30228 add a function to expand a box to chunk boundaries 2011-08-21 07:28:03 -10:00
David Vierra
d2f6092b47 finally rename materials to alphaMaterials 2011-08-21 07:27:03 -10:00
David Vierra
7c000cf3b7 more accurate progress bars for light calc 2011-08-21 07:26:40 -10:00
David Vierra
deb20c8f13 there's no real need to regen the heightmap and fill skylight here, since MCEdit doesn't use setBlockAt by itself. 2011-08-21 07:26:23 -10:00
David Vierra
da98275cf8 if extractSchematicFromIter doesn't yield anything, then i won't be set 2011-08-19 14:40:12 -10:00
David Vierra
cab1900f1b move adjustExtractionParameters to schematic.py, remove some dead code, rearrange and regroup some base code, add # --- Outline Annotations --- visible in eclipse and maybe other editors 2011-08-17 19:28:19 -10:00
David Vierra
f165035cfa FakeChunk now inherits from EntityLevel, so it has getEntitiesInBox and other methods 2011-08-17 17:02:06 -10:00
David Vierra
827ed93e24 move getChunks up to MCLevel to be with the fake chunk interface 2011-08-17 15:07:03 -10:00
David Vierra
8fc517e375 reduce the input volume of these unit tests so they run in a second or less 2011-08-17 00:42:34 -10:00
David Vierra
74ad6ffd76 add material type to Schematic.__str__ 2011-08-17 00:42:12 -10:00
David Vierra
1d8d0c1541 re-encode Indev TileEntity positions, assuming the game will discard the Alpha x,y,z positions 2011-08-17 00:41:31 -10:00
David Vierra
2e21636b39 clear _fakeEntities when entities/tileentities are changed. could be better, but this is only used to update entity markers when editing indev levels... 2011-08-17 00:40:10 -10:00
David Vierra
be61c5c768 call the right pos() for the entity type...this is stinky 2011-08-17 00:27:59 -10:00
David Vierra
5ddcd6bb40 copyEntitiesFromInfiniteIter now accepts the 'entities' argument, telling it when to copy both entities and tileentities.... xxx find a way to compose functions that operate on chunk-slices 2011-08-17 00:27:26 -10:00
David Vierra
3cc5f77874 move the code for replacing existing tile entities from MCInfdevOldLevel to EntityLevel 2011-08-17 00:24:41 -10:00
David Vierra
99f20ebfc5 remove the automatic recompress in getChunkSlices to avoid decompress thrashing; xxx get to work on a LRU cache or something! 2011-08-16 15:16:49 -10:00
David Vierra
e4f522e2a2 add method addEntities() 2011-08-16 15:16:01 -10:00
David Vierra
d1ad50724a remove the explicit compress() because getChunkSlices() will call it 2011-08-16 13:40:51 -10:00
David Vierra
cb2dd8e746 raise PlayerNotFound when trying to get "Player" from a multiplayer world 2011-08-16 13:40:08 -10:00
David Vierra
f7122848ae only sanitize blocks on the first compress; don't decompress only to resanitize, since we assume the blocks haven't been touched if we're still compressed 2011-08-16 13:39:17 -10:00
David Vierra
2a4e0435a0 refactor base entity code into an EntityLevel subclass and derive Indev/Infdev levels and MCSchematic from it. remove the hasEntities flag. 2011-08-16 13:38:30 -10:00
David Vierra
9127ee0ff5 remove the unused entitiesAt 2011-08-15 19:04:30 -10:00
David Vierra
ae18928064 print a more informative keyerror 2011-08-15 19:03:00 -10:00
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