Added BlockIdentifierNotFound Error to differentiate from BlockStateIdNotFound
This commit is contained in:
1 parent
43164ee4f1
commit
33ec123148
2 files changed
+3
-1
No files matched your search
@@ -21,7 +21,7 @@ impl BlockId {
|
|||||||
) -> Result<Self, WorldError> {
|
) -> Result<Self, WorldError> {
|
||||||
let mut block_states = BLOCKS
|
let mut block_states = BLOCKS
|
||||||
.get(block_id)
|
.get(block_id)
|
||||||
.ok_or(WorldError::BlockStateIdNotFound)?
|
.ok_or(WorldError::BlockIdentifierNotFound)?
|
||||||
.states
|
.states
|
||||||
.iter();
|
.iter();
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ pub enum WorldError {
|
|||||||
Compression(CompressionError),
|
Compression(CompressionError),
|
||||||
#[error("Error deserializing chunk: {0}")]
|
#[error("Error deserializing chunk: {0}")]
|
||||||
ErrorDeserializingChunk(String),
|
ErrorDeserializingChunk(String),
|
||||||
|
#[error("The requested block identifier does not exist")]
|
||||||
|
BlockIdentifierNotFound,
|
||||||
#[error("The requested block state id does not exist")]
|
#[error("The requested block state id does not exist")]
|
||||||
BlockStateIdNotFound,
|
BlockStateIdNotFound,
|
||||||
#[error("The block is not inside of the chunk")]
|
#[error("The block is not inside of the chunk")]
|
||||||
|
|||||||
Reference in new issue
Block a user