From e1e561fd472361a9318e516f2eefcd9e4dcacde2 Mon Sep 17 00:00:00 2001 From: Smyler Date: Sat, 3 Aug 2024 19:57:10 +0200 Subject: [PATCH] Allow BlockState to be compared with any other type --- litemapy/minecraft.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litemapy/minecraft.py b/litemapy/minecraft.py index d46c496..bdfe964 100644 --- a/litemapy/minecraft.py +++ b/litemapy/minecraft.py @@ -136,9 +136,9 @@ def to_block_state_identifier(self, skip_empty: bool = True) -> str: return identifier - def __eq__(self, other: 'BlockState') -> bool: + def __eq__(self, other: object) -> bool: if not isinstance(other, BlockState): - raise ValueError("Can only compare BlockStates with BlockStates") + return False return other.__block_id == self.__block_id and other.__properties == self.__properties def __hash__(self) -> int: