887 Commits

Author SHA1 Message Date
David Vierra
11ed48ce58 set MCAlphaDimension.parentWorld before calling MCInfdevOldLevel.__init__ to make sure the root_tag property has parentWorld set 2011-11-29 14:53:41 -10:00
David Vierra
065550a68b in generateChunkInLevel, use a set for chunks instead of recreating the list after each pass. 2011-11-29 13:00:55 -10:00
David Vierra
0b403cab02 remove the sys.modules nonsense from addYamlBlocksFromFile. It now searches YAML_ROOT, the current directory, and sys.path in that order. 2011-11-29 12:58:21 -10:00
David Vierra
3703015f86 add setup_nbt.py and setupnbt64.bat. try to import _nbt without using ImportError, in case it was built using setup_nbt.py 2011-11-29 03:39:25 -10:00
David Vierra
6ba1634796 for infinite worlds, don't share the default players list from level.py. instead, only add "Player" to the players list when the player is found in level.dat. 2011-11-29 03:37:33 -10:00
David Vierra
e71e159461 add float variant for bounding box 2011-11-26 01:32:04 -10:00
David Vierra
f31b81cfe9 rename playerOrientation to getPlayerOrientation 2011-11-26 01:31:49 -10:00
David Vierra
c50a73fb2b cacheNewVersion now has an allowDuplicate flag, used by checkForUpdates to avoid making extras of the same version 2011-11-25 17:15:47 -10:00
David Vierra
3253a5e0ec added test for createLevel() 2011-11-25 16:43:09 -10:00
David Vierra
67cb6daa30 MCServerChunkGenerator.createLevel() creates a new level by running the server on it directly.
added option to simulate the world by running the server a bit longer to generateAtPosition(). chunkMalformed errors now include the original error, chunk "filename" includes the length in sectors
2011-11-25 16:23:49 -10:00
David Vierra
4135f603c5 Added _nbt.pyx, a Cython implentation of nbt that uses extension classes and pointer arithmetic to speed up loading.
Renamed nbt.py to pynbt.py, added nbt.py as a thin loader for either _nbt.pyx or pynbt.py.
2011-11-25 16:10:39 -10:00
David Vierra
c48adf501a switch to cStringIO, clean up nbt.loadFile, add nbt.load to __all__ 2011-11-25 15:49:02 -10:00
David Vierra
7933473be3 move NBT tests to tests.py, add speed test and chunks with TileTicks 2011-11-20 15:13:42 -10:00
David Vierra
7edd6d3a5e unicode-format the log output from searching for yaml files 2011-11-19 15:39:25 -10:00
David Vierra
a7cd35af9a when finding an unused server version name, actually use the one we found 2011-11-19 15:38:55 -10:00
David Vierra
b540788f59 prepend "Alpha" or "Release" to the older and newer version numbers appropriately. 2011-11-19 15:38:27 -10:00
David Vierra
6b9176e5a8 check that javaExe was found before trying to identify new server versions 2011-11-19 15:24:09 -10:00
David Vierra
8dd5f1a135 speed up generateChunksInLevelIter when chunks is very big. add minRadius and maxRadius parameters; assume server generates at least minRadius and then attempt to copy over maxRadius chunks 2011-11-19 09:54:05 -10:00
David Vierra
0318086838 check an environment variable for where to load yaml files from, so MCEdit can change it 2011-11-19 09:52:41 -10:00
David Vierra
3f327931cc simulate the world for 15 seconds to process most of the tile ticks 2011-11-18 14:33:51 -10:00
David Vierra
43f0570c54 darkened tall grass 2011-11-17 20:43:29 -10:00
David Vierra
af4c11ea3f removed nbt_length() and data= keyword argument to TAG_*, replacing them with load_from to pass around the data cursor 2011-11-17 20:43:21 -10:00
David Vierra
4c35acb49d chain tracebacks for this ChunkMalformed exception 2011-11-17 20:42:24 -10:00
David Vierra
2809da320d which() now checks %SYSTEMROOT% (because usually it's looking for java.exe which gets installed there). for some reason, PATH is absent from environ sometimes also. 2011-11-17 20:41:58 -10:00
David Vierra
4032053d53 copyBlocksFromInfinite now has an iterator form, so copyBlocksFromIter callers can show progress 2011-11-17 20:40:45 -10:00
David Vierra
e739afa53b rearrange so __init__ is at the top of the class 2011-11-16 12:59:45 -10:00
David Vierra
6945b0185c Merge pull request #60 from chungy/master
Rewrite gametype command in mce.py
2011-11-16 09:18:13 -08:00
David Vierra
c313d25ecd add default name for dimensions 2011-11-14 10:18:09 -10:00
Mike Swanson
11aaca46a4 Change the help message to include gametype's new invokation. 2011-11-13 20:52:49 -08:00
Mike Swanson
59431458db Fix typo in a comment in my previous commit. 2011-11-13 15:30:46 -08:00
David Vierra
27ee33dd33 handle items with stack size in parens - has normal stack size but INVEdit only gives you one instead of a full stack 2011-11-12 17:45:17 -10:00
Mike Swanson
4d5a8ebe7f Refine gametype command to be more robust.
Now supports both single- and multi-player worlds, and it also
sets the player abilities added in Beta 1.9-pre5 to proper values
based on the gametype changed to.  No longer will allow flying and
invulnerable players when switching to survival mode!
2011-11-12 17:43:35 -08:00
David Vierra
9a907d34e1 added off-color leaves 2011-11-11 13:04:50 -10:00
David Vierra
2cebca596f add slot names for item-containing tile entities 2011-11-11 08:06:31 -10:00
David Vierra
c19e5a7e69 change default (absent) texture to a new pink block 2011-11-11 03:56:41 -10:00
David Vierra
76bb92324f update the internal items_txt 2011-11-11 03:56:24 -10:00
David Vierra
608af8a8e3 add known entityIDs and add Piston and Cauldron structures 2011-11-11 03:56:09 -10:00
David Vierra
04b85ee62e fix jarfile path encoding for windows, because Popen only accepts encoded strings 2011-11-10 15:01:10 -10:00
David Vierra
e1e0ae6152 use view('int8').clip(0, 15) to constrain light values more cheaply, and change the maximum() calls to use the out param to avoid extra allocations 2011-11-10 12:30:22 -10:00
David Vierra
22541f5bd4 generateLightsIter now yields more accurate progress estimates, plus progress info strings 2011-11-10 12:28:13 -10:00
David Vierra
e1c7020207 filenames may be unicode, so use unicode format strings 2011-11-10 03:28:50 -10:00
David Vierra
cf5b162d1d tempWorldCache must be keyed on both the server version and the level's seed 2011-11-10 03:28:16 -10:00
David Vierra
1a6e9c1c66 unicode-format the path to the server jar, because python won't promote the format string to unicode for us :( 2011-11-08 09:04:44 -10:00
David Vierra
ce9414ec4d fixed the name of indev diamond blocks 2011-11-08 09:04:19 -10:00
David Vierra
446a55156d fix up entities in indev levels to have TAG_Double for motion and pos, to be compatible with modern levels. (xxx do this in copyBlocksFrom?) 2011-11-06 00:34:10 -10:00
David Vierra
856c9d7bf7 update to items.txt for 1.9pre5. (Thanks, copyboy!) 2011-11-06 00:33:30 -10:00
David Vierra
ab865675c4 Don't compute skylight in The End. 2011-11-02 11:39:54 -10:00
David Vierra
7b92998368 use numpy.clip to ensure a minimum light absorption of 1. remove any extra +1 and -1 terms that previously adjusted for that minimum. 2011-11-02 11:39:31 -10:00
David Vierra
7e299b3c8c leaves' Decaying and Permanent bits were swapped 2011-11-01 00:05:10 -10:00
David Vierra
b39cb3e7e6 need to return -1 from __cmp__ to return "less than" 2011-11-01 00:04:35 -10:00