-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added JavaRawLevel classes and fixes (#356)
* Added empty Java classes * Renamed Java raw module * Moved Java Raw modules This is now grouped in with the normal level modules * Added DimensionID alias * Added some chunk handle methods * Added first pass of JavaRawDimension The encoded and decode functions are now methods of the JavaRawDimension class * Added Java raw chunk alias * Added the first pass of the Java raw level class * Changed thread safety doc This method does not invalidate anything in this class. * Added java raw dimension implementation * Moved the implementation back to the cpp file * Updated nbt dependency * Added WIP level class * Updated nbt dependency * Added java raw wrappers * Renamed getters * Added export symbol * Extended JavaRawLevel wrapper * Cast to shared_ptr pybind11 does not seem to cast to the correct holder type automatically. * Construct unique_ptr in place The old version had an unnecessary move. * Fixed incorrect variable * Added get_level_name implementation * Changed data_version signatures * Added lock docstrings * Renamed mutex getter * Renamed mutex getter * Made all_chunk_coords const * Added JavaRawDimension wrapper * Improved threading * Changed to shared lock * Modified docstrings * Added docstrings * Added a public lock to IdRegistry * Improved docstrings * Add return type to signal wrapper * Extended the JavaRawLevel class Implemented open and close. Added reload method. Added signals. Implemented metadata getters and setters. * Close JavaRawLevel on destruction * Write level.dat to temporary file and rename If the program exits while writing the original will be left intact. * Release GIL in signal * Added a nogil holder The signal destructor acquires a lock so must be called without the GIL otherwise a deadlock can occur. This just wraps a std::shared_ptr and releases the GIL before resetting the shared_ptr. * Simplified and improved holder constructor * Added session.lock locking * Explicitly unlock file * Moved get_data_version function * Moved level.dat file writing to a new function * Added JavaRawLevel::create * Fixed region regex It must be a full match * Implemented dimension finding * Fix warning * Modified VersionNumber constructor This passes the arguments to the vector constructor so it now supports everything the vector supports. * Implemented JavaRawLevel::_register_dimension * Fixed block and version constructors * Fixed some raw level issues * Fixed VersionNumber constructor * Fixed properties Pybind11 def_property functions do not support call_guard * Implemented most of _get_dimension_bounds * Improved LockFile * Fixed two LockFile issues * Added LockFile tests * Fixed open file call * Explicitly lock in test Unix file locks are advisory meaning they can be ignored. * Make the linux lock non-blocking
- Loading branch information
1 parent
920ba2f
commit 153bbf5
Showing
47 changed files
with
2,225 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
from __future__ import annotations | ||
|
||
from . import _raw, anvil, chunk, chunk_components, long_array | ||
from amulet.level.java.raw_dimension import JavaRawDimension | ||
from amulet.level.java.raw_level import JavaCreateArgsV1, JavaRawLevel | ||
|
||
__all__ = ["anvil", "chunk", "chunk_components", "long_array"] | ||
from . import anvil, chunk, chunk_components, long_array, raw_dimension, raw_level | ||
|
||
__all__ = [ | ||
"JavaCreateArgsV1", | ||
"JavaRawDimension", | ||
"JavaRawLevel", | ||
"anvil", | ||
"chunk", | ||
"chunk_components", | ||
"long_array", | ||
"raw_dimension", | ||
"raw_level", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.