Update block entity data.

        Returns:
            Old data if block entity data was already stored for that location,
            None otherwise.

def set_block_entity_data(self, pos_or_x, y=None, z=None, data=None):
        """
        Update block entity data.

        Returns:
            Old data if block entity data was already stored for that location,
            None otherwise.
        """
        if None not in (y, z):  # x y z supplied
            pos_or_x = pos_or_x, y, z
        coord_tuple = tuple(int(floor(c)) for c in pos_or_x)
        old_data = self.block_entities.get(coord_tuple, None)
        self.block_entities[coord_tuple] = data
        return old_data