diff --git a/minecraft/networking/types/utility.py b/minecraft/networking/types/utility.py index 69f25fa3..d18d9d00 100644 --- a/minecraft/networking/types/utility.py +++ b/minecraft/networking/types/utility.py @@ -77,6 +77,9 @@ def __hash__(self): values = tuple(getattr(self, a, None) for a in self._all_slots()) return hash((type(self), values)) + def __iter__(self): + return iter(getattr(self, a) for a in self._all_slots()) + @classmethod def _all_slots(cls): return tuple(f for c in reversed(cls.__mro__)